xmos / xcore_iot

Other
30 stars 40 forks source link

Explorer Board 2V0 Incompatible Flash Part #383

Closed xmos-jmccarthy closed 2 years ago

xmos-jmccarthy commented 2 years ago

System information

Describe the current behavior During the sfdp discovery, the software asserts due to an incompatible number of dummy cycles in a quad read operation.

Describe the expected behavior No runtime assertions

Standalone code to reproduce the issue Reproduced with the example_freertos_explorer_board target.

Other info or logs From the 2V0 changelog:

Note default number of dummy cycles after QUAD READ command is not compatible with XMOS QSPI boot but this is reprogrammed in non-volataile status register at manufacture/test so should be invisible to user.

Based on the behavior seen, it appears that the flash device does use the desired number of dummy cycles, but reports a different value in the sfdp. SFDP should be investigated to see if we can access the status register this manufacturer is using instead.

Additionally, the driver should be enhanced to allow manually specified parameters regardless of if sfdp works or not. Currently, if sfdp exists, then the driver will use whatever is reported.

Temporary workaround (Not for Production) Comment out the assertion. https://github.com/xmos/xcore_sdk/blob/6cd5f8dcaa3e128adf02138a7dfb56a709a13b02/modules/hil/lib_qspi_io/src/qspi_flash.c#L648

keithm-xmos commented 2 years ago

Addressed by https://github.com/xmos/xcore_sdk/pull/388