forked from renesas-rz/rzg2_flash_writer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ramckmdl.c
41 lines (37 loc) · 863 Bytes
/
ramckmdl.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
* Copyright (c) 2015-2017, Renesas Electronics Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "dgtable.h"
#pragma GCC optimize ("Ofast")
#include "common.h"
int32_t FillData32Bit( uint32_t *startAddr, uint32_t *endAddr, uint32_t writeData )
{
volatile uint32_t *pData;
pData = (uint32_t *)startAddr;
while(1)
{
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
*(pData++) = writeData;
if (pData >= endAddr)
{
return NORMAL_END;
}
}
return NORMAL_END;
}