Skip to main content
Associate II
August 10, 2023
Solved

TIMER interrupt priority using Register in STM32G030K6T6

i am Initialize  UART2 and timer1 then my timer interrupt and UART2 interrupt in working fine but when i set priority timer first they do not set why?

 

void main(void){

NVIC-Set-Priority(TIM1_BRK_UP_TRG_COM_IRQn, 0);
NVIC-Enable-IRQ(TIM1_BRK_UP_TRG_COM_IRQn); // Timer interrupt enable
NVIC-Set-Priority(USART2_IRQn, 2);
NVIC-Enable-IRQ(USART2_IRQn); 

while (1)
{

 

}

}

This topic has been closed for replies.
TDK
TDKBest answer
August 10, 2023

Maybe your timer interrupts are happening too frequently. Debug the program. Hit pause and see where execution is at.

"If you feel a post has answered your question, please click ""Accept as Solution""."

2 replies

TDK
TDKBest answer
August 10, 2023

Maybe your timer interrupts are happening too frequently. Debug the program. Hit pause and see where execution is at.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Associate II
August 17, 2023

thanks sir,

i am done with your solution and my issue is resolve.