Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 7 months ago.
why overclocking benefits are better than expected on LPC1768
Hi everyone , I tried to generate a clock at 10MHz on a pin, and i also send data to a DAC in a routine. I have to do all this in 100ns so I have overclocked my CPU and it works. But when I increase the CPU clock at 108% I have the speed of the clock on my pin increased at 125%. I don't understand why. In theory even if the CPU is a bottleneck it should increase the same. Anyone has an idea? Thanks for your answer. Regards. Élie.
How do you generate that clock?
posted by Erik - 08 May 2016Hi Erik, I generate that clock by writing : LPC_GPIO0->FIOSET=0x00000010; LPC_GPIO0->FIOCLR=0x00000010; and I overclock the CPU by using the fonction SetSystemFrequency Élie
posted by Elie GOZLAN 08 May 2016And of course I write the 2 first instructions in a loop.
posted by Elie GOZLAN 08 May 2016I hoped you used PWM, but if you do it like this I can't really explain why you see that. How do you measure the frequency of that pin?
When I google that function name it shows as an mbed lib which returns the set frequency. Did you verify this is indeed 108% of nominal?
posted by Erik - 08 May 2016Hi Erik, I measured the frequency of the pin with an oscilloscope, and I verify the frequency of the CPU clock with the lib which returns the frequency of the CPU clock. I know the speed do not depend only of the CPU clock, it depends also of the architecture of the microcontroler, the bus speed. But I agree you it's possible to have less than expected, but not more.
posted by Elie GOZLAN 09 May 2016