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

SPI POWER?

Hi, I'm trying to get a SPI based peripheral going without much luck. One thing I noticed, in the debugger, is that on my implementation the field spi_base_address->POWER has the value Ø, where as in the example nRF6310 dev loop-back example (which, of course, works), it's 1. Is it possible that this is anything?

thanks for any thoughts.

  • As a second possible issue - Clocks? For this device, when using S110, I need to init with
    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_250MS_CALIBRATION, false);

    If I'm not using the softdevice, I use NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_RC << CLOCK_LFCLKSRC_SRC_Pos); etc.

    Is that sufficient clock source for SPI?

  • Hi Lionel

    I think the POWER register should always have value 1 in order for you to use the peripheral in question. Otherwise the peripheral is lacking power and will naturally not work.

    What nRF51 SDK version are you using? What is the version of the SDK where you find the SPI example that works? Are you copying the SDK SPI example code into your own code? What chip version are you using, i.e. what are the chip markings on your nRF51 chip?

    The SPI needs the internal 16MHz RC in order to operate, see nRF51822 PS v2.0, table 28. The internal 16MHz RC is automatically started when you enable your SPI. You do not need the 32kHz low frequency clock for the SPI.

  • Hi Stefan,

    I am on nRF51 SDK v. 5.2.0 - I haven't updated all the releases this summer yet. I took the SPI examples to model a configuration etc. which was all working fine on my nRF6310 with a PCA10004 Rev. 2.20. In this setup POWER=1

    I am not sure which version is on the prototype... I'll try to find out. For what it's worth, on this device: GPIO pins work for other purposes, BLE works etc.

    I will look with a scope, tomorrow; but this POWER thing is the only anomaly I can find from the software side. Is the SPI sensing, somehow, that the Slave device has a reference voltage or something? If so, knowing how might help debug...

    thanks.

Related