问答

汇集网友智慧,解决技术难题

tianlan飞机

TA的家园币:10  

  • GD32F303RCT6 USART0的空闲中断进不去,仿真打断点也进不去中断

    intmain(void){//¿ÉÒÔ×öµ½´«ÊäÊý¾Ý³öÀ´£¬¶¨µã´«ÊäÊý¾Ý³öÀ´uint32_tStatus2=0;uint32_tStatus3;uint16_tx;dma_parameter_structdma_init_struct2;gpio_pin_remap_config(GPIO_SWJ_NONJTRST_REMAP,ENABLE);//ÏÂÔØ¿ÚNJTRSTÒý½Åµ±×öÆÕͨI/O¿Úrcu_ahb_clock_config(RCU_AHB_CKSYS_DIV1);systick_config();//1mssystickgpio_config();//PA1,PA2,PA3¹Ü½ÅÅäÖÃ/************************************************///UART0_initrcu_periph_clock_enable(RCU_AF);//Need!!!!//usart_halfduplex_enable(USART0);rcu_periph_clock_enable(RCU_USART0);//ʹÄÜUSART0ʱÖÓgpio_pin_remap_config(GPIO_USART0_REMAP,ENABLE);usart_deinit(USART0);//³õʼ»¯//¸´Î»Ê±ÖÓusart_baudrate_set(USART0,19200U);//¶¨Ò岨ÌØÂÊusart_receive_config(USART0,USART_RECEIVE_ENABLE);//½ÓÊÕʹÄÜusart_transmit_config(USART0,USART_TRANSMIT_ENABLE);//·¢ËÍʹÄÜusart_interrupt_enable(USART0,USART_INT_TC);//·¢ËÍÍê³ÉÖжÏusart_interrupt_enable(USART0,USART_INT_IDLE);//¿ÕÏÐÖжÏusart_enable(USART0);//Ä£¿éʹÄÜUSART_INT_TCnvic_irq_enable(USART0_IRQn,0,1);RX0_DMAquest_StartOrInit();TX0_DMAquest_StartOrInit();usart_dma_receive_config(USART0,USART_DENR_ENABLE);usart_dma_transmit_config(USART0,USART_DENT_ENABLE);//NVICEXTI_config();//timer_interrupt_flag_clear(TIMER0,TIMER_INT_FLAG_CH0);//timer_interrupt_enable(TIMER0,TIMER_INT_CH0);//usart_dma_transmit_config(USART0,USART_DENT_ENABLE);//usart_dma_receive_config(USART0,USART_DENR_ENABLE);/******************************************************//*configureDMAmode*///dma_circulation_disable(DMA1,DMA_