1
1
/******************************************************************************
2
2
* @file cachel1_armv7.h
3
3
* @brief CMSIS Level 1 Cache API for Armv7-M and later
4
- * @version V1.0.1
5
- * @date 19. April 2021
4
+ * @version V1.0.0
5
+ * @date 03. March 2020
6
6
******************************************************************************/
7
7
/*
8
- * Copyright (c) 2020-2021 Arm Limited. All rights reserved.
8
+ * Copyright (c) 2020 Arm Limited. All rights reserved.
9
9
*
10
10
* SPDX-License-Identifier: Apache-2.0
11
11
*
48
48
49
49
#ifndef __SCB_ICACHE_LINE_SIZE
50
50
#define __SCB_ICACHE_LINE_SIZE 32U /*!< Cortex-M7 cache line size is fixed to 32 bytes (8 words). See also register SCB_CCSIDR */
51
- #endif
51
+ #endif
52
52
53
53
/**
54
54
\brief Enable I-Cache
@@ -112,7 +112,7 @@ __STATIC_FORCEINLINE void SCB_InvalidateICache (void)
112
112
\param[in] addr address
113
113
\param[in] isize size of memory block (in number of bytes)
114
114
*/
115
- __STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (volatile void * addr , int32_t isize )
115
+ __STATIC_FORCEINLINE void SCB_InvalidateICache_by_Addr (void * addr , int32_t isize )
116
116
{
117
117
#if defined (__ICACHE_PRESENT ) && (__ICACHE_PRESENT == 1U )
118
118
if ( isize > 0 ) {
@@ -325,13 +325,13 @@ __STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
325
325
\param[in] addr address
326
326
\param[in] dsize size of memory block (in number of bytes)
327
327
*/
328
- __STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void * addr , int32_t dsize )
328
+ __STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (void * addr , int32_t dsize )
329
329
{
330
330
#if defined (__DCACHE_PRESENT ) && (__DCACHE_PRESENT == 1U )
331
- if ( dsize > 0 ) {
331
+ if ( dsize > 0 ) {
332
332
int32_t op_size = dsize + (((uint32_t )addr ) & (__SCB_DCACHE_LINE_SIZE - 1U ));
333
333
uint32_t op_addr = (uint32_t )addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */ ;
334
-
334
+
335
335
__DSB ();
336
336
337
337
do {
@@ -355,13 +355,13 @@ __STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int
355
355
\param[in] addr address
356
356
\param[in] dsize size of memory block (in number of bytes)
357
357
*/
358
- __STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void * addr , int32_t dsize )
358
+ __STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (uint32_t * addr , int32_t dsize )
359
359
{
360
360
#if defined (__DCACHE_PRESENT ) && (__DCACHE_PRESENT == 1U )
361
- if ( dsize > 0 ) {
361
+ if ( dsize > 0 ) {
362
362
int32_t op_size = dsize + (((uint32_t )addr ) & (__SCB_DCACHE_LINE_SIZE - 1U ));
363
363
uint32_t op_addr = (uint32_t )addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */ ;
364
-
364
+
365
365
__DSB ();
366
366
367
367
do {
@@ -385,13 +385,13 @@ __STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t
385
385
\param[in] addr address (aligned to 32-byte boundary)
386
386
\param[in] dsize size of memory block (in number of bytes)
387
387
*/
388
- __STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void * addr , int32_t dsize )
388
+ __STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (uint32_t * addr , int32_t dsize )
389
389
{
390
390
#if defined (__DCACHE_PRESENT ) && (__DCACHE_PRESENT == 1U )
391
- if ( dsize > 0 ) {
391
+ if ( dsize > 0 ) {
392
392
int32_t op_size = dsize + (((uint32_t )addr ) & (__SCB_DCACHE_LINE_SIZE - 1U ));
393
393
uint32_t op_addr = (uint32_t )addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */ ;
394
-
394
+
395
395
__DSB ();
396
396
397
397
do {
0 commit comments