OpenEtherCATsociety / SOES

Simple Open Source EtherCAT Slave
Other
559 stars 244 forks source link

Activation of DC Sync with Raspberry Pi LAN9252 System #146

Closed Dynamic0823 closed 11 months ago

Dynamic0823 commented 1 year ago

I'm currently trying to enable the dc sync system on the soes implementation for the raspberry pi lan9252 example. After looking through the source code, I figured out I needed to set up the hw_interrupt function pointer in the config, as well as enable the use_interrupts option, but from there it feels like a bit of a black box in terms of what to do. Am I supposed to hook the sync0 and sync1 pins up to interrupt functions that call the slv_worker() in ecat_slave.c ? Do we need to set any of the sync activation registers to enable the sync0 and sync1 pins on the 9252 itself? I see in the esc.c file that in startInputs we call the checkDC function which makes a call to the user provided check_dc_handler in the config. But it only checks those if it first passes the sync_activation test, which is only ever read, and not set in the code. I'm just a little confused where to proceed from here, and any help would be greatly appreciated

nakarlsson commented 11 months ago

Hi,

You can find further guidance here : https://rt-labs.com/docs/ethercat-sdk/tutorials/soes-ethercat-slave-stack/

I'll close the issue hoping you'll find the aswers needed. Reopen or create a new issue if needed. Thanks for understanding.