Dear all,
I read in your in your manual "AN12949 Flash Programming Tips for LPC5500 Series" (Par. 2.2 Flash operation)
.....
"Finally, flash erase and program can only be done when core clock <=100 MHz. if the CPU running at higher than 100 Mhz, user must lower CPU frequency first than erase and program flash."
.....
Unfortunately the clock frequancy of my application us 150MHz and during flash erasing/programming I have to reduce the clock frequency from 150MHz to 96MHz (for example)
In such case all peripherals clock change just one example the baud rate setting of UART.
Did you ave similar problem ?
How did you fixed it ?
Thank you very much for your help and cooperation
regards
Hi again,
I assume that you are using one or two CTIMERs for generating the signal.
Perhaps you can use the SCTimer instead?
The clock source for the SCTimer is configurable (at least on LPC55S69).
You could for example set it to run on the FRO96MHz clock.
Hope this helps,
Anders
Thank you very much for your suggestions but ....
I'm using NXP LPC5526 as controller of audio device. I use a timer of the processor to generate two square waves that 'must' be stable.
Of course if I change the core clock frequancy I have to change the prescaler or the output compare register of the timer. Is there any possibility to chenge the core clock frequancy without alterate the frequancy of the square waves ?
thank you very much for your help and cooperation
regards
Hi there,
I'm using the LPC55S69. My solution for handling this:
Using the clock diagram page in the MCUXpresso Config tool I defined two fuctional groups which set the PLL output for the system clock to 100MHz and 150MHz respectively. The tool then generates two corresponding functions in clock_config.c that you may use to set/change the CPU core clock.
I then use these two functions to change the core clock when I need to modify the flash content. It works fine.
Regarding the UART baudrate, I'm using the 12MHz internal oscillator, like this.
>CLOCK_AttachClk(kFRO12M_to_FLEXCOMM0);
Then it it is not dependant on the system clock.
Regards,
Anders
Hi @_Ferrari_ ,
here is what I have done in such cases (similar to increasing/decreasing the clock speed for low power modes):
- limit the time/amount of time used for gear switching
- implemented functions like 'ChangeSpeed' for each device driver (UART/I2C/etc) which depend on the core clock
- calling ChangeSpeed functions to change the speed of the modules as needed
Keep in mind that during the speed change there might be still issues, e.g. UART characters not properly detected/etc. To cover these cases, I have implemented additional measures (checksum, CRC, ...) to deal with this and to redo the operation (transmit/receive) if needed.
I hope this helps,
Erich