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

SPI example stops working when I change the pins

Details: SDK v15.2.0 using peripheral spi example. Windows 8.1, uploading to nRF52 DK.

When I upload the example as is my clock, MOSI and select line work as expected (4E4F52444943 := "NORDIC"):

Using sdk_config I change the pins accordingly:

 spi_config.ss_pin = SPI_SS_PIN; //29 -> 17
 spi_config.miso_pin = SPI_MISO_PIN; //28 -> 8
 spi_config.mosi_pin = SPI_MOSI_PIN; //4 -> 6
 spi_config.sck_pin = SPI_SCK_PIN; //3 -> 15

When I do that, I get the following. Note the increase in horizontal scale from 10 us -> 1 ms. My clock line (yellow) looks fine when I zoom in (I see 16 even pulses at 4 MHz), but the MOSI (green) and select lines (purple) are inverted and completely out of sync with the clock line.

When going through the datasheet, pins 6/8/15/17 are all GPIO compatible, so they should work. I see that 15 is a trace port output so maybe there is conflict there? Any ideas?

Related