This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using the TMS570LC4357 microcontroller and trying to get the DCAN1 peripheral to run at 1000kb and communicate with a STM32F405RGT6 with CAN bus also running at 1000kb. Both micros are set to 1 sync, 8 seg1 and 1 seg2 and 1 SJW. Both peripheral clocks are running at 20MHz, both prescalers are set to 2 and in both cases tQ = 100ns yet there are bus errors both Tx and Rx. I have 4 STM32F405RGT6 on the bus along with a single TMS570LC4357, when the TMS570LC4357 is removed from the bus there are no Tx/Rx errors. The bus is terminated at both ends with 120R. SPNA131 was used as reference to setup the TMS570LC4357. Any insight and help to resolve this problem will be greatly appreciated
Hello,
For regular CAN communication, the maximum speed is 1Mbps. Can you try the lower baudrate(750kbps, 500kbps, etc)?
If frequency modulation in the FMPLL is enabled (spread spectrum clock), then due to the high precision clocking requirements of the CAN Core, the FMPLL clock source should not be used for VCLKA. Alternatively, a separate clock without any modulation (for example, derived directly from the OSCIN clock) should be used for VCLKA.
I tried the changing the clock source but still no success. When all the modules are set to 500k the CAN bus works just fine. This is still an option though I prefer to have the new module (TMS570LC4357) work correctly on the existing bus of 1mb on further investigation I see the following behavior
Yellow is Rx, Blue is Tx
when I do nothing but enable loopback
There is a device (sysWORXX CAN module being used for debugging) set to be able to ACK messages in both cases as well as a single STM32F405RGT6 all running at 1mb. I am at a loss as to why I cannot get a reliable 1mb bus rate
Hello Derek,
1. If TMS570 CAN node doesn't TX and RX message, is there any CAN bus error?
2. If TMS570 CAN node TX a message, is the message received successfully by other notes? Is there any bus error?
3. If one STM32 node TX a message, can TMS570 CAN node receive the message?
I finally figured out what the problem is. I am using the SN65HVD233D CAN bus driver which can be set to 3 different modes namely high speed mode, low power mode and slope control mode. It turns out that I had it operating in slope control mode. Once I set it to high speed mode then everything worked exactly as advertised so it was a firmware problem that went un-noticed until I set the bus to 1000 kb. The good that came of this is that I got to understand the CAN bus a whole lot more than I did before the problem showed up.
Thanks for the assistance.