Skip to main content
Associate
November 30, 2024
Question

Timer21 and USART1/USART2 interrupts are enabled and pending.

  • November 30, 2024
  • 3 replies
  • 616 views

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

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
November 30, 2024

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
November 30, 2024

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

Associate
December 9, 2024

HI 

Could Solve my problem.

Was stucking in DMA IRQ Handler which has same priority as TIM21.

After changing the the DMA interrupt's priority there is no reset as periodvalue is in the range

Thanks

Regards

AshwiniKool