This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi expert,
My customer is doing thr-core bootloader with CAN. They have already get everything done on CANA and not they are going to switch to CANB, where they met some issue.
Code always stuck in while loop in CAN_initRAM of CAN_initModule.
static inline void CAN_initRAM(uint32_t base) { // // Check the arguments. // ASSERT(CAN_isBaseValid(base)); HWREGH(base + CAN_O_RAM_INIT) = CAN_RAM_INIT_CAN_RAM_INIT | CAN_RAM_INIT_KEY; while(!((HWREGH(base + CAN_O_RAM_INIT) & CAN_RAM_INIT_MASK) == (CAN_RAM_INIT_RAM_INIT_DONE | CAN_RAM_INIT_KEY2 | CAN_RAM_INIT_KEY0))) { // // Wait until RAM Init is complete // } }
And this always happens in CPU2, 100% reproduced in the lab. CPU1 and CM core also have this initialization precess but they are 100% good.
Could you provide us one or two ways to debug this issue? Do we ne4ed to look into CAN_O_RAM_INIT to see which register bit is not good to debug this?
Thanks
Sheldon
Hi Sheldon,
Would you please check on the following for CPU2 before calling CAN_init RAM() function :
- Is allocation for CAN transferred to CPU2?
- Is CAN clk enabled?
Thanks,
Joseph