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
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
Hi @Folkert
Yes, you are right.
When we set kCLOCK_DivAhbClk to 2,
the fsl_iap functions should check on kCLOCK_BusClk.
BR
Harry
Hi @Folkert
I checked this demo.
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