fsl_iap Erase/Program checks clock in 25.6

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

fsl_iap Erase/Program checks clock in 25.6

191件の閲覧回数
Folkert
Contributor I

With an update of the fsl-library to 25.6, I noticed that in fsl_iap.c the erase and program functions have a check on the clock being higher than 100MHz. 

Here the kCLOCK_CoreSysClk is checked, which is the main_clk in fig 4 in UM11126, page 43. I think this should be checked against kCLOCK_BusClk, which is the actual clock to the CPU.

Kind regards,

Folkert

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

150件の閲覧回数
Folkert
Contributor I

Dear @Harry_Zhang 

Thank you for your answer.

We use the LPC55S69 with the clock connected to PLL0, which runs at 150MHz and normally, we have kCLOCK_DivAhbClk set to 1. When we want to write to flash, we set kCLOCK_DivAhbClk to 2 to have the CPU running at 75MHz, which is functional. 
In this case, the fsl_iap functions should check on kCLOCK_BusClk, because then it differs from kCLOCK_CoreSysClk.

Kind regards,

Folkert

 

 

0 件の賞賛
返信

135件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Folkert 

Yes, you are right.

When we set kCLOCK_DivAhbClk  to 2,

 the fsl_iap functions should check on kCLOCK_BusClk.

BR

Harry

0 件の賞賛
返信

161件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @Folkert 

I checked this demo.

Harry_Zhang_0-1758622918461.png

I found that 

CLOCK_SetClkDiv(kCLOCK_DivAhbClk, 1U, false);

So the  kCLOCK_BusClk is the same with the  kCLOCK_CoreSysClk.

And i print them. they are same.

You can tested it.

BR

Harry

0 件の賞賛
返信