26.6.3.1.2 Modifying a Descriptor in a List

In order to add descriptors to a linked list, the following actions must be performed:

  1. Enable the Suspend interrupt for the DMA channel.
  2. Enable the DMA channel.
  3. Reserve memory space in SRAM to configure a new descriptor.
  4. Configure the new descriptor:
    • Set the next descriptor address (DESCADDR)
    • Set the destination address (DESCADDR)
    • Set the source address (SRCADDR)
    • Configure the block transfer control (BTCTRL) including
      • Optionally enable the suspend block action
      • Set the descriptor VALID bit
  5. Clear the VALID bit for the existing list and for the descriptor which has to be updated.
  6. Read DESCADDR from the write-back memory.
    • If the DMA has not already fetched the descriptor that requires changes (in other words, DESCADDR is wrong):
      • Update the DESCADDR location of the descriptor from the list
      • Optionally clear the suspend block action
      • Set the descriptor VALID bit to ‘1
      • Optionally enable the Resume Software command
    • If the DMA is executing the same descriptor as the one that requires changes:
      • Set the Channel Suspend Software command and wait for the suspend interrupt
      • Update the next descriptor address (DESCADDR) in the write-back memory
      • Clear the interrupt sources and set the Resume Software command
      • Update the DESCADDR location of the descriptor from the list
      • Optionally clear the suspend block action
      • Set the descriptor VALID bit to ‘1
  7. Go to step 4 if needed.