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

Accelerometer configuration issue

Dear Concern,

we have tried to configure the accelerometer LSM6DSO module through SPI interface using NRF52xx DK board. External Module was not configured properly without minimum nrf_delay_ms(10).

Is any reason behind this delay, as it is not working without delay?
could you please give us the suggestion how to avoid delay and is there alternate solution?
Regards,
Srinivas Rao.
Parents
  • Hi,

    Exactly where did you apply the delay? Could you show in the code?  

    External Module was not configured properly without minimum nrf_delay_ms(10).

     What do you mean by this? 

    I don't think this is a question that should be directed to Nordic unless you only observe this with the Nordic MCU.  

    regards

    Jared 

  • Hi Jared,

    we have tried to configure the accelerometer LSM6DSO module through SPI interface using NRF52xx DK board. accelerometer LSM6DSO Module was not configured properly without minimum nrf_delay_ms(10).
    Code :
    if(nrf_drv_spi_transfer(&spi, ctrl3_c_accelerometer, sizeof(ctrl3_c_accelerometer), NULL, NULL) != NRFX_SUCCESS)
    {
    error = 12;
    return error;
    }
    nrf_delay_ms(10); // Minimum delay required
    Is any reason behind this delay, as it is not working without delay?
    could you please give us the suggestion how to avoid delay and is there alternate solution?
    Regards,
    Srinivas Rao.
  • Hi,

    As long as the data being sent on MOSI is correctly and is transmitted in expected time I think that the issue is probably related to the LSM6DSO module. What exactly happens if you don't include the delay? Do you see the expected data being transmitted from the nRF52? How does the LSM6DSO respond? I'm trying to get a better understanding of what the issue really is. Please include traces from a logic analyzer or similar where the difference is highlighted. 

    Also, what do you do in the code after you've started the transfer? 

    Jared 

Reply
  • Hi,

    As long as the data being sent on MOSI is correctly and is transmitted in expected time I think that the issue is probably related to the LSM6DSO module. What exactly happens if you don't include the delay? Do you see the expected data being transmitted from the nRF52? How does the LSM6DSO respond? I'm trying to get a better understanding of what the issue really is. Please include traces from a logic analyzer or similar where the difference is highlighted. 

    Also, what do you do in the code after you've started the transfer? 

    Jared 

Children
No Data
Related