Hello!
I'm using the following setup:
PC with EtherCAT master <-> EtherCAT Module with HW ET1100 <-> AM3357 with EtherCAT via PRU
So the module with the "real" ET1100 is the DC Master, the AM3357 is the DC Slave.
The EtherCAT slave application running on AM3357 is based on SDK 1.1.0.8
I have the SYNC0 pin of both Modules (DC Master, DC Slave) hooked to my oscilloscope.
I have setup the SYNC0 pins to generate a short pulse on every cycle.
Basically, it works, but I see a lot of jitter, especially when I disturb the system by sending
for example CoE requests from the master.
Then I did a trick to rule out the slave app itself:
I simply killed the slave app by Ctrl-C. The PRU continues to run and as long as the master just
sends its cyclic frame (no other requests, state changes and the like), the SYNC pulses are still
produced just like before. In this case there is only very little jitter, but if you let it run
for say 20-30 minutes, there will be a bad jitter around 1us as well.
To further check what causes the disturbance, I wrote a small program that can send a single command
to the PRU. I chose CMD_DL_USER_READ_AL_CONTROL (8). This command is usually sent after reading the
AL_CONTROL register - nothing that should disturb the DC generation in any way.
When I start the program, I get a jitter around 1.3us. It might be interesting that the jitter is not
a single spike caused by the delay that the command might cause, but rather the SYNC0 edge is wobbling
back and forth as if the DC regulator got a disturbing pulse.
After ruling out all other possible causes I am now stuck and hope TI will investigate the problem.
Any ideas?
Best regards,
Manuel Köppen
My small test program:
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include "prussdrv.h" #include "pruss_intc_mapping_ecat.h" #include "tiescbsp.h" #include "tieschw.h" static volatile t_host_interface* pPRU_HostIntf; /* 0x4a300000 */ #define PRUSS_HOST_INT (HOST_AL_EVENT - 20) int main(int argc, char **argv) { int err; err = prussdrv_init(); if (err) { printf("prussdrv_init() failed!\n"); return 1; } err = prussdrv_open(PRUSS_HOST_INT); if (err) { printf("prussdrv_open() failed!\n"); return 2; } err = prussdrv_map_prumem(PRUSS0_PRU0_DATARAM, (void**)&pPRU_HostIntf); if ((err) || (pPRU_HostIntf == NULL)) { printf("prussdrv_map_prumem(PRUSS0_PRU0_DATARAM, ...) failed!\n"); return 3; } pPRU_HostIntf->cmdlow = CMD_DL_USER_READ_AL_CONTROL; /* 8 */ pPRU_HostIntf->param1low = 0; pPRU_HostIntf->param2low = 0; pPRU_HostIntf->cmdlow_ack = 1; prussdrv_pru_send_event(ARM_PRU_EVENT1); while (pPRU_HostIntf->cmdlow_ack) { printf(".");fflush(stdout); } pPRU_HostIntf->cmdlow = 0xFF; return 0; }