I am trying to run the Flexcan example with the evaluation board. The program compiles and runs as it should, however, never apears in the CAN interface.
I have added the IO configuration code line and checked that the CAN configuration is not in loopback mode and that the FlexCAN0 pins are the ones stated in the Evaluation Board PDF
I have checked the CAN_L and CAN_H lines and 120Ohms are there, enough to get CAN communication with a short cable. The configuration of the EVAL board is at 500kbps and CanAnalyzer is setup to 500kbps as well.
Anyone could give me a hint to what is missing?
I try your code but "CAN" still can't work, I can't measure the wave in can_tx.
Could you email sample code with IDE setting to me? Thanks a lot!
my email: firstname.lastname@example.org
there is secure transceiver TJA1153 connected to the MCU on the board. When no configuration is stored in non-volatile memory of the TJA1153, it does not allow the MCU to communicate with the CAN bus. It awaits configuration. Depending on the STB_N level the configuration needs to be sent via the bus from remote or via pin TXD.
STB_N=L, then configuration must come from local host via the TXD pin
STB_N=H, then configuration must come from remote node via the CAN bus
I will sent you simple example showing basic transceiver init.
I tried to use an external transceiver for CAN0 and wanted to use other pins than PTA6/7 Rx/Tx. So I selected PTF21/20 Rx/Tx and genereated new code,but when I run the program there is no response to them. I checked the pin connection by using it as GPIO and blink test.
When I use PTA6/7, I can see the message with an oscilloscope and my external transceiver also sends the correct message.
Is there any other configuration that should be done?
did you set respective IMCR register for RX pin as well? That is IMCR=5.
To test proper pin setting for FlexCAN, connect TX and RX pin together without transceiver and send a message. You should see message transmitted still.