No CAN operation with DEVKIT-S12G128

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

No CAN operation with DEVKIT-S12G128

1,131 Views
TurboBob
Contributor IV

The demo/lab code for this dev board only uses the loopback.  All attempts to connect to a real CAN bus have not been successful.  It appears that there is no signal coming thru the 33903 chip.  I have tried powering from 12v, 5v, both (per the other thread) and nothing.  Does this chip need initialization.   And another thing,  the board rev does not match the documentation.  Most stuff appears the same,  but there is no way to really know.  Has anyone actually used the CAN on this board in any other mode other than looped?   Thanks

6 Replies

885 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi Robert,

Please check signals from the MCU and connection to the SBC_CAN_RX and SBC_CAN_TX pins.

Could you specify where the board does not correspond with documentation?

Best regards,

Diana

885 Views
TurboBob
Contributor IV

the QSG seems correct,  although there is no description for J15   ,  DEVKIT-S12G128-SCH.PDF appears to be an old rev.  in the picture/layout on the second page,  everything is in the wrong spot.  So is it the wrong schematic,  or just the wrong page2?    when I try to get CAN running,  I see Tx pulses on TP17 but nothing on the bus side of the SBC,  there are CAN signals from elsewhere on the bus ,  but nothing appears on the SBC_CAN_RX.  I have tried to find an example that will compile in CW 5.1,  but all the examples have errors or configuration issues and will not compile.  CW 5.1 has no CAN component,  just the init,  so its a bit of code-shuffling to get something together (only partially successful so far)  Any input here would be appreciated.

Thanks for your input,

Bob Bailey

0 Kudos

885 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Robert,

I am familiar with the MC33903, so let me add a few comments about this SBC. It really needs to be initialized (via SPI) to enable its CAN interface. The 5V-CAN regulator is ON (~5V at TP27) since the SBC is in a special operation mode (Debug, ~8.3V at TP6), but it is necessary to set the CAN mod[1:0] bits of the CAN register. In order to do that, the SBC has to leave the Init mode and enter the Normal mode. This is done using the SPI watchdog refresh command 0x5A00. Then you can set the CAN mod[1:0] bits by sending 0x60C0. These two commands should be sufficient to enable the CAN interface on the MC33903. You do not have to take care of a periodic watchdog refresh since the SBC is in Debug mode.

pastedImage_25.png

Screenshot_5.png

For more information on the MC33903, you might find useful the AN4770.

Hope it helps.

Best regards,

Tomas

0 Kudos

885 Views
TurboBob
Contributor IV

Thanks,  I will give that a try.    

Bob

0 Kudos

885 Views
TurboBob
Contributor IV

does not seem to make a difference.   I believe I have it configured correctly,  I see signals on the SPI lines going to the SBC.

I need to break out the logic analyzer and check the timing, and clock/edge stuff.

I tried adding the watchdog call in the main execution loop also,  just in case.  Still no joy.

All the CAN stuff is working in loopback mode,  this is the only roadblock.

Thanks,

Bob

0 Kudos

885 Views
TurboBob
Contributor IV

ok,  got it going,  SPI needed to be 16 bit,  MSbit first.   Thanks for all the help!

Bob

0 Kudos