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

Changing pins used for QSPI in example

We have fabbed a PCB for the nRF52840 that has a QSPI chip. The pins are different from the example in the SDK. I was trying to get the SDK example (examples/peripheral/qspi) to work on our hardware.

I have gotten the example to work on the nRF52840 DK. I was using SDK 14.2.0.

I haven't been able to get the example to work on our hardware. These are the modifications I've made:

  • copied the file components/boards/pca10056.h to a new file in components/boards
  • added a new #include to components/boards/boards.h for the new board header file and 
  • modified my new board file to change the following #define's:
    • BSP_QSPI_SCK_PIN, 
    • BSP_QSPI_CSN_PIN
    • BSP_QSPI_IO0_PIN
    • BSP_QSPI_IO1_PIN
    • BSP_QSPI_IO2_PIN
    • BSP_QSPI_IO3_PIN
  • modified the Keil project C/C++ tab to remove the BOARD_PCA10056 define and added the define my new board header file
  • made sure the soft device was deleted (erase of code memory fails when IDE is programming flash if I don't)

When I run the unmodified example on the development kit, the example runs to the line NRF_LOG_INFO("Data consistent") without any problems

When I run the modified example on our hardware, the example runs instead to the line NRF_LOG_INFO("Data inconsistent"). The contents of the rx buffer (m_buffer_rx) is all 0x88 instead of the random data test sequence.

I've managed to get a scope on all the lines to ensure there is activity on all the SCK/CS/IO lines. I've checked many times that the signals are routed correctly. I can't get multiple signals probed at the same time since I don't have test points accessible. I've tried changing the clock divider (sdk_config.h:QSPI_CONFIG_FREQUENCY) to 2, 4, 8.

We are using a different device on our hardware, but I believe it is compatible. The nRF52840 DK uses MX25R6435F. Our hardware uses AT25SF641

Thank you for any help you can provide.

Parents Reply Children
Related