We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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.
During build-time, it seems like the only file the build-process needs is one called C167S.LIB, and putting deliberate errors into the START*.A66 files does nothing. When I open C167S.LIB, I can see the text "C_STARTUP_CODE", so I assume I have to change the source of this file, and then compile it (?) again. The EINIT command it definitely contained within this C_STARTUP stuff, as I can see from the .M66 file. Perhaps the settings for SYSCON are too?