This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM2434: Issues with using uart dma mode

Part Number: AM2434
Other Parts Discussed in Thread: SYSCONFIG

Hi Experts,

Our customer is working with am2434, and he has some issues with using uart dma mode. He wanna get the count of bytes that he received but the transaction count works different.

Please advise. Thank you.

Kind regards,

Gerald

  • Hi Gerald,

    Can you help me with more information here ? Is this happening specially in DMA mode or in normal mode as well ?
    Is this issue replicable with example delivered in MCU+ SDK 08.04.00.17 ?

    Best Regards,
    Aakash

  • Hi Aakash,

    Thank you for your reply.  Yes, the customer SDK version is the last one. He is using ipc rp message echo example with freertos R5-00 and baremetal others. He opened main UART1 with DMA mode without callback (blocking) for r5-00 core. And he have another device which is Transferring data with 50HZ (per size 120-130 byte). Other device is keep transferring continuously to his R5-00. He is using Uart_Read() function. He have two tasks, first one is for ipc the other one is for Uart reading. At uart task, he have an infinite loop. Everytime he make transaction_init and then giving trans.buf and trans count. He tried to make trans object static or global but he cannot read data with that usage. He made that local and init for everytime. When he use uart_read func, he can see his datas in his receivebuffer. But he want to know how many byte did he receive. He check registers but it says you can see addres using  CFG_PROXY. He dont know that. 
    Sorry that was long question but he want to be clear. Briefly, he wanna know the count of bytes that he received. So he can make procces with them. Thank you so much.
    Kind regards,
    Gerald
  • Hi Gerald,

    Apologies for late response. I checked and there are no registers to check for number of bytes which are transferred or received. You can configure the Rx Complete Interrupt for DMA and in the ISR you can keep updating the number of bytes received. By the way which DMA is being used ? Is this a PKTDMA or a UDMA ?

    Best Regards,
    Aakash

  • Hi Aakash,

    I made my sysconfig settings as seen in the photo. PKTDMA is selected on the UDMA tab. I've seen it done the same way in the UART DMA example. As I said, a device is sending me 150 bytes of data at 50HZ frequency. I'm running freertos on the R00 kernel. The task I call the "UART-read" function is running at 100HZ frequency. I am giving my "trans-count" value 1536. I give my "trans-timeout" value 20 ticks. I couldn't find the DMA rx interrupt. When the other device sends counter(1 2 3 4 5...) with uart, the values ​​I read in r00 are not sequential. 

    Best Regards.

  • Hi ,

    I checked the configurations but it seems like the PKTDMA interrupt configurations are not available. I was able to configure interrupts if the BCDMA was used.

    Let me come back to on this by Next Friday (due to holiday in TII, 3 days early next week).

    Best Regards,
    Aakash

  • Hi ,

    When he use uart_read func, he can see his datas in his receivebuffer. But he want to know how many byte did he receive.

    Answer -

    The interrupt is raised after the bytes configured in trans.count is received by the application.

    So each time you call UART_read (in a blocking mode), you have received number of bytes configured in trans.count

    Let me know if this resolves your issue ?

    Best Regards,
    Aakash