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.

AM2432: Uart DMA Receive Callback Mode

Part Number: AM2432

Tool/software:

Hi TI Experts,

Customer is working on AM2432 SDK9.2.

Customer configured Uart DMA mode, and configured the receive mode to Callback mode shown below.

However, customer found that the data read back are all 0, some coding used are provided below for your reference.

The testing result shows all 0.

Customer did a lot more testing, and finally they found the method to resolve this problem, they just simply change the metaPackage array from 4 to 4*8 shown below.

After this change, the result shows normal now.

Could you please help provide us an explanation why this change may solve this problem?

Many Thanks,

Kevin

  • Hi Kevin,

    I have read through your response.

    The first definition which is:

    uint8_t array[4] __attribute__((aligned(32)))

    The buffer is only 4 bytes, but is forced to be aligned to 32 bytes. This wastes memory and might not work well with DMA, which usually operates on larger blocks like 32/64 bytes.

    For reliable and efficient DMA operations, please continue using the second definition which is:

    uint8_t array[4*8] __attribute__((aligned(32)))

    In this case, the array size(32 bytes) matches the alignment, hence efficient memory access as DMA works with cache lines typically 32/64 bytes.

    Additionally, could you also, go ahead and check in the memory browser, the address of the array. Please check if the data can be seen there in the first case.

    Regards,
    Vaibhav