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.
Dear Champs,
My customer faced an issue to test loopback example of MCAN and they failed to turn-off loopback mode in loopback example of MCAN with polling & FIFO mode.
They wanted to turn-off loopback mode to test it by connecting external device, but failed to test it with FIFO & polling mode.
There was no issue to turn-off loopback mode with Buffer & interrupt mode as below.
* 'Interrupt' mode(Buffer)
- Loopback ON : test done
- Loopback OFF : test done
* 'Polling' mode(FIFO)
- Loopback ON : test done
- Loopback OFF : fail
Could you please let me know how they can turn-off Loopback mode in MCAN Loopback Polling example?
Is there any other example to use RX FIFO mode in MCAN?
Thanks and Best Regards,
SI.
Hi SI,
I'm looking into this and will get back with you shortly.
Regards,
Frank
Hi SI,
For Interrupt mode, did the customer start with the MCAN Loopback Interrupt example? https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_05_00_24/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_MCAN_LOOPBACK_INTERRUPT.html
For Polling mode, did the customer start with the MCAN Loopback Polling Example? https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_05_00_24/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_MCAN_LOOPBACK_POLLING.html
For loopback OFF in both cases, was the AM263x CAN transmitter, receiver, or both?
For the Polling mode failure, was the Rx data incorrect?
Is there any other example to use RX FIFO mode in MCAN?
No, the only example in the SDK that uses the RX FIFO is the MCAN Loopback Polling Example.
ould you please let me know how they can turn-off Loopback mode in MCAN Loopback Polling example?
Reviewing <SDK>\source\drivers\mcan\v0\mcan.c:MCAN_lpbkModeEnable(), it appears internal loopback mode can be disabled as follows:
MCAN_lpbkModeEnable(gMcanBaseAddr, MCAN_LPBK_MODE_INTERNAL, FALSE);
I don't currently have more insights into why Polling mode with loopback disabled would fail. If needed, I can try an experiment where I connect an AM263x CC MCAN1 to external device.
Regards,
Frank
Hi Frank,
Thanks for immediate response.
For Interrupt mode, did the customer start with the MCAN Loopback Interrupt example? https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_05_00_24/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_MCAN_LOOPBACK_INTERRUPT.html
For Polling mode, did the customer start with the MCAN Loopback Polling Example? https://software-dl.ti.com/mcu-plus-sdk/esd/AM263X/08_05_00_24/exports/docs/api_guide_am263x/EXAMPLES_DRIVERS_MCAN_LOOPBACK_POLLING.html
Yes. they used these loopback examples for interrupt and polling mode.
For loopback OFF in both cases, was the AM263x CAN transmitter, receiver, or both?
They found RX FIFO was not worked as expected with external equipment when loopback mode was turned-off.
For the Polling mode failure, was the Rx data incorrect?
They could not find any data in RX FIFO from external equipment when loopback mode was disabled.
Thanks and Best Regards,
SI.
Hi SI,
Thank for the feedback. I'll consult on this internally try some experiments. I'll get back with you next week.
Regards,
Frank
Hi SI,
What ID is transmitted by the external device for the polling mode receiver? The polling mode example is configured for ID 0xD0 and extended message type. Possibly the transmitted ID is being filtered at the polling mode receiver.
Regards,
Frank
Hi Frank,
Thanks for your feedback. my customer decided to use interrupt mode.
Thanks and Best Regards,
SI.