Hello everyone,
I am currently working on the CAN communication on my ADSP-SC584 board. I have taken the example from the POST, as there is no device driver for the SC584 for CAN. In the example, a message is sent from CAN0 to CAN 1. This also worked for me, even if the bit timing settings do not match those in the data sheet.
In the data sheet, the rule SJW <= TSEG2 <=TSEG1 applies, but in the example the bit timing is set like this: CAN_TIMING : SJW = 3, TSEG2 = 5, TSEG1 = 2
I found that very confusing.
However, I have adjusted the bit timing so that I get a bit rate of 125kBit/s. In my example, I sent data to my PC once with the CAN0 transceiver and once with the CAN1 transceiver with PCAN-USB. Everything worked perfectly with CAN0 and I was also able to check the bit rate with an oscilloscope.
With CAN1, however, I made some strange observations:
I was able to receive data on my PC at 125kBit/s, but my oscilloscope displayed a bit rate of 180kBit/s and the signal levels generally didn't look clean. I tried to increase the data rate, which CAN1 is supposed to manage up to 1 Mbit/s, but at a rate of 250kBit/s nothing worked anymore.
As in the POST example, I have initialized CAN1 via SPI0 with the CanSpiConfig function, i.e. set the CAN controller to normal mode.
Does anything else need to be configured via SPI? I have set the bit timing settings via the registers *pREG_CAN1_TIMING and *pREG_CAN1_CLK as in the POST example.
Are there any examples where CAN1 works with a high bit rate?
Many thanks for your help
Phil