<div dir="ltr"><div dir="ltr"><div>HI, ALL AND JOEL!</div><div>i am debugging the stm32 uart, found that the idle interrupt will effect the RX</div><div>
have cleared the idle flag by pragma <br></div><div>but now i can not receive uart data, i don't know what's the error<br>
</div><div dir="ltr"><div><br></div><div>uint32_t *USART2_SR = (uint32_t *)0x40004400;<br>uint32_t *USART2_DR = (uint32_t *)0x40004404;<br><br>#pragma GCC push_options<br>#pragma GCC optimize ("O0")<br>rtems_isr USART2_handler(rtems_vector_number vector)<br>{<br><br> uint32_t temp = temp;<br> uint32_t SR = *USART2_SR;<br> if((*USART2_SR) & (1<<5))<br> {<br> <br> //printk("into int\n");<br> if(uart2_index < 100)<br> uart2_buf[uart2_index++] = (uint8_t)(*USART2_DR)&0xff;<br> else<br> temp = *USART2_DR;<br> //printk("%02X ", uart2_buf[uart2_index - 1]);<br> <br> <br> <br> <br> }<br> <br> if((*USART2_SR) & (1<<4)) // idle<br> {<br> //printk("idle ");<br> <br> temp = (*USART2_SR);<br> temp = (*USART2_DR);<br> //temp = temp;<br> <br> uart2_rev_flag = 1; <br> //printk("fla %08X", *USART2_SR);<br> <br> }<br> <br> if((*USART2_SR) & (1<<3))<br> {<br> //int temp = (*USART2_DR)&0xff;<br> temp = *USART2_SR;<br> temp = *USART2_DR;<br> }<br> <br> //temp = (*USART2_SR);<br> //temp = (*USART2_DR);<br> <br>}<br>#pragma GCC pop_options</div><div><br></div><div><br></div><div>my history mail post link <a href="https://lists.rtems.org/pipermail/users/2019-April/033147.html">https://lists.rtems.org/pipermail/users/2019-April/033147.html</a><br></div></div></div></div>