As a quick test - use the original firmware & program it into the device using a 7.3728 MHz clock (default).
Then try adjusting the CLKGEN frequency up & at the same time adjust the target baud to scale. For example if you set it to 16 MHz, the new baud will be 16/7.3728*38400 = 83333.
The ADC will only work up to 105 MHz. So be sure to set the ADC clock generator mode as the “clkgen_x1” instead of the default (“clkgen_x4”).
At some point may need to adjust flash wait-states. See the file stm32f3_hal.c:
PS - The ChipWhisperer serial should work up to at least the 250K baud that running the stock firmware at 48 MHz would suggest. However the wait state problem might be an issue to ensure you switch to external clock only after wait states setup. I don’t know the upper limit of XTAL in freq, you might need to use a slower clock (12 MHz) that is multiplied internally.
Hi Colin,
thanks for the answers and tests, I will test them with my setup shortly.
I am also looking at clocking the chip internally (i.e. the USE_INTERNAL_CLK setup) because for example the STM32F0 is limited to 32MHz when clocked externally. However, looking at the layout of the CW308 target board for the STM32F chips, the CLK OUT pin of the chip is not routed to CLKFB/HS1/IN for CW to lock into. Is using the internal oscillator thus not supported?
On those boards I think it was too varied between product series, that we didn’t bother routing the CLKOUT. In which case the default boards wouldn’t let you directly use this method unfortunately! If you can route CLKOUT to some other pin that could be routed to ChipWhisperer that could work.