You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by Sebastien Lorquet <se...@lorquet.fr> on 2023/03/20 14:02:32 UTC
[old bug] Please take care with the spi_xx25xx eeprom driver
Hi,
If you use the spi_xx25xx EEPROM driver I submitted in 2014, please see
this pull request:
https://github.com/apache/nuttx/pull/8852
It contains a SPI bus lock bug that was silent and could have resulted
in bus conflicts if several devices interleaved accesses.
New libc code now has more tests (eg new function nxmutex_is_hold() )
around mutexes and the driver now fails.
The waitwritecomplete routine was expected to run *within* a locked bus
access sequence but for some reason the write now happens by page and
the waitwritecomplete() routine is not in that function, and required an
unlocked bus.
This provoked an actual cascade of assertion failures that called
themselves several times right up to mm_free:
Sebastien