cache_flush_data. STMicroelectronics OS20
Advertisement
Advertisement
16.2 OS20 function descriptions 16 Alphabetical list of functions
cache_flush_data
Flush the data cache
Synopsis
#include <cache.h> int cache_flush_data( void* reserved1, void* reserved2 );
Arguments void* reserved1 Reserved for future use (must be NULL ) void* reserved2 Reserved for future use (must be NULL )
Results
Returns 0 on success, -1 if an error occurs.
Errors
Returns -1 if the arguments are not NULL or if the data cache is not enabled.
Description
This function flushes the data cache by writing to the FLUSHDCACHE register bit. Flushing the data cache causes all dirty lines in the data cache to be written back to memory. A dirty line is a line of cache that has been written to since it was loaded or last written back. Flushing the data cache also causes the entire cache to be marked invalid. All data is reloaded from main memory.
Note: Any accesses to cacheable memory are blocked until the flush is complete.
Callable from
A task, interrupt service routine or a high priority process (on an ST20-C2).
Example cache_flush_data(NULL, NULL);
See also
125
ADCS 7473749D
Download
Advertisement