Not sure that I have a strong opinion here; I think I would need to have a better understanding of the particular driver to determine the best approach. If setting g_os_started back to 0 would solve the problems that seems like reasonable approach.
Will On Fri, Feb 5, 2021 at 5:03 AM Jerzy Kasenberg <[email protected]> wrote: > Hi all, > > There is crash handling in mynewt that can result in reboot, registers > dump to console, loop waiting for debugger or core dump save to flash. > > In case register dump console_blocking_mode() is called that will > result in console begin handled with minimal functionality. > > Unfortunately right now other parts of system are not aware of system > failure. > When core dump flash area is placed in external flash problems start. > SPIFLASH driver is not aware of crash condition and it uses OS based > waits for timeouts which may not work at that time. > It may also use SPI bus driver that on its own may use mutexes and > semaphores. > > g_os_started could be switched back to 0 and checked in crash aware > drivers or maybe some other form of crash awareness could be added. > > I'm curious about others opinion before doing it my way. > > br > Jerzy >
