fsl_iap Erase/Program checks clock in 25.6

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

fsl_iap Erase/Program checks clock in 25.6

104 Views
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

Labels (1)
0 Kudos
Reply
3 Replies

63 Views
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 Kudos
Reply

48 Views
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 Kudos
Reply

74 Views
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 Kudos
Reply