I tried to drive the flash device W25Q32 on ncs v1.3, but there was no proper spi routine to refer to.
I tried to drive the flash device W25Q32 on ncs v1.3, but there was no proper spi routine to refer to.
Hi,
It looks like there's an example for W25Qxx in zephyr, which you can try:
https://github.com/nrfconnect/sdk-zephyr/blob/master/samples/drivers/spi_flash/src/main.c
However; it does not have a board file for nrf9160, and I personally haven't tested the above sample.
Kind regards,
Håkon
HI HåkonAlseth,
I tried to open this project, but report an error.
The relevant screenshots are as follows:
Kind regards, Peter.Min
Hi Peter,
peter.min said:Did you test with the development board PIN 10 11 12 13?
Yes I did.
peter.min said:This has little to do with the logic analyzer, just look at the log log and know that the w25q32 chip is not recognized.
Yes, I understand that the log states that it cannot find the IC, but your logic analyzer trace is not correct; which is the first indication for us to see what happens on the actual SPI lines. Does the IC respond to the initial transaction, does it fail further in the init() structure?
Kind regards,
Håkon
I tested the routine you provided, which can be used,
But I made the following changes and couldn't use them.
The modifications are shown in the figure below:
By making cs, these pins can detect the flash chip of the spi interface.
P0.00 01 13 14 15 26 27 08 09
When these pins are cs, the flash chip of the spi interface cannot be detected.
P0.19 18 17 02 03 04 05 06 07 20 21 22 23 24 25 19 18 17 30 31
Kind regards, Peter.Min
Hi Peter,
Some GPIOs are used for other purposes. Please see this list for the GPIOs that are already in use:
https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html?cp=2_0_5_4_6_0
Kind regards,
Håkon
Hi Håkon Alseth,
I'm using an empty board test,
No hardware affects the use of the corresponding IO port.
I also didn't find where P0.13 was occupied by the software.
P0.13 Why not be used as a CS foot.
Kind regards, Peter.Min
Hi Peter,
Can you please test this on another board, to rule out any issues with this specific board?
you can also modify the samples/basic/blinky/ to only toggle P0.13, to see if this blinks or not.
Kind regards,
Håkon
Hi Peter,
Can you please test this on another board, to rule out any issues with this specific board?
you can also modify the samples/basic/blinky/ to only toggle P0.13, to see if this blinks or not.
Kind regards,
Håkon
Hi Håkon Alseth,
It's a board welding problem.
Thank you so much.
Kind regards. Peter.Min
Hi Peter,
I am also using w25q32 spi nor flash but I am always seeing flash is not detecting on monitor. I used the same example as provided here which is spi flash in zephery library and add the files that Hakon sent, I am able to see spi output on logic analyzer and also cs is going high to low so no problem in cs pin also. Did you add anything or change anything in the code or in the proj conf files later which made your flash work or was it just problem with board? I need to detect this flash very urgently so any help would be so helpful.
Thank you