AnsweredAssumed Answered

LPIT Chanuel Re-Init Issue

Question asked by 赵子成 on Sep 20, 2019
Latest reply on Nov 14, 2019 by 赵子成

Hi All,

 

My software contains BOOT and APP, LPIT CHANNEL1 is used in both BOOT and APP. If I don't stop the LPIT channel before jumpping to APP from BOOT via "LPIT_DRV_StopTimerChannels(INST_LPIT1, (1 << LPIT_CHANNEL1))", in the APP Init phase, in LPIT Init, when exec the init function "LPIT_DRV_InitChannel(INST_LPIT1, LPIT_CHANNEL1, &lpit1_ChnConfig1);", will lead to DefaultISR, I don't know why, Can someone answer my issue? Thanks.

I use LPIT timer interrupt function both in BOOT and APP.

The BOOT and APP is run in PFLASH, and they have own INT VEC.

 

The BOOT LPIT Init code:

void LPIT_Init(void)
{
LPIT_DRV_Init(INST_LPIT1, &lpit1_InitConfig);

LPIT_DRV_InitChannel(INST_LPIT1, LPIT_CHANNEL1, &lpit1_ChnConfig0);

INT_SYS_InstallHandler(LPIT0_Ch1_IRQn, ISR_LPIT0_Ch1_1ms, (isr_t*)0);

pFunLpitCallback = NULL;
}

 

The APP LPIT Init code:

void LPIT_Init(void)
{
LPIT_DRV_Init(INST_LPIT1, &lpit1_InitConfig);

LPIT_DRV_InitChannel(INST_LPIT1, LPIT_CHANNEL0, &lpit1_ChnConfig0);
LPIT_DRV_InitChannel(INST_LPIT1, LPIT_CHANNEL1, &lpit1_ChnConfig1);
LPIT_DRV_InitChannel(INST_LPIT1, LPIT_CHANNEL2, &lpit1_ChnConfig2);

INT_SYS_InstallHandler(LPIT0_Ch0_IRQn, ISR_LPIT0_Ch0_1ms, (isr_t*)0);
INT_SYS_InstallHandler(LPIT0_Ch1_IRQn, ISR_LPIT0_Ch1_1ms, (isr_t*)0);
INT_SYS_InstallHandler(LPIT0_Ch2_IRQn, ISR_LPIT0_Ch2_10ms, (isr_t*)0);


LPIT_DRV_StartTimerChannels(INST_LPIT1, 1 << LPIT_CHANNEL0); //channel 0
LPIT_DRV_StartTimerChannels(INST_LPIT1, 1 << LPIT_CHANNEL1); //channel 1
LPIT_DRV_StartTimerChannels(INST_LPIT1, 1 << LPIT_CHANNEL2); //channel 2


pFunLpitCallback = NULL;
}

Outcomes