Have U got a solution for me? please!...
Thanks in advance.
Andrea Olivieri. (In Italy I'ts a male name)
I had an identical issue on a MC9S12XDP on a SofTec Microsystems dev board. Everything is fine with the BDM connected. Remove the BDM and reset, the MSCAN init function hangs while waiting for the "Init Mode Exit ACK".
Solution for me was the CANE flag in the CANCTL1 register. I found a line of code that was disabling CAN during startup init, then with the BDM detached my CAN init function could not turn CAN back on.
From the manual:
The MSCAN enable bit (CANE) is writable only once in normal system operation modes, which
provides further protection against inadvertently disabling the MSCAN.
Meaning that while the BDM debugger is connected, the CANE can be set to Disabled then later Enabled. However, with the BDM is disconnected, CANE can only be written once. If disabled, is stuck disabled and will refuse the "Init Mode Exit Request".
Special thanks for your thread for leading me in the right direction. This guy also helped.