Hello, I have a question for you
platform: s32k144 + s32ds-3.5 +s32k1-RTD_1.0.1
At present, I am using the can function of S32K144, using the official demo (loopback mode), the data reception is normal, and the reception interrupt can be entered.
When I changed to normal mode and followed the function interface in the routine, I found that it could not send and receive, the interrupt function could not enter, and the return value was different for different mailboxes. For example, if you use mailboxes below 10, you will return 2(busy) and 4(MB overflow), and if you use mailboxes above 10, you will always report 2(busy).
Thank you very much for your reply
已解决! 转到解答。
Hi,
as I wrote, if 16Mbs are enabled with RXFIFO using 8filter elements then MB8-15 can be used for TX/RX operation. MB0-7 are used by RXFIFO.
Then, do you have other node connected to your MCU via CAN bus? So that other node can send message so MCU can receive it. Also when MCU is sending other node is ACKing it?
If not then no TX MB interrupt will be called upon MCU is sending message, due to ACK error detected.
Also no RX MB interrupt will be called as device is disconnected from bus.
In loopback mode FlexCAN behaves as it normally does when transmitting and treats its own
transmitted message as a message received from a remote node. To ensure proper reception of its own message, FlexCAN ignores the bit sent during the ACK slot in the CAN frame acknowledge field. Both transmit and receive interrupts are generated.
BR, Petr
Hi,
you have configured FlexCAN to use 16MBs, but with RXFIFO enabled with 8 filter elements. Thus MB0 to MB5 are used for RXFIFO engine and MB6-7 to define filter elements. MB8-15 can be used for TX/RX operation.
You can repeatedly call Send/Receive function after previous TX/RX is done, FlexCAN_Ip_GetTransferStatus can be used to know MB status, or use Callback for that.
If you changed to normal mode, what is your connection to other mode? Do you have CAN pin initialized and have CAN transceiver active?
BR, Petr
Hi,
as I wrote, if 16Mbs are enabled with RXFIFO using 8filter elements then MB8-15 can be used for TX/RX operation. MB0-7 are used by RXFIFO.
Then, do you have other node connected to your MCU via CAN bus? So that other node can send message so MCU can receive it. Also when MCU is sending other node is ACKing it?
If not then no TX MB interrupt will be called upon MCU is sending message, due to ACK error detected.
Also no RX MB interrupt will be called as device is disconnected from bus.
In loopback mode FlexCAN behaves as it normally does when transmitting and treats its own
transmitted message as a message received from a remote node. To ensure proper reception of its own message, FlexCAN ignores the bit sent during the ACK slot in the CAN frame acknowledge field. Both transmit and receive interrupts are generated.
BR, Petr