[esayDMA] SPI Communication btw nRF52 series and intanRHD(ADC)

I am implementing SPI communication between the intanRHD2132 (ADC) and nRF52840.

I need to periodically send commands(READ, WRITE, etc.) to the IntanRHD2132(ADC) at regular intervals(TIME_TO_WAIT_US), with each command being 16 bits (2 bytes) in size. Similarly, the data received from the Intan is also 16 bits (2 bytes) in size.

To exceed 200kHz(less than 5us), I attempted to implement very short regular intervals using PPI and TIMER. 

I have the following questions:

1. To improve the stability of execution, I aim to minimize delay by using easyDMA. Is the method I used (easyDMA) appropriate?

2. When debugging the addresses of uint8_t tx_buf_array[68][2]; and uint8_t rx_buf_array[68][2];, I found that they are not contiguous. Is this behavior normal? Also, is the method of assigning addresses to these variables correct (not implemented in the code)?

3. Are there any additional areas that need further optimization?

<Development Environment>

- Toolchain Manager: v1.3.0                                                                                                                                        

- IDE: Visual Studio Code (VSCode)

- SDK: ncs v2.6.0

- Development Kit: nRF52840 DK

- Peripheral used in this application : SPIM, PPI, GPIOTE, TIMER

Parents
  • Hi

    To improve the stability of execution, I aim to minimize delay by using easyDMA. Is the method I used (easyDMA) appropriate?

    as per the product specification, SPI is deprecated, and you should use spim which is spi master with easydma.

    When debugging the addresses of uint8_t tx_buf_array[68][2]; and uint8_t rx_buf_array[68][2];, I found that they are not contiguous

    I think that part is done by the compiler, and you don't have control over it.

    Also, is the method of assigning addresses to these variables correct (not implemented in the code)?

    I did not get you, what do you mean? can you elaborate more?

    Are there any additional areas that need further optimization?

    I would suggest going through the sample codes provided in the NCS and use them as per your use case.

Reply
  • Hi

    To improve the stability of execution, I aim to minimize delay by using easyDMA. Is the method I used (easyDMA) appropriate?

    as per the product specification, SPI is deprecated, and you should use spim which is spi master with easydma.

    When debugging the addresses of uint8_t tx_buf_array[68][2]; and uint8_t rx_buf_array[68][2];, I found that they are not contiguous

    I think that part is done by the compiler, and you don't have control over it.

    Also, is the method of assigning addresses to these variables correct (not implemented in the code)?

    I did not get you, what do you mean? can you elaborate more?

    Are there any additional areas that need further optimization?

    I would suggest going through the sample codes provided in the NCS and use them as per your use case.

Children
Related