@PetrS ,
I'm facing some issue in sending CAN messages. Below is my configuration in S32K312
RTD used is 3.0.0
I'm calling sbc_can2_task() function in a 10ms task periodically. Here, only one message is getting transmitted (0x700) and other messages are not getting transmitted.
Please guide here.
Thank you,
Hi,
what is return value of Send function for second call? Is previous transmit finished successfully?
In code it seems you are checking status for MB14, but MB13 is used for sending. Is that correct?
BR, Petr
Hi,
so is a code going into if-else statements or what is returned from GetTransferStatus. If it passes what is returned by Send function?
BR, Petr
Hi @PetrS ,
I have changed the function with FlexCAN_Ip_SendBlocking() and it is working fine, but the receive part is not working. I configured DMA for Flexcan2 and calling the function FlexCAN_Ip_RxFifo() within callback. Below is the screen shot for reference. Please guide here
Hi @PetrS
Please confirm whether FLEXCAN2 works with below
S32K312EVB-Q172 Evaluation Board
We are using external CAN SBC for this testing.
Hi,
you did not specify pins using for FlexCAN2 and outline connection to your external SBC/CAN transceiver. FlexCAN0, using PTA6/PTA7 pins, is connected to CAN transceiver on S32K312EVB-Q172 board.
So if you select right FlexCAN2's pins and connect both properly to active CAN transceiver then it would work normally. If have issues, check module MCR, ECR, ESR1 register to be sure it is working properly.
BR, Petr
@PetrS ,
Thank you for your response.
I have configured two CAN channels and they are
1) Flexcan0 - Internal Transceiver
PTA 6 - RX
PTA 7 - TX
Here, both Rx and Tx are working fine.
2) Flexcan2 - External TCAN1167 SBC
PTC 6 - CAN RX
PTC 7 - CAN TX
PTC15 - SPI CLK
PTC 14 - SPI CS
PTB3 - SPI MOSI
PTB2 - SPI MISO
Here, Only Tx is working fine with FlexCAN_Ip_SendBlocking() function call. Whereas, rx is not working and it displays ack and dominant error.
Hi,
what does dominant error mean? Rather share ECR/ ESR1 values. Measurement on TX/RX/CAN lines would be great too.
BR, Petr