Lpc4357 Timer Configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Lpc4357 Timer Configuration

2,208件の閲覧回数
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 返答(返信)

2,080件の閲覧回数
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

2,080件の閲覧回数
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 件の賞賛
返信