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

Random SPI data shifting at ~72kB/s throughput

Hello,

I am using nRF52 with ADS1292, and i am trying to sample at 8kHz with data throughput of 72kB/s, but some data is being randomly shifted giving me random spikes. This occurs on all available clock speeds to some degree. I am using Easy DMA. I am not getting any warnings or errors from the SPI driver as far as I can tell.

This issue does not occur at a lower data rate. Does this have something to do with overhead from the nRF SPIM drivers? I am also using I2C and other resources, but this also occurs with those additional resources disabled.

I'm trying to figure out what the limitation here is; is there a known limit on how many times you can call 'nrf_drv_spi_transfer' every second?

Thanks,

Parents
  • What kind of SPI clock frequency do you use? If I read the datasheet correctly maximum frequency is ~2MHz. If you go faster I suppose it is possible to get garbage bad data.

    I think the input capacitance on the ADS1292 at 20pF is also relatively high. It might be worth a shot to configure the SPI pins in high drive to be able to source more current. You can do it by writing this after you call nrf_drv_spi_init():

    nrf_gpio_cfg(p_config->sck_pin,
                 NRF_GPIO_PIN_DIR_OUTPUT,
                 NRF_GPIO_PIN_INPUT_CONNECT,
                 NRF_GPIO_PIN_NOPULL,
                 NRF_GPIO_PIN_H0H1,
                 NRF_GPIO_PIN_NOSENSE);
    

    If it still doesn't work, I think it could be interesting to see your code and PCB layout. You can upload it in confidence on our official support portal, MyPage if you prefer.

Reply
  • What kind of SPI clock frequency do you use? If I read the datasheet correctly maximum frequency is ~2MHz. If you go faster I suppose it is possible to get garbage bad data.

    I think the input capacitance on the ADS1292 at 20pF is also relatively high. It might be worth a shot to configure the SPI pins in high drive to be able to source more current. You can do it by writing this after you call nrf_drv_spi_init():

    nrf_gpio_cfg(p_config->sck_pin,
                 NRF_GPIO_PIN_DIR_OUTPUT,
                 NRF_GPIO_PIN_INPUT_CONNECT,
                 NRF_GPIO_PIN_NOPULL,
                 NRF_GPIO_PIN_H0H1,
                 NRF_GPIO_PIN_NOSENSE);
    

    If it still doesn't work, I think it could be interesting to see your code and PCB layout. You can upload it in confidence on our official support portal, MyPage if you prefer.

Children
No Data
Related