Closed szechyjs closed 7 years ago
cc @bcostm @adustm @LMESTM @jeromecoutant
Hello @0xc0170 @szechyjs It is not obvious to me that the can_write function is supposed to do some polling as long as the msg is not written. We are just preparing the sending of the the system and setting the interruptions to be notified when the msg is sent.
Cheers
Hello What do we do with this issue ? Is it sure that we are supposed to wait ? I've seen that @Nodraak has created a PR for the read part. Would you be interested into creating a PR for the write part also ?
Cheers
Hi !
What is the status here ? It seems that the issue has been fixed by commit 1c4e0d7dcbc78dfa066e64f16213317b8cb91395, as can_write() can sometimes return 0.
Hi,
It seems that the issue has been fixed by commit 1c4e0d7, as can_write() can sometimes return 0.
I think you are right. @szechyjs could you please check if it fits your need and maybe clode the issue ?
Kind regards
I'll close this . Please reopen if any new update
Description
According to the CAN.h header file the
write()
method is only supposed to return1
if send was successful. All of the STM32 implementations incan_api.c
are hard coded toreturn 1;
.The NXP targets implement this correctly, can_api.c
Bug
Target STM32
Expected behavior Only return
1
if write was successful.Actual behavior Returns
1
regardless if write was successful.Steps to reproduce