When master, it's up to the application to put master state into operational.
We had a function to do this so that we don't have to write directly in NMT structure
This is critical fix for PR #174
Before this patch SDO queue process pointer could overrun receive pointer on receiving NMT stop command during active SDO communication.
issue #39
previously when doing a SDO block upload and immediately after that starting another SDO request, this request was dropped. Especially if processing function has slow response.
fifo queue size is 2 by default
you can redifine CO_SDO_RX_DATA_SIZE to 1 in CO_driver_target.h, if you do not use block transfers to increase performance a little
issue #39
Now additional state CO_SDO_ST_DOWNLOAD_BL_SUB_RESP_2 is used to send response without resetting SDO sequence.
Refactoring timeout halding logic in sub-block transfer.
Also add missed unsigned indicators for several constants.
issue #170
* fix NMTstartup handling if device is NOT the NMT Master and now OD_NMTStartup (0x1F80 OD) can be optional
issue #149
* Correctly use of NMTstartup to self start slave
According to DSP302, part2, V4.1.0, 2009 for object 1F80h (NMT startup):
bit0=0 - "CANopen device is not NMT master. The entries of the object 1F81h shall be ignored. All other bits of object 1F80h shall be ignored with the exception: value = 00000000 00000000 00000000 00001000b - "NMT slave that shall enter the NMT state Operational after the NMT state Initialisation autonomously (self starting)"
* All Warnings omitted
Now all warnings that came up in previous versions are fixed in a clean way directly in the code.
Inlcudes:
Shadowing
Missing default cases
Missing cases in switch statements
unused variables
Pointer problems
Function declarations' visibility
* Default case for NMTsendCommand
Default case was not catched before and could led to errors.
* fix typo when omitting warnings
* Omitting more warnings, and fix TIME->CANrxNew nulling
Inlcudes:
large integer implicitly truncated to unsigned type
this statement may fall through
* rename CO_this to co
* fix CO_process_SYNC name (CANopenNode master merging issue)
Co-authored-by: Michele B. <MicheleBlank@gmx-topmail.de>
----
Verified before merge. It is cleanup, no deep changes.