2017-08-11 04:20 AM
Hi, new to the forum.
STM32L476: when reading a block larger than 255 bytes from an EEPROM , HAL gets stuck in HAL_I2C_STATE_BUSY_RX, SCL low, SDA high. Reload was setup alright in HAL and in STM32 I2C the TCR flag is set, but nothing happens. I suspect no interrupt was raised or it was not handled properly. Up to 255 bytes (no reload) everything works.
Any similar experiences?
2017-08-11 05:49 AM
Double check the EEPROM data sheet, make sure what the maximum transfer length is for memory pages.
Decompose transfer length that matches page lengths and alignments of addresses.
Check timeouts, and uint8_t variables.
2017-08-11 08:35 AM
No page limit for
reads
(that's the case in question), entire memory sequential read is valid.Pages apply to write operations only (where I do the obvious stuff like breaking it down into page-sized chunks), and that works. No timeouts, HAL status would return HAL_TIMEOUT, but it is HAL_BUSY as I wrote. No issue with variable types.
Nothing of that. But solved anyways: I'm in an RTOS and I was looking for status too early in the debugger.
After eons in the industry ...........