This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPI Slave CLK

Hi

I'm using two different designs using nRF51822 as SPI Slave. One is using p0.07 as CLK input and the other is using p0.06 as CLK input. I'm using the code from spi_slave.c/h without any changes.

The one using p0.07 works like a charm.

Using p0.06 adds a 90Mhz oscillating signal to the clock-pulses and consequently the SPI Slave doesn't understand it.

Are there any default-settings on p0.06 I have to shut off? I'm not using any analog stuff whatsoever.

  • Hi Håkan.
    There is nothing you should shut off. It should work out of the box. Are you using PCA10001 or custom board?

  • Hi,

    Thank you for the information.

    The working one is the PCA10001 connected to my custom board with a ribbon cable. (Cable length ~10cm, but still works.)

    The nonworking is with the nRF51822 on board my custom board. (Short distance, should in theory be better, but nope.) Tried to change to another port, but same problem there. Looks like the edges on my SPI Master signals is too good. ;-)

  • Some more findings: The clock-signal looks ok as long as I don't call spi_slave_init(..); After that call 90MHz is added to every clockpulse. I tried to cool it down by adding an inductor and that helped a little bit. The sine-wave now varies between 1,4V and 1,8V, instead 0f going all the way from 0 up to 2,2V, which it used to do. Is there any setting in spi_slave_init I can change to help the input? I've tried both pullup and pulldown (no visible change). I have aslo tried drive config S0H1 and S0D1, but no visible change there either. A diode in series instead of the inductor maybe...

  • I am not able to reproduce the problem on my side with the standard spi_slave_example from the SDK and the spi_master_example_with_spi_slave.

    You say you change port which gives the same result, what port exactly? Do you change port on the PCA10001 or your custom board?

    Where is the SPI slave located? On your custom board or on the PCA10001 board?

    What frequency is selected for the SPI?

    I suspect there is something on your custom board that is creating this disturbance. Perhaps you could show us your schematics and layout for your custom board, in case we see something suspicious. For that purpose, create a support case in our support portal on www.nordicsemi.no. Go to the bottom of the page and click Technical Support Team. Attach your schematics with your case and refer to this thread.

    Any additional description of the problem would be helpful. Images from your scope that show the disturbance signal would be appreciated.

Related