在线时间0 小时
UID137578
注册时间2008-3-21
NXP金币0
该用户从未签到
新手上路

- 积分
- 17
- 最后登录
- 1970-1-1
|
e2448:FMC: Flash prefetch could result in incorrect read data
Errata type: Errata
Description: A flash read access could result in incorrect data being returned if the SIM_DIV1 register is
written to change the divide value for the flash clock and a flash prefetch occurs during the
clock change sequence.
Workaround:1. Create a function in the SRAM that performs the following operations:
a. Save value of FMC_PFAPR[23:16].
b. Disable flash prefetching by writing 8’hff to FMC_PFAPR[23:16].
c. Change value of flash divider SIM_DIV1[OUTDIV4].
d. Wait for clock change.
e. Re-enable flash prefetching by restoring the saved FMC_PFACR[23:16] value.
f. Return from the function.
2. Call the SRAM code function.
3. Once the function returns from its SRAM execution, the flash clock divider has been safely
altered.
/* SIM_CLKDIV1: OUTDIV1=0,OUTDIV2=0,OUTDIV3=1,OUTDIV4=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */
SIM->CLKDIV1 = (uint32_t)0x00110000u; /* Update system prescalers */
keil中没有到ram里去分频啊,而是直接在flash里分频了
|
|