Lpc4357 Timer Configuration

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Lpc4357 Timer Configuration

1,609 次查看
hdhedhu
Contributor II

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‌

标签 (5)
2 回复数

1,481 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

1,481 次查看
hdhedhu
Contributor II

Thanks, xiangjun.rong

Now My Timer 0 is working at 2us but I am still not able to configure Timer 3.

0 项奖励
回复