CAN Driver doesn't check if Transmission is successful
Posted: Wed Oct 21, 2015 9:35 am
Hello,
I have been trying to test OBD2 over CAN BUS using STM32F103CB and ChibiOS.
I have been able to get my CAN RX working and now am able to receive CAN frames. I have been trying to send some OBD2 queries over CAN Protocol, but don't seem to be getting any response.
The canTransmit API returns OK status. I looked into the canTransmit API. It calls can_lld_transmit() function, which is only writing the CAN packet details into CAN TIxR register, but not waiting for the transmission status in CAN TSR register to be set.
Shouldn't it ideally check in CAN TSR register if transmission status for corresponding TX MailBox is set and only then return to the application if it is success or failure.
Another thing that even though my CAN configuration seems to be correct (as I am able to see CAN RX frames), my CAN Tx seems to be not working. The CAN TSR register doesn't show success after I have called the canTransmit API. Any thoughts?
I have been trying to test OBD2 over CAN BUS using STM32F103CB and ChibiOS.
I have been able to get my CAN RX working and now am able to receive CAN frames. I have been trying to send some OBD2 queries over CAN Protocol, but don't seem to be getting any response.
The canTransmit API returns OK status. I looked into the canTransmit API. It calls can_lld_transmit() function, which is only writing the CAN packet details into CAN TIxR register, but not waiting for the transmission status in CAN TSR register to be set.
Shouldn't it ideally check in CAN TSR register if transmission status for corresponding TX MailBox is set and only then return to the application if it is success or failure.
Another thing that even though my CAN configuration seems to be correct (as I am able to see CAN RX frames), my CAN Tx seems to be not working. The CAN TSR register doesn't show success after I have called the canTransmit API. Any thoughts?