I use spi_write() and spi_read() API to read JEDEC ID of Winbond NOR flash. But results of spi_read() are always 0. Do you have any suggestions to debug this issue?
I use spi_write() and spi_read() API to read JEDEC ID of Winbond NOR flash. But results of spi_read() are always 0. Do you have any suggestions to debug this issue?
Hi
Is there a reason you have defined two external flash devices? It looks mostly okay, but the t-dpd values (the time required to complete the dpd and rdpd commands) look very short, as this value is stated in nanoseconds. By default these are set to 10000 (enter) and 35000 (exit).
Regarding the build error, you need to provide some more context here. The error seems to be trigged by the flashNorInit function in flash_nor.c. Is this a function you've added yourself, as it's not found in the default nRF Connect SDK v2.3.0? What exactly do you want me to do with the compressed files you've uploaded?
Best regards,
Simon
Is there a reason you have defined two external flash devices?
Ans: I need to support two flash devices
The error seems to be trigged by the flashNorInit function in flash_nor.c. Is this a function you've added yourself, as it's not found in the default nRF Connect SDK v2.3.0?
Ans: I write flashNorInit() function by myself.
What exactly do you want me to do with the compressed files you've uploaded?
Ans: You can reproduce this issue with the following procedures.
1. Unzip custom_nrf52832.rar to boards/arm folder.
2. Unzip minimal_log_spi.zip to samples folder
3. cd minimal_log_spi
4. west build -b custom_nrf52832
Hi
I can't reproduce this if you're running it on a custom board I'm afraid, As I don't have these external flashes available on my end. Did you try changing the dpd and rdpd values in your flash device to higher values?
You need to upload the full build log for us to see what the root cause of this build failure is.
Best regards,
Simon
Thanks for your reply! I have replaced calling spi_nor_read_jedec_id() with flash_read_jedec_id(). It is okay to read JEDEC ID with flash_read_jedec_id().