raiden00pl opened a new pull request, #4084:
URL: https://github.com/apache/nuttx-apps/pull/4084
## Summary
Two fixes in candev_char.c of lely_master and lely_slave:
- read() on the CAN character driver copies every queued message that fits
into the buffer, but *_candev_recv() decodes only the first one, so e.g.
the second of two back-to-back NMT commands was lost. Set
CANIOC_SET_MSGALIGN to 0, so read() returns exactly one message.
- *_candev_send() fills a struct can_msg_s on the stack but does not set
ch_edl, ch_brs and ch_esi. With CONFIG_CAN_FD this stack garbage made the
driver send some frames as CAN FD frames. Zero the header first.
## Impact
Lely CANopen over the CAN character driver no longer loses frames that
arrive together and sends only classic CAN frames.
## Testing
sim and qemu-intel64 (CAN character driver) against a host CANopen master:
back-to-back NMT start/stop now leaves the slave STOPPED, all frames sent
by
coslave are classic CAN frames; boot, NMT, SDO, PDO, heartbeat, time and
master tests unchanged.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]