Hi,
I am trying to implement CAN communication using the AUTOSAR MCAL layer on the S32K144 MCU. I am able to transmit data successfully, but I am not able to receive any data.
I am using the polling method (not interrupts), and currently calling the following API periodically:
Is this API sufficient for receiving CAN messages in polling mode?
Do I need to use any other API along with it to receive messages properly?
Could you please share an example or reference code to implement CAN reception using AUTOSAR MCAL (polling mode) on S32K144?
解決済! 解決策の投稿を見る。
Hi,
you can check within debugger if message is really received. Inspect used MB area, MB flag.
Also be sure no error is detected during reception, otherwise message is not moved-in and no MB flag will be set, check ECR/ESR1 registers.
BR, Petr
Hi,
yes, it is enough to call MainFunction_Read periodically. Upon reception you should get CanIf_RxIndication callback.
Refer e.g to RTD200 demo example, which is using polling mode for both TX and RX.
BR, Petr
Hi,
you can check within debugger if message is really received. Inspect used MB area, MB flag.
Also be sure no error is detected during reception, otherwise message is not moved-in and no MB flag will be set, check ECR/ESR1 registers.
BR, Petr