cfg.c NUMBER_OF_BYTES_READ issue

All discussions related to the Loco Positioning system
Post Reply
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

cfg.c NUMBER_OF_BYTES_READ issue

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: cfg.c NUMBER_OF_BYTES_READ issue

Post 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.
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: cfg.c NUMBER_OF_BYTES_READ issue

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: cfg.c NUMBER_OF_BYTES_READ issue

Post 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 :).
justinleeyang
Expert
Posts: 186
Joined: Mon Dec 28, 2015 5:07 am

Re: cfg.c NUMBER_OF_BYTES_READ issue

Post 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!
Post Reply