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