-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CANopen SYNC message is not received #54364
Comments
Please provide the changes to the Python test code you used to reproduce this issue. Also, are you upgrading from a previous Zephyr revision where the same tests pass? If so, which revision? Are you able to bisect where the bug was introduced? |
I can reproduce the issue. Looking into providing a fix. |
Thank you! I was already in the process of bisecting the git history of zephyr and the respective canopennode module, but proved a bit tedious on my hardware. |
The CANopenNode stack expects registered RX buffers to be processed and matched in priority order. The priority corresponds to the index of each each registered RX buffer with lower indexes having higher priority. Depending on the CANopen COB-ID network configuration used, it may result in overlapping CAN RX filters. In the case of overlaps, the priorities of the registered RX buffers matter. When receiving a CAN frame, process the RX buffers in priority order and only dispatch the callback for the matching object with the highest priority. Fixes: zephyrproject-rtos#54364 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
@jmbrederveld Please test the fix in #54771 and report back. |
I can confirm this works on my setup! |
The CANopenNode stack expects registered RX buffers to be processed and matched in priority order. The priority corresponds to the index of each each registered RX buffer with lower indexes having higher priority. Depending on the CANopen COB-ID network configuration used, it may result in overlapping CAN RX filters. In the case of overlaps, the priorities of the registered RX buffers matter. When receiving a CAN frame, process the RX buffers in priority order and only dispatch the callback for the matching object with the highest priority. Fixes: #54364 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The CANopenNode stack expects registered RX buffers to be processed and matched in priority order. The priority corresponds to the index of each each registered RX buffer with lower indexes having higher priority. Depending on the CANopen COB-ID network configuration used, it may result in overlapping CAN RX filters. In the case of overlaps, the priorities of the registered RX buffers matter. When receiving a CAN frame, process the RX buffers in priority order and only dispatch the callback for the matching object with the highest priority. Fixes: #54364 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com> (cherry picked from commit bc4b49c)
The CANopenNode stack expects registered RX buffers to be processed and matched in priority order. The priority corresponds to the index of each each registered RX buffer with lower indexes having higher priority. Depending on the CANopen COB-ID network configuration used, it may result in overlapping CAN RX filters. In the case of overlaps, the priorities of the registered RX buffers matter. When receiving a CAN frame, process the RX buffers in priority order and only dispatch the callback for the matching object with the highest priority. Fixes: #54364 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com> (cherry picked from commit bc4b49c)
The CANopenNode stack expects registered RX buffers to be processed and matched in priority order. The priority corresponds to the index of each each registered RX buffer with lower indexes having higher priority. Depending on the CANopen COB-ID network configuration used, it may result in overlapping CAN RX filters. In the case of overlaps, the priorities of the registered RX buffers matter. When receiving a CAN frame, process the RX buffers in priority order and only dispatch the callback for the matching object with the highest priority. Fixes: zephyrproject-rtos#54364 Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
I am currently facing an issue using CANopen on the STM32F205RB:
I am in the process of upgrading my (working) code base to support zephyr-3.3-RC1.
All CANopen related functionality seems to be present and working (NMT, SDO, ..), however I am facing issues regarding a configured TPDO.
Since the configured transmission type is set to
1
, it should send the TPDO on every SYNC message (COB-ID 0x80) sent by the NMT master.In testing, it was observed that the SYNC message is not received by the stack, as it does not enter the
if
statement located here:modules/lib/canopennode/stack/CO_SYNC.c:312
I am able to reproduce this issue while running the
samples/modules/canopennode
sample by adjusting the python canopen script as written in the README file, by setting the transmission type to 1.My setup currently is:
I hope you can aid me in resolving this issue.
Kind regards,
Justin
The text was updated successfully, but these errors were encountered: