LPC5514: Flash driver init

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC5514: Flash driver init

ソリューションへジャンプ
905件の閲覧回数
tomofumiyasuda
Contributor I

Hi!

I want to determine the system clock frequency to erase or program the internal ROM.

It is describe as "Note: Flash ERASE and PROGRAM operations must be performed with a system clock below or equal to 100 MHz." in the LPC55S1x / LPC551x User manual. However, sysFreqInMHz of the FLASH_Init function(see fsl_iap.c) is configured to set only 12MHz(kSysToFlashFreq_lowInMHz) or 96MHz(kSysToFlashFreq_defaultInMHz).

status_t FLASH_Init(flash_config_t *config)
{
/* Initialize the clock to 96MHz */
config->modeConfig.sysFreqInMHz = (uint32_t)kSysToFlashFreq_defaultInMHz;
if (get_rom_api_version() == 1u)
{
return VERSION1_FLASH_API_TREE->flash_init(config);
}
else
{
return VERSION0_FLASH_API_TREE->flash_init(config);
}
}

Which setting is correct, "12MHz / 96MHz" or "100MHz or less(80MHz etc.)"?

Regards,

TY
0 件の賞賛
返信
1 解決策
896件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

"Flash ERASE and PROGRAM operations must be performed with a system clock below or equal to 100 MHz." This is correct.

The SDK demo code use 96MHz FRO as system clock, so sysFreqInMHz is set as 96. If you configure 100M Hz system clock, you can set it as 100.  You could try, if you find any problem, please contact me again. I will check it further.

Have a nice day,

Jun Zhang

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
897件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

"Flash ERASE and PROGRAM operations must be performed with a system clock below or equal to 100 MHz." This is correct.

The SDK demo code use 96MHz FRO as system clock, so sysFreqInMHz is set as 96. If you configure 100M Hz system clock, you can set it as 100.  You could try, if you find any problem, please contact me again. I will check it further.

Have a nice day,

Jun Zhang

0 件の賞賛
返信
883件の閲覧回数
tomofumiyasuda
Contributor I

Hi Jun,

I appreciate your kindness.

Best Regards

TY
0 件の賞賛
返信