I am starting on LPC4357 which has dual-core M0 and M4, I using LPC43xx_Old_Libraries for configuration purpose.
The issue I am facing is that when I am not able to configure M0_timer0 faster then 10us I want to configure it to 2us. Until 10us configuration is working fine. When I go faster than 10us M0 core is showing hard fault. also, I am not able to configure Timer3 on M0 core but all these things are working fine on M0 core. someone can please explain this issue and tell whatever I am trying is doable or not. If yes then how. I have attached M0app and M4 core main files below.
lpc4357 #lpc4357timers cortex m4 cortex m0 dual-core mcuxpressoide
Hi, Himanshu,
Regarding your question, for the code:
void M0_TIMER0_IRQHandler(void)
{
if(msec)msec--;
counter++;
LPC_TIMER0->IR = TIM_IR_CLR(0);
NVIC_ClearPendingIRQ(M0_TIMER0_IRQn);
}
How about using the code:
void M0_TIMER0_IRQHandler(void)
{
if(msec)msec--;
counter++;
//LPC_TIMER0->IR = TIM_IR_CLR(0);
LPC_TIMER0->IR |= 0x01; //clear flag
//delete the following line NVIC_ClearPendingIRQ(M0_TIMER0_IRQn);
//NVIC_ClearPendingIRQ(M0_TIMER0_IRQn);
}
BR
Xiangjun Rong