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.

UPP Driver v1.0 - issues when data buffers are located in external memory

I am using the stand-alone UPP driver v1.0 and have run into an issue when using external (DDR) data buffers.

I am able to reproduce the issue with the example project that comes with the driver.

 

I modified the example project to perform many UPP transfers.

When the data buffers are located in internal memory,

-          the data verification always passes.

When the data buffers are located in external DDR memory,

-          the data verification works the first time

-          the data verification fails for the other transfers

 

Have you seen this before ?

Could this be a side effect from the cache ?

Regards,

Mario.

  • Mario,

    I have not seen this issue before, but I think the most likely explanation is a cache coherence problem.  I recommend the following steps:

    1. Before uPP transfer: writeback/invalidate cache for data buffer
    2. (uPP transfer)
    3. After uPP transfer: invalidate cache for data buffer

    Step 1 should only be necessary for uPP transmit operations, and step 3 should only be necessary for uPP receive operations.  To perform these cache operations in DSP/BIOS 5.x, you can use the BCACHE API:

    #include <bcache.h>

    // ...

    BCACHE_inv(buffer_ptr, buffer_size, 1);
    // uPP transfer...
    BCACHE_wbInv(buffer_ptr, buffer_size, 1);

    Note that buffer size is measured in bytes.  Hope this helps.

  • Joe,

    Sweet !  That fixed my issues.

    Regards,

    Mario.