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

CAN Bus doesn't work

Hello,

i have a problem. I can not make the can-bus working.

I tried a lot of code, and checked it again and again. In the startupfile (start167.a66) i, configured the X-Bus and the CAN-Bus. But it doesn't work.

The Busstate is dominant or recesive, depending of the state of the port (why can i change the pin-state?).

I think it is interessting, that the simulator gives me SYSCON = 0x0004 (that is, what i expect). When i watch the Adress of SYSCON in the debug-window when debugging the micro, there is constäntly 10 00 (SYSCON=0x0010).

I have terminated the bus with 120Ohms, a Phytec-Minimodul and CANoe.

Any advices, what i could check again???

Thanks.

Parents
  • It has been a while since I used BSL but are you sure the monitor file has the XPEN bit enabled?

    Once the EINIT command is executed you cannot write the SYSCON register. Meaning your code can't change the value since it is protected. This would explain the difference you see between the simulator and the real target.

Reply
  • It has been a while since I used BSL but are you sure the monitor file has the XPEN bit enabled?

    Once the EINIT command is executed you cannot write the SYSCON register. Meaning your code can't change the value since it is protected. This would explain the difference you see between the simulator and the real target.

Children