Closed nakarlsson closed 1 year ago
In last PR (https://github.com/OpenEtherCATsociety/SOES/pull/119) for inputs- outputs only slaves, I simplified the SM valdiation when a SM got length 0.
In this PR I re-add the lenght validation to also include when the length == 0.
I also add a simple validation of the SII SM enable flag.
If it is SM Disabled, we don't accept an activeted SM or SM length >0.
If it is SM Enabled, we don't accept a de-activated SM with length > 0. This is a way to please CTT that use the disabled to invoke incorrect SM settings. I imaging a slot based slave can have the "SII SM enabled" but still can have 0 lenght inputs/outputs and hence will have the SM deactivated. Thats why the deactivated is in combination with length > 0.
Sample applications that have not used SM marked as Disabled in SII and ESI and in the ecat_options.h that mirros the SII SM settings.
Added support to run input only slave by SM3 interrupt
ping @ArthurKetels @hefloryd
Arthur please look at the SM logic, that it make sense.
hefloryd, does this solve the input only issue using interrupt only
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.