Page 1 of 1

cfg.c NUMBER_OF_BYTES_READ issue

Posted: Thu Mar 08, 2018 12:58 pm
by justinleeyang
hi,

I am using the lps-node-firmware eeprom, NUMBER_OF_BYTES_READ is 30, pass. but when set as 100,

printf the following error:

Code: Select all

CONFIG	: EEPROM magic not found!
CONFIG	: Writing default EEPROM configuration
Witing the list is not supported!!
why?

Re: cfg.c NUMBER_OF_BYTES_READ issue

Posted: Fri Mar 09, 2018 9:33 am
by arnaud
I have a weak recollection that the I2C memory driver was not fully generic and might not work for reading too big buffer. Maybe the read operation is failing because of the i2c memory driver.

Re: cfg.c NUMBER_OF_BYTES_READ issue

Posted: Fri Mar 09, 2018 10:30 am
by justinleeyang
hi,

STM32's Std driver is indeed unstable, CubeMX driver also.

so this is stm32 i2c hardware issue. can we use the anolog i2c commucation method?

Re: cfg.c NUMBER_OF_BYTES_READ issue

Posted: Fri Mar 09, 2018 10:32 am
by arnaud
No, I do not think it is that low level, it is our code. There is a buffer where the data are read and this buffer has a limited size. ST i2c is usually quite bad, but for reading an I2C memory the hardware does not cause problems :).

Re: cfg.c NUMBER_OF_BYTES_READ issue

Posted: Fri Mar 09, 2018 1:07 pm
by justinleeyang
hi,

you are right, CubeMx i2c code buffer is 32, so when read length>32, report error. so the driver must be 32 byte as a block to read/write

thanks! thanks!