We are trying to connect the nrf9160 to a spi flash device. we have a custom board with the following pins connected:
sck: 27
mosi: 28
miso: 30
cs: 29
wp: 31
reset: 26
For the testing, we are using the drivers/spi_flash sample of zephyr.
we use the following overlay:
We have disabled the uart and i2s that use these pins in the default design.
To communicate with the nrf9160, we use RTT. We use the following configuration:
The sample prints the following code:
When checking the signals with a scope, we noticed that the chip select (pin 29) does not have its expected behavior. Instead of becoming active during spi commands, continually switches between high and low, and looks like some sort of serial data.
We have tried to toggle the pin as an gpio, but are unable to control this pin.
We have tried a hello_world sample (without spi/flash), and notice the same behavior on pin 29.
Since our code does not use pin 29 for anything except chip select, we suspect that another program (bootloader? SPM?) configures the pin as an uart, preventing us the use it as a chip select.
Do you know if this assumption is correct, and how we could test and fix this? Or is there another solution to the problem?