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

SPI in BLE_UART example, clock not working

Hi, 

I am trying to read data via an ADC through SPI and send it via Bluetooth to the NRF mobile app. I checked that both the original BLE_UART example and the SPI master code work properly on my custom board when flashed separately, My custom pcb is nrf52382 based, I used SDK 15.2 in Embedded Studio to program it. 

When I include the SPI code in the ble_uart example, the chip advertises, and I check that the nus_data_handler is called as well. But SPI part does not work. My chip select is low, MOSI is low, so I see that gpio pin initialization works. But I do not get a proper clock signal from nrf to ADC. This clock pin is pin 7. I don't know why the BLE would interrupt with spi clock functionality. Pin 7 is not being used anywhere else in the code I checked the sdk_config,h file. 


More details on code: my code is not complicated. I was debugging my problem so I am using most of the functions in the SDK without modification, I remove the uart and NRF_LOG functions from the ble_uart example so that my pin 6 can work (this is my chip select pin for ADC). Then I initialize the SPI instance and pins etc. I am NOT trying to communicate with the SPI just yet, for starters I was  trying to simply initialize it and see if the clock is good before I actually transferred data. 

Any ideas or suggestions that would help debug the problem are appreciated. Thanks!  

I know there is another ticket by the same title, I started that but didn't get help, and the issue persists. 

Parents Reply Children
Related