Tool/software:
Hello,
at the moment we are developing an EtherCAT slave with 6 sync managers. SM0 and SM1 are used for the mailbox, SM2 and SM3 are used for PDOs and SM4 and SM5 are used for SPDOs (safe PDOs).
Our target is to split up the process data into two frames. At frame reception the PDI_Isr() is called and depending on the content of the "AL Event Request (0x0220)" register bits [10:13] we decide whether PDO in-/output handling + PDO application is called (bits [10:11] for SM2 and SM3), or SPDO in-/output handling + SPDO application should be called (bits [12:13] for SM4 and SM5).
Each frame reception leads to a call of the PDI_Isr(), so for two consecutive frames we get two PDI_Isr() calls. And here is our problem: In the first PDI_Isr() call the bits for SM2, SM3 and SM5 events are set, everything's fine. In the second call the bit for SM4 AND the bits for SM2 and SM5 are set. This causes our application to execute the SPDO output mapping and the SPDO application twice. The set bits in the first and second call vary, depending on when a frame arrives. Is there any way to reset the pending interrupt bits?
Best regards