Skip to content
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

Missing TPDO Initialization #168

Open
crodegast opened this issue Jan 23, 2025 · 0 comments
Open

Missing TPDO Initialization #168

crodegast opened this issue Jan 23, 2025 · 0 comments

Comments

@crodegast
Copy link

crodegast commented Jan 23, 2025

Describe the bug
If there are multiple TPDO defined, a special situation can occur: between initialization of TPDO1 and TPDO2, the COTmrService / COTmrProcess can interrupt the initialization and tries to send TPDO1. This will fail, including reloading the timer of TPDO1 as the nmt mode "operational" is not set yet.
As the reloading was not done, TPDO1 will not be send in this "operational" cycle. Re-sending nmt "operational" will solve this issue.

To Reproduce
Steps to reproduce the behavior:

  1. define at least two pdos with a very small event timer (e.g. 10 with a CO_TMR_TICKS_PER_SEC = 100).
  2. send NMT "operational" -> most of the time both (or all ) tpdos will be sent. If all TPDOs appears, send a NMT "reset" and retry.
  3. See missing TPDO

Expected behavior
I expect all TPDO to be send at any time.


CANopen Stack (please complete the following information):

  • Device: [e.g. STM32F429]
  • OS: [µOS]
  • Version: we are using an older version, but the actual stack seems to have the same issue.

Additional context
A solution would be to set the new nmt mode first and then initialize the TPDOs in the following method:

void CONmtSetMode(CO_NMT *nmt, CO_MODE mode)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant