Hello Teensy members,
When developing a sepcific multi IO PCB for a project, I have to process different signals, control actuators and communicate with a master controller via EtherCAT.
In detail, the following peripherals are connected to a Teensy 4.1:
- 2 x load cell
- 2 x analogue microphone
- 10 digital combination inputs and outputs
- 6 x RC servo control
- 1 x WS2812 LED strip with max. 255 pixels
- 1 x EtherCAT slave shield with SPI interface (EasyCAT Pro)
During development, I noticed the following problems, some of which I was able to solve, but some of which I was not.
In order to be able to use the EtherCAT Salve Shield library (link above) without errors, I had to reduce the Teensy clock to 12-24MHz.
With higher clock rates, especially the standard 600MHz, I constantly received corrupt data from the shield via SPI or the cyclic method MainTask() hung up completely. SPI runs with 8MHz.
I also had to insert a delay of 125us after each CS Write command in the EasyCAT library, otherwise I had similar problems.
I found both ‘solutions’ in various forum threads, but they had nothing to do with my actual problems.
With these adjustments everything runs stable, except the WS2812 is causing me big problems.
I use the WS2812serial.h library from Paul, which basically works fine for what I need it for.
However, as soon as I call the show() method, I get the same problems with the SPI interface of the EtherCAT Shield.
Unfortunately, I lack the necessary in-depth knowledge to judge for myself to what extent the two libraries can influence each other and am therefore dependent on your help.
All libraries I use are - if available - those from Paul and adapted for the Teensys.
The EtherCAT communication between shield and master is 100% stable and error-free, so this can be ruled out as a cause.
I will be happy to provide further information if you need it.
Many thanks in advance and best regards from Switzerland
LaVoxxx
When developing a sepcific multi IO PCB for a project, I have to process different signals, control actuators and communicate with a master controller via EtherCAT.
In detail, the following peripherals are connected to a Teensy 4.1:
- 2 x load cell
- 2 x analogue microphone
- 10 digital combination inputs and outputs
- 6 x RC servo control
- 1 x WS2812 LED strip with max. 255 pixels
- 1 x EtherCAT slave shield with SPI interface (EasyCAT Pro)
During development, I noticed the following problems, some of which I was able to solve, but some of which I was not.
EasyCAT/libraries/EasyCAT/EasyCAT.h at master · dslemusp/EasyCAT
Repository containing libraries and configuration gui for the EasyCAT shield board - dslemusp/EasyCAT
github.com
In order to be able to use the EtherCAT Salve Shield library (link above) without errors, I had to reduce the Teensy clock to 12-24MHz.
With higher clock rates, especially the standard 600MHz, I constantly received corrupt data from the shield via SPI or the cyclic method MainTask() hung up completely. SPI runs with 8MHz.
I also had to insert a delay of 125us after each CS Write command in the EasyCAT library, otherwise I had similar problems.
I found both ‘solutions’ in various forum threads, but they had nothing to do with my actual problems.
With these adjustments everything runs stable, except the WS2812 is causing me big problems.
I use the WS2812serial.h library from Paul, which basically works fine for what I need it for.
However, as soon as I call the show() method, I get the same problems with the SPI interface of the EtherCAT Shield.
Unfortunately, I lack the necessary in-depth knowledge to judge for myself to what extent the two libraries can influence each other and am therefore dependent on your help.
All libraries I use are - if available - those from Paul and adapted for the Teensys.
The EtherCAT communication between shield and master is 100% stable and error-free, so this can be ruled out as a cause.
I will be happy to provide further information if you need it.
Many thanks in advance and best regards from Switzerland
LaVoxxx