Skip to content

SDO writes reply are intermittently slow #89

@chen27040604-cell

Description

@chen27040604-cell

In a single SDO client to multiple SDO server setup, it is noted that the reply to SDO writes can take an extended amount of time for nodes. The issue does not present every time, but can be replicated consistently, and is persistent to that node(s) once replicated until reset.

This issue usually affects all replies to SDO writes for that specific node. A reply to an SDO write in nominal operations will take <1ms, but with this issue, the reply takes closer to ~1 second.

Is there a reason a reply to an SDO write can take so long, which is close to the default SDO write abort timeout? This is considering that there are barely any other messages on the bus except for heartbeats.

Here is a scenario of the issue:
We have 3 CANopen nodes, 1 acting as the SDO client and the other 2 acting as individual SDO servers (SDO server 1 and SDO server 2).
A function is called to execute several SDO writes to SDO server 1 and then subsequently several SDO writes to SDO server 2.
In this scenario let's say SDO server 2 presents with the issue.
The SDO client is able to execute the SDO writes and receive a reply from SDO server 1 within a millisecond for each SDO write (as witnessed by a CAN sniffer).
The SDO client is able to execute the SDO writes to SDO server 2, but the reply now takes closer to 1 second for each SDO write.

Other observations to note:
The issue presents intermittently, so a scenario can have all SDO server nodes performing nominally, but the issue can be forced by repeatedly resetting the node through the NUCLEO reset button. The issue can also be remedied by resetting the affected nodes until the SDO writes are "fast" again. Although over time the SDO servers will consistently become "slow" with sending replies to SDO writes. They will not go back to nominal speeds until the node is reset.

Here are configurations/setup details as well as some notes about certain setups:
SDO client is on a NUCLEO-F439ZI board
SDO servers are on NUCLEO-G0B1RE boards
canopen_app_interrupt on a 1ms timer (extending to 2ms does help the issue not occur as often but does not solve it)
canopen_app_process called by FreeRTOS task with a task delay of 1ms
CAN bus speed set to 1Mbps
When the NUCLEO boards are powered off of STLINK (micro USB) and the CAN transceivers are powered off of the NUCLEO 5V output, the issue occurs less often on powerup. But if the CAN transceivers are not powered off the NUCLEO 5V output and instead on a separate external power supply, the issue occurs every time on powerup for all nodes with that configuration.

Side question:
Is there a reason the write_SDO and read_SDO functions have a 10ms delay in the do while loop? Is this purely for stability? Can it perform reliably if say this delay was lowered down to 1ms or even 100us?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions