2017-09-25 05:53 AM
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 !
2017-09-26 01:35 AM
Hello ,
You have to switch in assembler mode in debug PLS tool
and check to the register LR (Link register) to check the cause of the issue.
Best regards
Erwan
2017-09-26 05:55 AM
open fae_debg.wsx file using PLS 4.8
________________ Attachments : SPC560B_BootLoad_APP_Test.7z.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyP7&d=%2Fa%2F0X0000000b7G%2FNIHGuTrnaQmC4F7_ZxFo8hOY898EpGBrtDa4Z_NJxBI&asPdf=false2017-09-26 07:08 AM
Hi
please do not call can_stop . there is an issue we are tring to understand
check here: