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

SPI clock doesn't work in ble example


My SPI data transfer from a peripheral ADC works fine in the SPI example project. The same code doesn't transfer data properly when it is added in either a ble_template or a ble_uart_example.. I receive a fixed 0xFFFFFF in my Nordic Connect ble app.... no matter what the input. 

When I debugged my system I found the hardware clock for the SPI doesn't work (no clock observed on an oscilloscope).. The pin I have clk (PIN 7 ) on works as a gpio just fine when I toggle it. I've tried changing the pin number of clk, which didn't work.

When I remove all the BLE functions from the BLE _UART example project main loop and just run the SPI initialization and data transfer, the SPI data transfer with the ADC works absolutely fine. Which makes me think there's a clash bw the ble and spi functions I"m calling.  I tried changing the order of initialization of spi and ble but that wouldn't make both work simulataneously... 

Any ideas as to how to solve this clash and make both work at the same time are welcome! I'm terribly stuck at this.. 

IDE - Embedded Studio 
NRF52382 custom made PCB
SDK 15.2 

Parents Reply Children
No Data
Related