kubabuda / EEPROM_generator

SOES EEPROM Generator and Slave Stack Code generation tool for EtherCAT devices using SOES library
https://kubabuda.github.io/EEPROM_generator/
Other
24 stars 11 forks source link

What modifications are required to enable FoE support in the EEPROM? #3

Open DingdangDa opened 3 months ago

DingdangDa commented 3 months ago

Based on the information I have gathered, it seems that the supported mailbox protocols are located at the 0x1C position in the EEPROM

kubabuda commented 3 months ago

Yes, but not only - there is FoE flag in EEPROM and USE_FOE in options

kubabuda commented 3 months ago

I added 'Enable FoE' setting that should do it, let me know how it is working for you

DingdangDa commented 3 months ago

Thank you. I'm using the FoE on SOEM and SOES. I need to modify the size of the boot mailbox to use FoE. It seems the enableFOE flag doesn't matter. If you have time, could you add a feature to set the size of the boot mailbox? This issue can now be closed.

qiayuanl commented 3 months ago

The mailbox address and mailbox length are also need to set int the EEPROM.

kubabuda commented 3 months ago

OK, where exactly do we want to set it?

qiayuanl commented 3 months ago

image Here we have the address and length. I set the boot mailbox address with a script and the FoE works! But there is some problem in files larger than 122 bytes.

qiayuanl commented 3 months ago

image Here we have the address and length. I set the boot mailbox address with a script and the FoE works! But there is some problem in files larger than 122 bytes.

The large file problem is solved by setting the boot mailbox and standard mailbox size to 128 bytes. I think it's because the AX58400 and AX58100 don't support mailboxes larger than 128 bytes. However, I can't find any document mentioned about the mailbox size of AX58400.

The following steps show how to use the EEPROM generator with FoE:

kubabuda commented 3 months ago

I can't find any document mentioned about the mailbox size of AX58400 For what I understand, ESC IP in AX58400 is really AX58100, I expect both to share mailbox size limit.

I made some changes:

If you can, test and let me know if this is enough. Are any changes in ecat_options.h needed?

qiayuanl commented 3 months ago

When you change the Mailbox Size, the TxMailbox Offset may need to change at the same time, since we are computing the txmailbox in ecat_options.h like

#define MBX1_sma MBX0_sma+MBX0_sml

If not, our eeprom will not aligned with the ecat_options.h

kubabuda commented 3 months ago

OK, we will pass TX mailbox offset directly in options.h instead - I initially copied how it was done in examples from SOES application, but it can be simpler