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

SPI SCK correct connection detection

My question is somehow connected to hardware side of SPI(M) peripheral implementation.

When using SPIM, I am observing 3 types of situation:

  1. WhenSCK pin is defined to unused, floating pin, SPI seems to be working OK(END event received)

  2. When SCK pin is defined to be connected to chip (ex. external ADC), and the chip is powered on, SPI seems to be working OK (END event received).

  3. When SCK pin is defined to be connected to chip (ex. external ADC), and the chip is NOT powered, I don't receive END event and my code is stuck waiting for it.

What kind of detection causes problem in situation 3? Is the current flowing from the SCK pin measured somehow? If so, why it works in situation 1? I know I can make some timeout to not be stuck in while waiting for END event, but I am just curious how that works.

best,

Wojtek

edit. Also, I observed that when I set SCK to H0H1 drive, situation 3 also works, code runs ok. Why is that so?

Parents
  • Hi,

    My theory is that the voltage on the SCK line is too low because too much current is sourced from the SCK pin on the nRF. The SPI peripheral reads the clock line back before clocking out a new bit, if the voltage is not high enough it may wait forever.

    Could you measure the SCK line with an oscilloscope both in high drive and in standard drive and add the measurements to your post?

Reply
  • Hi,

    My theory is that the voltage on the SCK line is too low because too much current is sourced from the SCK pin on the nRF. The SPI peripheral reads the clock line back before clocking out a new bit, if the voltage is not high enough it may wait forever.

    Could you measure the SCK line with an oscilloscope both in high drive and in standard drive and add the measurements to your post?

Children
No Data
Related