OP code and erase was OK. I've fixed the problem by changing the number of bytes to read in the mem_read function.Anyway I've also made a library fully functional, with PEC calculus and check on readded data! Can find it on this Github repo.
Hi Thomas, Can I ask you how did you managed to read back from EEPROM.I've tried the same as reading from RAM but it didn't work. It seems like is performing a write instead of a read and after I've to reprogram some regs to make it works again.