24.8.5.2.1 Code

Copy-paste the following code to your user application:
for(i=0;i<TRANSFER_COUNTER;i++) {
    transfer_is_done = false;

    dma_start_transfer_job(&example_resource);

    while (!transfer_is_done) {
        /* Wait for transfer done */
    }

    example_descriptor.SRCADDR.reg += TRANSFER_SIZE;
    example_descriptor.DSTADDR.reg += TRANSFER_SIZE;
}

while(1);