This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Changing Flash parameters in overlay file

My project is using nRF52840.   Early software development used an nRF52840-DK to develop most of the software.   Software is based on Zephyr using nRF Connect version 1.6.1.     I'm using the "littlefs" file system.   I got most things working using the nRF52840-DK.     I now have my custom board and it uses a slightly different (and larger) qspi-nor flash device.   

I'm still using the nRF52840-DK board file, but "modify" some of the parameters using an overlay file.    I know I need to change some of the parameters w.r.t. the flash.    I was able to modify the jedec-id for the new device, but am looking for some documentation that defines the parameters (keywords) in the board definition file (what some of them mean and format of values)   

Can you point me to these definitions (so I don't have to read through a lot of code :-))?

Thanks!

Parents
  • Hi

    What flash parameters specifically are you looking to modify? The block size and erase value are set in the qspi_flash_parameters() function in nrf_qspi_nor.c for instance, and all flash parameters can be found in flash.h in \zephyr\include\drivers\flash.h

    Best regards,

    Simon

  • Hi Simon,

    Thanks for your reply.

    To be truthful, I'm not sure right now what parameter(s) I need to change.   I'm transitioning from using the nRF52840-DK for development/evaluation to my custom board for production and trying to get the file system to function using a slightly different Flash device.  The attached image shows the errors I'm seeing (minus the mismatch JEDEC-ID which was easy to fix).   Since the errors occur prior to the call to "main()", I assumed that some parameter set in the device-tree must be the culprit, but then couldn't find documentation/definitions for the variables set there.  The call you referenced would be executed in main (at the earliest), after the error occurs (without editing code that probably shouldn't be changed).    Zephyr must be attempting to initialize the file system and failing.   The Flash interface must be "basically" working since it reads the JEDEC-ID (and the error is not thrown once the correct value was put into the overlay file).   So I'm looking for documentation so I can try to figure out what is happening (without having to read through a lot of Zephyr boot code).     Any pointers would be appreciated!!

    Thanks!

Reply
  • Hi Simon,

    Thanks for your reply.

    To be truthful, I'm not sure right now what parameter(s) I need to change.   I'm transitioning from using the nRF52840-DK for development/evaluation to my custom board for production and trying to get the file system to function using a slightly different Flash device.  The attached image shows the errors I'm seeing (minus the mismatch JEDEC-ID which was easy to fix).   Since the errors occur prior to the call to "main()", I assumed that some parameter set in the device-tree must be the culprit, but then couldn't find documentation/definitions for the variables set there.  The call you referenced would be executed in main (at the earliest), after the error occurs (without editing code that probably shouldn't be changed).    Zephyr must be attempting to initialize the file system and failing.   The Flash interface must be "basically" working since it reads the JEDEC-ID (and the error is not thrown once the correct value was put into the overlay file).   So I'm looking for documentation so I can try to figure out what is happening (without having to read through a lot of Zephyr boot code).     Any pointers would be appreciated!!

    Thanks!

Children
No Data
Related