Hi support team,
I was using SDK15.0 and PDK with nrf52840. I planned to implement a serial bootloader with SPI interface. I started with the example of "examples\dfu\secure_bootloader\pca10056_uart_debug" and I've replaced UART with SPI (include a pair of SPI master and slave).
The PDK will connect to my custom board over dual SPI(master and slave). Once the PDK SPI interface was initialized and ready for SPI traffic, my custom board will send some initial packets to PDK immediately. So I used a GPIO pin (P1,13) to control this, when the P1.13 was driven to high, my custom board will send the initial packets to PDK. The (P1,13) will be held to low at bootloader startup util SPI was ready and then drive it to high. All of this works well.
When I use Nordic command line tool(nrfjprog) to reset the PDK, PDK could receive the correct initial packets from my custom board. However, when I power cycled the PDK, PDK will lost some bits of the initial packets. (the first 11 bits of initial packets were discarded, the remaining bits of data was received correctly). I've tested many times and the first 11 bits of data were always lost. I'm pretty sure that my custom board has sent all the data over SPI correctly.
I couldn't understand why my bootloader could work well(receive correct initial packets) by soft-reset(nrfjprog), but only received partially packets on power cycle. Could you give me some advice?
Thanks,
Tengfei.