nRF5340 SPI DAC7311

Hello

I am going to use nRF5340 with DAC7311 DAC. It is a time critical application where nRF5340 has to send 16-bit data to DAC7311 exactly at 6us continuously.

Is it possible to run on nRF5340?

Can anyone give us advice and/or provide a sample code?

The nRF5340 and DAC7311 connection is as below:

nRF5340 SPI CS pin connects to DAC7311 /SYNC pin

nRF5340 SPI SCK pin connects to DAC7311 SCLK pin

nRF5340 SPI MOSI pin connects to DAC7311 DIN pin

Thank you

Parents Reply
  • Hello Kenneth

    Thanks for your support. The EasyDMA list is a good suggestion on buffering tx/rx data.

    We are going to update the RXD.LIST and TXD.LIST periodically

    We would like to make sure that the AMOUNT is valid, i.e. before START or after END transmission. 

    With refer to the below graph, the timer_handler is invoked during SPI TX/RX sometimes. 

    Could you advise any method to check the SPI transmission status and implement an atomic operation on updating PTR/LIST as well as reading AMOUNT?

    Thank you

Children
  • nrf5340 said:
    Could you advise any method to check the SPI transmission status and implement an atomic operation on updating PTR/LIST as well as reading AMOUNT?

    In this specific case, since you write so often (every 6us) I think it not will be possible, but instead my suggestion is to have two large buffers (e.g each that can handle several tens of readings), and simply switch between the buffers by updating the PTR frequently enough to ensure that you don't overwrite any of the buffers. Then you simply go through the non-active buffer to check how much is there (e.g. you can fill the buffer with memset or similiar first to understand how far the buffers have been filled).

    Kenneth

Related