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

nRF52 TWI easyDMA feature

Hi,

I want to know that if the TWI easyDMA in nRF52 can help in achieving this task:

  • we want to read from TWI each 10msec based on a timer interrupt and write the values in an array, e.g., A

  • meanwhile we want to transfer an array, e.g., B. Assume we can choose between non-connectable advertising or being in a connection.

Is this possible? Normally we should wait for the reading to finish, and then transmit in the 10msec window. Can DMA help in eliminating this sequence?

Thanks!

Parents
  • Hi

    There are some new MPU examples here. The examples are showing:

    • How to set up EasyDMA with the SDK drivers or simply using the nRF52 registers. The examples only use one buffer though, but using two buffers should just be a matter of defining two buffers, A and B, and then switch between them whenever you want. This should enable you to transfer old data while at the same reading new data.
    • How to send accelerometer data over BLE using a simple service.
    • How to use MPU data ready interrupts. With this example you can set up the MPU to sample every 10 ms and generate an interrupt when data is ready. Then you don't need a timer on the nRF52, just some GPIO to sense the interrupt.
    • How to use MPU free fall interrupts.

    Tested on:

    • MPU9255
    • MPU9150
    • nRF51 DK (PCA10028)
    • nRF52 DK (PCA10040)
    • SDK 11.0.0
    • SoftDevice S132 V2.0.0 and S130 V2.0.0.

    However no guarantees or warranties are provided.

    Older SDKs and Softdevices will not be supported. If you want to use other SDKs you will have to do the porting yourself.

Reply
  • Hi

    There are some new MPU examples here. The examples are showing:

    • How to set up EasyDMA with the SDK drivers or simply using the nRF52 registers. The examples only use one buffer though, but using two buffers should just be a matter of defining two buffers, A and B, and then switch between them whenever you want. This should enable you to transfer old data while at the same reading new data.
    • How to send accelerometer data over BLE using a simple service.
    • How to use MPU data ready interrupts. With this example you can set up the MPU to sample every 10 ms and generate an interrupt when data is ready. Then you don't need a timer on the nRF52, just some GPIO to sense the interrupt.
    • How to use MPU free fall interrupts.

    Tested on:

    • MPU9255
    • MPU9150
    • nRF51 DK (PCA10028)
    • nRF52 DK (PCA10040)
    • SDK 11.0.0
    • SoftDevice S132 V2.0.0 and S130 V2.0.0.

    However no guarantees or warranties are provided.

    Older SDKs and Softdevices will not be supported. If you want to use other SDKs you will have to do the porting yourself.

Children
No Data
Related