EEPRMA2 M95 writedata bug?
Hi,
I'm using the latest EEPRMA2 drivers for the M95M04 EEPROM.
I'm trying to store data in EEPROM on a specific address.
In the following example, I expect one byte to be written to address 5.
uint8_t a = 10;
uint32_t targetAddr = 5;
EEPRMA2_M95_WriteData(EEPRMA2_M95M04_0, &a, targetAddr , sizeof(a));
Stepping into EEPRMA2_M95_WriteData, we go into M95_spi_WriteData which still has the size of 1, but moving to the step where EEPRMA2_SPI_SendBuffer is called, the size has changed to 6 bytes to be written. It looks like the size is defined from the remainder, which is based on the following equation: ( targetAddress + Size ) % PageSize
I don't see how this can be correct implementation?
Edit: I seems like this person has the same problem https://github.com/STMicroelectronics/X-CUBE-EEPRMA1/issues/4
