This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting SYSCON register before EINIT.

Hello, I am trying to initialise the CAN interface on a C164 - I need to set the XPEN bit, and clear the CAN1DIS bit in the SYSCON register.

However, I am using C, and thus C_STARTUP_CODE is loaded into RAM, which contains the EINIT instruction (which locks down access to SYSCON). Therefore, EINIT has already been executed by the time my main() starts, and so I cannot access this register.

I'm having trouble interpreting the machine code on the reset vectors too, so I can't just put a JumpToHere, JumpToThere, sequence in.

Any help would be much appreciated.

Parents Reply Children
No data