cancel
Showing results for 
Search instead for 
Did you mean: 

Timer21 and USART1/USART2 interrupts are enabled and pending.

AshwiniKool
Associate

Hi 

Working on a project in which I require USART1,USART2 for serial communication.(RS485.)

I am using processor STM32L053R8.

the clock used is HSI.

Timer21 interrupt is being used to measure clock period. (to test the CPU Clock).

if the communication is started continuously, TIM21 and USART1/USART2 interrupts  both remain pending, hence the periodvalue is above the specified Range (above the HSI_LimitHigh) and hence the processor restartas with POR24.

can anybody help?

TIA

Ashwini

2 REPLIES 2

Stuck in a different IRQ Handler or callback function?

Some sort of blocking delay or transmit function?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Or just too long execution time of the UART interrupt, so that continuous communication results in that interrupt "eat up" all the processor time?

Measure that execution time, e.g. by toggling a pin at the beginning and end of the actual ISR (Interrupt Service Routine).

JW