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

NRF52832 use

Dear

i want to nrf52832 to collect accelaration sensor data(SPI communication 8MHZ). The sensor output datas per 250us,nrf52832 will lost the sensor interupt when 52832 connected with phone and connecting interval is per 20ms ? Or Lost connect?

Parents
  • Hi

    If you are in a BLE stack interrupt while the sensor interrupt occurs, the sensor interrupt will be delayed. The BLE stack will not be affected, as the highest interrupt priority is dedicated to the BLE stack only, and can not be used by the application.

    If the sensor interrupt is signaled by an external pin you can connect this to the GPIOTE module in the nRF52832, and have the GPIOTE module trigger an SPI transaction through the PPI. This means that the SPI can be activated immediately, without having to wait for the interrupt handler to run.
    If you use the array_list feature you can even have multiple SPI transactions started without having to run any code in the interrupt, but the BLE interrupts should typically be shorter than 250us so I don't think this will be necessary.

    Best regards
    Torbjørn

Reply
  • Hi

    If you are in a BLE stack interrupt while the sensor interrupt occurs, the sensor interrupt will be delayed. The BLE stack will not be affected, as the highest interrupt priority is dedicated to the BLE stack only, and can not be used by the application.

    If the sensor interrupt is signaled by an external pin you can connect this to the GPIOTE module in the nRF52832, and have the GPIOTE module trigger an SPI transaction through the PPI. This means that the SPI can be activated immediately, without having to wait for the interrupt handler to run.
    If you use the array_list feature you can even have multiple SPI transactions started without having to run any code in the interrupt, but the BLE interrupts should typically be shorter than 250us so I don't think this will be necessary.

    Best regards
    Torbjørn

Children
Related