leducp / KickCAT

A C++ open source EtherCAT master stack
Other
53 stars 9 forks source link

[master] Read eeprom never ends #152

Open nicolas71640 opened 5 months ago

nicolas71640 commented 5 months ago

I have used the eeprom a the end of this post with the simulator (I think this not related to the simulator however), and the eeprom fetching never ends. After investigation with @Rdk-T we've figured that this line was the culprit : return (((s->sii.buffer.back() >> 16) == eeprom::Category::End) and (s->sii.buffer.size() > 32));

The last word of the eeprom is 0x0000FFFF, the 16bits shift gives 0x0000 so the end half word is not seen as it should be.

Here's the faulty_eeprom to reproduce the issue

faulty_eeprom.zip