AnsweredAssumed Answered

SC584 REV 1.0 flush_data_buffer does not work as expected

Question asked by RichardJeske on Apr 27, 2017
Latest reply on May 10, 2017 by nithya.koch

We've experienced issues on flushing the cache data to the L3 memory. We are using the UART1 TX DMA directly after flushing the Cache with

flush_data_buffer(Start, End, 0);

Turning of the cache or or using

dcache_invalidate_both(ADI_DCACHE_INV_WB); 

solves this issue, but should be avoided.

 

Adding a NOP into the function wb_dmandpm in front of the flushing commands solves this issue. too. So we assume there might be a timing issue.
(C:\Analog Devices\CrossCore Embedded Studio 2.5.1\SHARC\lib\src\libc_src\flush_data_buffer.c; l. 155)

static void wb_dmandpm(void) {
  asm volatile ("NOP; WRITEBACK DM_CACHE, WRITEBACK PM_CACHE;"
#if WA_20000007
                "NOP; NOP; NOP; NOP; NOP;"
#endif
  );
}

This might be also affect the other flashing functions (we have not tested these since we don't use them)

 

The application that has following memory configuration:

    - Instruction cache   32KB
    - PM cache            32KB
    - DM cache            32KB

External memory:
    - enabled
    - 256 MB
    - Partition: default
  System heap:
    - customize
    - 4 MB minimum
    - memory: L3 external memory

System stack:
    - customize
    - 64 KB minimum
    - memory: L1 internal memory

 

The IDE is CCES 2.5.1 and and the OS is uCos-III 2.4.1. We've also experienced this behavior with CCES 2.2.0 and uCos-III 2.1.0

 

We've noticed the failure on two platforms including the ADSP-SC584-EZ-Board 1.1

Outcomes