Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to use MX25R6435F with nrf52840 PDK

Hi everyone,

I was trying to use QSPI interface with the on board external flash memory MX25R6435F on nrf52840 PDK

This is what i have observed, Inside the linker tab (Segger embedded studio) if i start the flash from 0x0 and give a size of 0x100000 and run the QSPI example. It erases the whole flash memory instead of external flash memory. Then if i try to run  my BLE code , It doesn't run.

To run the BLE code , I load the s140 sotdevice.hex file to nrf52840 using nrfgoStudio.

Then the BLE code runs fine.

In other scenario if i declare the FLASH_START at 0x26000(rest is reserved for s140 softdevice) and size of 0x100000 . I don't face any problem of uploading new code(because my softdevice memory area is not modified by the QSPI code).

If i say this 

"THE QSPI EXAMPLE CODE IS ERASING THE 1MB OF INTERNAL FLASH MEMORY INSTEAD OF 64Mb OF EXTERNAL FLASH MEMORY" 

Is the above statement correct?

If yes, How to write and read from external flash memory?

If Not, Then why am i facing this isse everytime i upload the QSPI example.

Parents
  • Hello,

    If your project uses the Softdevice, you must make sure to not place the code in the softdevice area, which you will do if you use FLASH_START=0x0. This way, Segger Embedded Studio (SES) will write the .hex file of your application on the start of the flash (where the softdevice is already stored).

     

    If you compare the flash settings in the examples found in:

    SDK15\examples\peripheral\flash_fds\pca10056\blank\ses

    SDK15\examples\peripheral\flash_fds\pca10056\s140\ses

    You will find that the FLASH settings in the two examples are different. One will leave the flash area for the softdevice alone, while the other will start the application in the start of the flash.

     

    If I understand your question correctly, I believe that this will answer your question. If I misunderstood something, please let me know.

     

    Best regards,

    Edvin

Reply
  • Hello,

    If your project uses the Softdevice, you must make sure to not place the code in the softdevice area, which you will do if you use FLASH_START=0x0. This way, Segger Embedded Studio (SES) will write the .hex file of your application on the start of the flash (where the softdevice is already stored).

     

    If you compare the flash settings in the examples found in:

    SDK15\examples\peripheral\flash_fds\pca10056\blank\ses

    SDK15\examples\peripheral\flash_fds\pca10056\s140\ses

    You will find that the FLASH settings in the two examples are different. One will leave the flash area for the softdevice alone, while the other will start the application in the start of the flash.

     

    If I understand your question correctly, I believe that this will answer your question. If I misunderstood something, please let me know.

     

    Best regards,

    Edvin

Children
Related