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.
Hi,
I have a very simple MCAN set up (config details below) where I am trying to transmit only one message but unable to do so.
After I copy the message to messageRAM and add the transmit request, I see TXBRP bit set to 1, however, since the transmission does not go through, TXBTO bit does not get set. TXBRP bit remains at 1.
I am not sure if I am missing anything. Request your help/suggestions.
Also, if you could share an example of MCAN TX/RX data without loopback mode enabled, it will be very helpful. Thanks!
Config:
MCAN1 used
CAN FD disabled
bitrate = 500 KBPS
Tx buffer count = 1
Tx Buf start address = 0x0
CAN message ID is extended and data length is 8 bytes.
The MCU+SDK MCAN example uses internal loopback mode for testing. I want to receive and transmit CAN messages with an external device. I have referred to MCU+SDK example in configuring the driver but not used it entirely.
Hi Sue,
To change the MCU+SDK internal loopback to external loopback just change this variable to FALSE and rebuild the project. Then connect your PCAN or CAN monitoring tool to see that you will be able to receive the packets.
Thanks
Hi Kowshik,
I am using the MCAN loopback polling example as-is from MCU+SDK now and as per your suggestion I changed the variable to FALSE to change to external loopback. The execution gets stuck at do..while loop checking for transmission status as the transmission does not go through. This is the same issue I see in my project too.
Have you connected your CAN tool? What can tool are you using to capture the packets? I generally use PCAN tool and as soon as I configure it to capture and run the MCAN example the packets are sent.
Thanks
The clock frequency and the bit rates seems to be wrong.
Clock frequency is 80Mhz, nominal bit rate is 1mbps and enable CANFD and put the data bit rate to be 5Mbps
Hi Kowshik,
Could you please share a screen shot of your PCAN tool configuration and your CAN trace? did you make any other changes in the example software than what you mentioned earlier?
Even with all the tool configuration settings like you have suggested, I could not see any data packets on the CAN network. I see TXBCF register being set.
Hi,
These are my PCAN configs
When I run the application by making loopback as False, I got the below response in the PCAN
Once you send back all the messages sequentially for 10 times, you will be able to see the MCU+SDK example reaches to the All tests passed and the example ends.
Hope this helps.
Thanks