Re-add always verify SM length
Add validation of SM disabled, don't allow master
to activate or set a length if disabled.
Add validation of SM enabled, don't allow master
to set a length and de-activate.
Seperate validation of SM configuration that
depend on size of tx/rx pdo.
Add disable of SM3 when input only slave
reports error in OP.
Don't enable SM3 on start input if no inputs
Don't enable SM2 on start outputs if no
outputs
fix#112fix#113
Rxpdo/txpdo were declared as external pointers if MAX_MAPPINGS2/3 were
0. However they must be declared as arrays for an external unit to be
able to use them as such.
Change-Id: I4bd547ae809ccfcb2dc1761f0f511f7e6088b712
On the final segment the SDO shoud be written using the
pre-allocated buffer used to store segments during transfer.
When completed the pre-allocated buffer is written to the SDO.
This fix change to correct complete_access_subindex_loop
- buffer, ESCvar.mbxdata
- to use the lookup indexes for ESCVar.index -> nidx and
ESCvar.subindex -> nsub.
GCC9 introduced an address-of-packed-member warning that triggers in
esc_coe.c. The issue is that a packed struct has an overall alignment
of 1, and taking the address of a member in a packed struct is not
guaranteed to have any particular alignment. However, in esc_coe these
structs are always overlayed on aligned memory so in practice there is
no problem.
Fix the problem by explicitly setting the minimum alignment for the
structs used in this manner. Also fix an instance where an unaligned
pointer was used but never dereferenced (by changing the type of the
pointer from uint32_t* to void*).
Since most objects contain all subindexes (i.e. are not sparse),
check the most likely scenario first.
Change-Id: Idfda8ae3a3903c8312e02c9354b241af804f69ed
The upload pre callback was called with incorrect size for
segmented data (segmented size instead of the total size).
Change-Id: Ie29f138187d70c115d40267e4181e203bdfec5d1
The init of COE SDO defaults shall not be part of the
state machine according to ETG. Move the init to
SOES stack init where it will only be run once.
Small editorial changes on function and paranthesis
to unify in that function.
ESCvar.time is used by emulated eeprom handler to
measure idle time, when enough time have elapsed the
write is assumed to be completed and the EEPROM RAM
buffer is flushed to FLASH.
fix#69
Configure ECAT_PHY_RESET as a general purpose output in BSP
and set/keep PHYs in reset and let the EtherCAT slave
stack handle release/re-configure of PHY reset to correct
alternate function after EtherCAT block is released from
reset.
fix#68
Set DPRINT macro to printf by default. Long term this should be in an
os-abstraction layer but currently that would only include this macro.
Also fix an instance of invalid DPRINT usage.
Fix#57
The size of the objd->value member was previously increased to 64-bit
to allow setting 64-bit default values. This may waste some (ROM)
memory as 64-bit values are somewhat uncommon, and the value can be
set from an application hook instead. Revert to 32-bit values.
Fix#59