issues
search
CANopenNode
/
CanOpenSTM32
CANopenNode on STM32 microcontrollers.
Other
275
stars
110
forks
source link
Fix chicken-and-egg problem with LSS slave when running on bare metal:
#67
Open
maservant
opened
1 month ago
maservant
commented
1 month ago
CO_LSS_SWITCH_STATE_GLOBAL command to go into CO_LSS_STATE_WAITING is a no-op if active node-ID is NOT equal to 0xFF (see CO_LSSslave.c)
CO_CANopenInitPDO() returns an error if active node-ID is equal to 0xFF
As a result, CO_CANsetNormalMode() is never called and the CAN peripheral cannot receive data
This prevents the LSS slave from ever changing the node-ID to or from 0xFF
Solution is to ignore that specific error code when calling CO_CANopenInitPDO()