Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken or missing NOR flash is not appropriately detected #3323

Closed
hierophect opened this issue Aug 25, 2020 · 1 comment
Closed

Broken or missing NOR flash is not appropriately detected #3323

hierophect opened this issue Aug 25, 2020 · 1 comment

Comments

@hierophect
Copy link
Collaborator

hierophect commented Aug 25, 2020

As noted by @jepler, spi_flash_init within supervisor_flash_init is responsible for creating the NOR flash device based on pins assigned in the board profile. However, if the JEDEC ID is not returned by the NOR flash, no error is currently logged, allowing the device to proceed as if it has a filesystem but without any actual filesystem capabilities. This could be altered to emit some form of failure mode to inform the user that there is a hardware issue with their NOR flash.

Confirmed on the Feather STM32F405 by setting the NOR flash pins to an incorrect set of SPI flash pins not connected to the NOR flash. os.listdir('/') results in a return of [], and storage.erase_filesystem() crashes the Circuitpython board until it is manually reset.

@dhalbert
Copy link
Collaborator

Fixed by #5785. Now goes into safe mode if CIRCUITPY can't be mounted or created. Tested by trying on some boards that have bad flash chips or bad connections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants