SPI with BLE Stack

I am developing some code that involves multiple peripherals, but I am having issues only with the SPI lines following initializing the BLE stack. I am able to write to and from a FRAM chip before the BLE stack is initialized and see data flowing on my logic analyzer. Once the BLE stack is initialized, the spi function is being hit and run as it should be with the correct data in it, but I am getting nothing on my logic analyzer. Once I pause the code, the SPI lines show error. Is the BLE stack messing with the timing of my spi transfers? 

NOTE: I am currently using a Rigado BMD 350 Dev Board. I do not have the actual FRAM device connected yet as currently waiting on the order. I am using Saelae Logic Analyzer to receive the data from the NRF52832 chip.

Parents
  • The only thing that I can think is that when the BLE is initialized then it takes control over the LFCLK and HFCLK. In your SPI code are you making sure to request the HFCLK XTAL before using it or is your application assuming that the HFCLK is set automatically? 
    After BLE is initialized make sure you call sd_clock_hfclk_request to make sure that the clock is kept active for SPI when softdevice is not using it.

Reply
  • The only thing that I can think is that when the BLE is initialized then it takes control over the LFCLK and HFCLK. In your SPI code are you making sure to request the HFCLK XTAL before using it or is your application assuming that the HFCLK is set automatically? 
    After BLE is initialized make sure you call sd_clock_hfclk_request to make sure that the clock is kept active for SPI when softdevice is not using it.

Children
Related