Ivo Houtzager
3bc63d60c8
Merge 1b5ea09450
into 8f3841e3ce
2024-04-12 11:30:49 +09:00
Andreas Karlsson
41438c4a33
Add readback that SM bit is set enabled/disabled
...
On PDI disable/enable, add polling readback that
it is set/cleared. Set 1 is delayed
until the end of a frame which is currently
processed, ET1100 datasheet.
This aligns the code base with SCC behavior.
2024-03-27 09:07:13 +01:00
Andreas Karlsson
d04bed4666
Sync local SM PDIreg with ESC PDIreg at Mbx start
...
When starting mailbox service, write the value of
ECAT RepeatRequest to PDI RepeatAck. Otherwise
it is risk of a race condition when running
CTT and the repeat ack would hold the value
of previous repeat ack test.
The race condition occurs on slow targets
that doesn't handle the repeat request
fast enough. The resulting mailbox read
will come before the mailbox is emptied
on the SM changed event.
fixes
2024-03-20 08:26:25 +01:00
Ivo Houtzager
696141398c
Merge branch 'master' into master
2024-01-13 15:42:04 -08:00
Andreas Karlsson
d22277f4a5
Add typecast for bitwise operations of ESC
...
Add explicit typecasts for bitwise operations and
bitfields opeations of ESC.
2023-03-27 20:48:59 +02:00
Andreas Karlsson
ac198e05b1
Add explicit typecast for ESC SM addressing
...
Add explicit typecast for uint16_t address
for ESC_read/WAC_write. The ESC RAM address
space is limited to 16Bit.
2023-03-27 20:48:59 +02:00
Andreas Karlsson
8ebb78ea10
Enable SM3 interrupt for input only slave
...
Enable SM3 interrupt if the slave only got
inputs.
On PREOP_TO_SAFEOP do an intial write to SM3,
otherwise the SM3 will never occur since there
is no data present to read.
2022-09-27 18:16:22 +02:00
andreas karlsson
48c80f5cae
Impove SM validation for input- ouput only slaves
...
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.
2022-06-19 10:51:51 +02:00
andreas karlsson
366c07f446
Add support for input- or output only slaves
...
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 #112
fix #113
2022-06-15 20:50:31 +02:00
Lars Danielsson
69b1049970
Add support for Explicit Device Identification
...
Change-Id: Idbf636f37c02923d251742cc5f49ff1579eaebc6
2022-05-30 15:51:20 +02:00
iwoodsawyer
c3ad41d952
Always copy ALcontrol to ALstatus when device in emulated
2021-05-07 23:23:01 -07:00
iwoodsawyer
983856cb8c
Fix state function when ALstatus is always set to ALcontrol
2021-05-07 23:06:31 -07:00
iwoodsawyer
e166eaa9e6
Add device emulation support
2021-05-07 16:17:13 -07:00
iwoodsawyer
0507616b2d
Fixes
2021-05-04 10:15:05 -07:00
iwoodsawyer
64385e592c
Add define USE_MBX to disable mailbox support
2021-05-03 22:13:18 -07:00
Lars Danielsson
59728c994c
Add option to skip default initialization
...
Change-Id: I08bad59fe5adbb616a9005570a153511738bee1e
2020-09-09 15:44:29 +02:00
Lars Danielsson
bdea958dd5
Add Download SDO Segment
...
Change-Id: I4748930d80c831947ff2d8b300ca590a4a67b84f
2020-08-12 13:33:37 +02:00
Andreas Karlsson
24b700e1c4
Init CoE SDO defaults on SOES stack init
...
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.
2020-08-11 14:47:12 +02:00
Lars Danielsson
2296b55812
Add/extend support for upload and download callbacks
2020-06-22 15:01:06 +02:00
Hans-Erik Floryd
236a02bfb4
add hook for setting default values
...
Add set_defaults_hook to let application override default values.
2019-05-09 15:43:07 +02:00
Hans-Erik Floryd
55df56821a
use options.h for config
...
Simplify configuration by using options.h directly.
2019-05-09 15:43:07 +02:00
Hans-Erik Floryd
e27b6bcbb1
move globals to ecat_slv
2019-05-09 15:43:07 +02:00
Hans-Erik Floryd
5b33b077ca
add support for dynamic pdos
...
Add support for dynamic pdos, i.e. pdos that can be configured by the
EtherCAT master.
2019-05-09 15:43:07 +02:00
Andreas Karlsson
6fb665a701
Update App to use new DC checks, set error function, SM watchdog, fixed EEPROM delayed write and move generic slave functionallity to generic SOES
2019-05-09 15:43:07 +02:00
Andreas Karlsson
ca48f9db21
Move DC config to the applications
2019-05-09 15:43:07 +02:00
Andreas Karlsson
446b79d456
Add function to enter state with error
2019-05-09 15:43:07 +02:00
Hans-Erik Floryd
8abbbb1fb8
fail state change if SM2 overlaps SM3
...
Add a check to verify that SM2 does not overlap SM3.
2019-04-04 15:07:26 +02:00
Andreas Karlsson
e38301eb5c
draft/concept EoE
2019-01-24 17:41:07 +01:00
rtlaka
c08f90bb82
Acknowledge mailbox read by master on SM1 event instead of SM Status IntR
2018-02-19 11:17:31 +01:00
rtlaka
ba3716ba52
Only read SM Status and Activate in the dedicated function for that purpose
2018-01-31 12:31:48 +01:00
rtlaka
39fb2c91e7
added new xmc irq sample and adopted old samples
2017-10-30 09:50:30 +01:00
rtlaka
148cdba265
Add IRQ with SM/DC sync0 support
2017-10-25 14:38:38 +02:00
rtlaka
7715a2fffd
extend esc_config for generic stack configuration
2017-10-25 14:31:30 +02:00
rtlaka
036fb47dc3
Put a brief license info in source files and bump version
2017-10-25 13:39:20 +02:00
nakarlsson
39e2e116d0
Handled framgmented SDO rely
...
We need to trigger the application protocol handlers if we got any
ongoing transfers
2017-05-11 08:22:43 +02:00
Sascha Ittner
64abcf0cc5
Cleanup of ALevent update stuff in HAL, update ALevent var directly.
2016-09-15 14:19:11 +02:00
ArthurKetels
10c7f5191f
Bugfix against latest CTT 2.0.34
...
Fixed various big endian conversions. MBX error behaviour adapted to
specification
2016-01-27 22:14:36 +01:00
Hans-Erik Floryd
1dd230f742
use C99 types
2015-05-21 10:42:10 +02:00
Hans-Erik Floryd
134d2eb20b
clean license headers
2015-05-20 11:47:50 +02:00
Hans-Erik Floryd
a5ce11ea9a
add compiler abstraction header
2015-05-13 17:02:01 +02:00
Mikael Heden
fbe99a8ab7
Imported Arthur Ketels' SOES (hg: ea7f05102d58)
2014-09-12 16:01:33 +02:00