AnsweredAssumed Answered

A question about irqIsrEnable Function

Question asked by guo qiang on Sep 25, 2017
Latest reply on Sep 26, 2017 by carannante.procolo

I wrote a BootLoader program. and a APP program

I downloaded the BootLoader to the 0x0 address in Flash By UDE 4.8.

I downloaded the App to the 0x18000 address in Flash By UDE 4.8.

 

 

//code 1:

 

componentsInit();
irqIsrEnable();

 

SPCSetRunMode(SPC5_RUNMODE_DRUN);

 irqIsrDisable();

asm volatile ("e_lis %r3, 0x00018008@h \t\n"
"e_or2i %r3, 0x00018008@l \t\n"
"mtctr %r3 \t\n"
"se_bctrl");

 

//APP:
componentsInit();
irqIsrEnable();
for ( ; ; )
{
  pal_lld_togglepad(PORT_C, PC_LED8);
  osalThreadDelayMilliseconds(1000);
}

Everything is OK.

 

 

 

But ,If i am use CAN in the Bootload .when the APP run to irqIsrEnable .it will be enter _unhandled_irq function

//code 2:

 

componentsInit();
irqIsrEnable();

can_lld_start(&CAND1,&can_config_cfg0);

 

SPCSetRunMode(SPC5_RUNMODE_DRUN);

 irqIsrDisable();

asm volatile ("e_lis %r3, 0x00018008@h \t\n"
"e_or2i %r3, 0x00018008@l \t\n"
"mtctr %r3 \t\n"
"se_bctrl");

 

//APP:
componentsInit();
irqIsrEnable();
for ( ; ; )
{
  pal_lld_togglepad(PORT_C, PC_LED8);
  osalThreadDelayMilliseconds(1000);
}

 

I think that before the jump to close the CAN, APP implementation irqIsrEnable will continue to run.but  i try call can_lld_stop.andt jump to APP ,it doesn't work..

pls help me !

Outcomes