2008-08-22 10:34 PM
USART help - basic IRQ handler
2011-05-17 03:38 AM
There is an interrupt-driven example included with the Firmware Library - USARTs 1&2 send to each other...
2011-05-17 03:38 AM
2011-05-17 03:38 AM
2011-05-17 03:38 AM
2011-05-17 03:38 AM
hi John,
> my Rx routine is dropping a character (or two) occasionally very probably a race condition, post your code and I'll take a look at it. (no need to post makefiles or complete app cause I won't run it.)2011-05-17 03:38 AM
Hello, the project in my signature includes a STM32 demo with a complete interrupt-driven UART driver. The driver uses circular buffers.
Even if you don't plan to use an RTOS it should still useful as an example. regards, Giovanni --- ChibiOS/RT2011-05-17 03:38 AM
2011-05-17 03:38 AM
2011-05-17 03:38 AM
Hi,
Could you please provide me your configuration speed : CPU and APBs ? It seems like the core (Cortex-M3) generates bufferable write transfer. This means that the CPU consider that the data is written from an AHB point of view while the APB write transfer is managed by the AHB2APB bridge and could be written later. In this case the CPU left the interrupt routine while the interrupt is not yet cleared the cpu will re-enter again on the interrupt handler. To avoid this race condition, could you try the following : 1) ISR routine has to clear the interrupt peripheral flag when just entering in the routine to avoid interrupt missing. 2) ISR routine has to Implement a write to the APB peripheral register ( to clear the peripheral flag) then followed by a read access to the same register/flag. This operation will force the write buffer to complete the effective write the bit in the register. cheers, STOne-32.