cache_init_controller. STMicroelectronics OS20
Advertentie
Advertentie
OS20 User Manual 16.2 OS20 function descriptions
cache_init_controller
Initialize the cache controller
Synopsis
#include <cache.h> int cache_init_controller( void* cache_controller, cache_map_data_t* cache_map );
Arguments void* cache_controller Cache controller base address; see appropriate device datasheet for details cache_map_data_t* cache_map Pointer to a description of cacheable memory
Results
Returns 0 on success, -1 if an error occurs.
Errors
Returns -1 if the cache registers have been locked.
Description
This function is used to tell OS20 how the cache controller is configured for a particular variant of the ST20. This function must be called prior to any cache handling routines.
If st20cc runtime os20 is used when linking, this function is called automatically before the user’s application starts to run. If st20cc -runtime os20 is not used then the cache map should be selected from the list in Table 44 . Cache map details can also be found in the file %ST20ROOT%\stdcfg\chip.cfg
, by referring to the _ST_AddDevice lines.
ST20 variant
ST20TP3
ST20DC1, ST20DC2
STi5100
STi5105
STi5500, STi5505.
STi5508, STi5510, STi5580.
STi5512, STi5518, STI5519, STi5588, STi5589, STi5598 (cache region 1 in 64kB blocks).
STi5512, STi5518, STi5519, STi5588, STi5589, STi5598 (cache region 1 in 512kB blocks).
STm5700, STV0684.
STi5514, STi5516, STi5517, STi5528, STV396, STV3500.
Table 44: Cache maps
Cache map cache_map_st20tp3 cache_map_st20dc1 cache_map_c2_c200 cache_map_c1_c100 cache_map_sti5500 cache_map_sti5510 cache_map_sti5512a cache_map_sti5512b cache_map_c1_c100 cache_map_c2_c200
126
ADCS 7473749D
16.2 OS20 function descriptions 16 Alphabetical list of functions cache_init_controller can also be used to restore the power on state of the
CACHECONTROL registers, providing that the cache has not been locked. Any work performed by cache_config_data is undone.
Callable from
A task, interrupt service routine or a high priority process (on an ST20-C2).
See also
127
ADCS 7473749D
Downloaden
Advertentie