Initialization mode of the MSCAN module for MC9SDJ128B

Started by ecm_joe June 10, 2004
I've run into an interesting problem with trying to get the MSCAN
module out of initialization mode from startup. In my debugger
environment (Cosmic tools and debugger with BDM-Multilink) I can
bring the MSCAN module out of initialization mode after reset just
fine, but if I try that same piece of code after completely removing
and then reconnecting the power, it doesn't work. It will not bring
the MSCAN module out of initialization mode. I even wrote a loop
that check's the INITAK bit to see if it's set then I clear INITRQ
and loop again. It won't exit out of this loop.

I've scoured the Motorola site, but having found anything that might
help me. Let me know if anybody has any insight.

Thanks

Joe



Sorry to bother you all, but I figured it out. I was being a
moron. I was bringing the MSCAN out of listen mode and in the
following statement enabling the MSCAN module. Since I was writing
to the CANCTL1 register to bring it out of listen mode before I was
writing to enable the CAN module, I was effectively disabling the
CAN module until the next restart. It worked in Debug mode because
the CANE bit can be set multiple times in debug mode, but only once
in normal mode.

Joe

--- In , "ecm_joe" <jconnors@s...> wrote:
> I've run into an interesting problem with trying to get the MSCAN
> module out of initialization mode from startup. In my debugger
> environment (Cosmic tools and debugger with BDM-Multilink) I can
> bring the MSCAN module out of initialization mode after reset just
> fine, but if I try that same piece of code after completely
removing
> and then reconnecting the power, it doesn't work. It will not
bring
> the MSCAN module out of initialization mode. I even wrote a loop
> that check's the INITAK bit to see if it's set then I clear INITRQ
> and loop again. It won't exit out of this loop.
>
> I've scoured the Motorola site, but having found anything that
might
> help me. Let me know if anybody has any insight.
>
> Thanks
>
> Joe