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

SPIM - MISO connection has very low level

Hi,

i used the SPIM example to create a connection with my ads1256. on my breadboard it worked properly. now i switched to a layouted board and every SPI pin is working nicely EXCEPT for the Miso pin. Thing is when i measure the voltage level with an oscilloscop i see maybe 300 mV max. the signal looks roughly like the ADC is trying to output the proper data but for some reason cannot create suffiencent voltage levels.

things i did:

  • tried Spi1 Module: no effect
  • tried using a different pin for MISO - no effect: it then shows the same behaviour on the newly configurated MISO pin. this indicates to me that something is wrong with the programming
  • tried different hardware - no effect, so the issue is unlikely to be related to a damaged component.

anyone got an idea?

Parents
  • Hey Bjorn,

    thank you very much for your reply! i was able to resolve my issue and it was apparently due to the SPI-configuration pulling /CS up at points where the ADS1256 needed it to be low for a correct data transfer. i tied /CS permanently down to GND (as i only communicate with the ADS via SPI) and everything is working as intended. actually quite a malicious behaviour as it looked like a grounding issue.

    but im curious: I used the SPIM example from the DK as a basis for my code. how does nrf52832 change the /CS during communication? when is chip select turned up? maybe i just have not understood the SPI protocol correctly yet.

Reply
  • Hey Bjorn,

    thank you very much for your reply! i was able to resolve my issue and it was apparently due to the SPI-configuration pulling /CS up at points where the ADS1256 needed it to be low for a correct data transfer. i tied /CS permanently down to GND (as i only communicate with the ADS via SPI) and everything is working as intended. actually quite a malicious behaviour as it looked like a grounding issue.

    but im curious: I used the SPIM example from the DK as a basis for my code. how does nrf52832 change the /CS during communication? when is chip select turned up? maybe i just have not understood the SPI protocol correctly yet.

Children
  • The SPI driver in the SDK (nrf_drv_spi.c) will configure the CS pin so that its active low, see this Infocenter page. Quoting the documentation:

    Slave Select pin number: Set to NRF_DRV_SPI_PIN_NOT_USED if this signal is not needed. The driver supports only active low for this signal. If the signal should be active high, it must be controlled externally. So in your case you will have to use the GPIO abstraction(nrf_gpio.h) abstraction to control the CS pin.

Related