Got a question on the clocking in the Hercules, and I guess microcontrollers in general (still somewhat new to microcontrollers, especially the intricacies). What is the dependency on the the peripheral and system clock and instruction execution? So the CPU executes at up to 330MHz, but when I toggle the a pin on and off (just sit in a while loop and switch the pin voltage high and low, nothing else), I get an output frequency of about 3.4MHz when the peripheral clock is running at 75MHz. This makes sense since this means that it takes about 140ns to switch (a load and store instructions take about 5 cycles each, and at 75MHz that is 133ns, plus another instruction or two in there).
So, my question is, when is each clock used? When executing an instruction that needs a peripheral, does the execution clock "switch" (CPU clock is used until something needs to be stored in a peripheral register), effectively lowering the execution speed? I'd imagine that this is the case since there may be dependencies/linearity needed when executing instructions (don't want to start an instruction if the peripheral based instruction needs to finish first).
I've also been wondering, what is the difference between the system clock and the CPU clock? I'm guessing that the CPU clock just runs the CPU instructions (CPU register access, ALU stuff, etc...) and the system clock does data transfers between the different subsystems (memory, cache, bus access, etc...).
Hopefully those questions make sense, I'm still trying to sort it out in my head a bit. Also, if this subject is already in some documentation, just let me know where it is since I haven't seen anything that really describes this stuff.
Thanks,
Max