what i did :
1. i set the lpc54606 main_clk:48Mhz
2. I initialize a GPIO as output, then in main i did this:
so i got a clk . but the frequency is 750khz according to my oscilloscope. I think it should be 24Mhz . Why?
forgive my poor English.
thanks.
Hello yangyong wu ,
Yes, as Con Verse said, the function " GPIO_PortToggle" not only one instruction.
You can check the instructions on Disassembly view. For MCUXpresso IDE example, you can open it as below:
Hope it helps,
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Because you are executing MANY more than a single instruction when calling the function GPIO_PortToggle. Assuming that you have set up your clock correctly, I'd calculate that you are executing approx 15 instructions to toggle the GPIO.