Part Number: TMS320F28388D
Other Parts Discussed in Thread: SYSBIOS
Hi expert,
My customer is experiencing driverlib API failure when calling CAN_initModule(CANA_BASE); in SYSBIOS project on CM core. I have go through some threads but not sure if it is the same case:
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/877942
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/577233
I have also tested this issue at my side on EVM and perfectly reproduced it.
I don't know if this failure is anything related to CM_init(); call in none-BIOS code. In my test, I configure C28x using example project "can_config_c28x" and tested example code "can_ex2_loopback_interrupts" and my code based on BIOS.
My code structure is something in below sequence and it goes to stuck in the while loop in function call CAN_initRAM().
main(){
CAN_initModule(CANA_BASE);
.......
BIOS_start();
return(0);
}
If I do something I should not do, means adding CM_init(); in the front, then I can get to the OS scheduler with hard fault occured later.
main(){
CM_init();
CAN_initModule(CANA_BASE);
.......
BIOS_start();
return(0);
}
I am not sure what happens here and how to use this API correctly when using a BIOS?
My code is attached here.
Thanks
Sheldon