I just disable the systic interrupt in systic handler. code is given below:
void SysTick_Handler(void)
{
NVIC_DisableIRQ(SysTick_IRQn);
}
after executing the above instruction processor goes to hard fault handler.
But like the same thing I have done it for timer interrupt as given below.
void TIMER0_IRQHandler()
{
NVIC_DisableIRQ(TIMER0_IRQn);
}
it didn't go to hard fault handler.
What is the reason for this? is anyone experienced this type of issue.
Regards,
Muralidhar.
Hello Avinash G
Most of the NVIC_IRQ functions only support Interruptions. The Systick is a system exception, so the Systick is not allowed in the function NVIC_DisableIRQ(SysTick_IRQn).
In order to disable the exception, you need to set the TICKINT bit in the SYST_CSR register to 0.
if you want to disable all IRQ and system exception (apart from NMI and hardfault), you can use "__disable_irq()" and reenable all IRQ and system exception using "__enable_irq()"
Let me know if this is helpful, if you have more questions do not hesitate to ask me.
Best regards,
Omar