Doing some more work on MCU supply current stuff, still looking at the STM32L431...

@azonenberg@ioc.exchange

Doing some more work on MCU supply current stuff, still looking at the STM32L431. Made some circuit tweaks to my current probe.

Still not 100% on the Y axis calibration but the numbers at least look plausible for ST's published typical current values. (And I'm more interested in deltas than absolute values.)

This is an AC coupled measurement so there is a small DC shift (the sleep current shows slightly negative due to the offset from the active period).

For starters, here we have CPU asleep in a WFI (with PLL at 80 MHz and bus clocks and several peripherals active) then waking up and doing a loop of adds, multiplies, XORs with 0xffffffff, SRAM reads of a constant value, SRAM reads of alternating 0x55 and 0xaa, and finally adds again as a control.

This is with a lot of averaging so some high frequency transients aren't visible, we'll get to them in a bit.

Initial observations:
* Multiplication uses almost twice as much power as adding or XORing even if the XOR is flipping every bit in the register
* Power consumption of SRAM reads varies drastically based on how many bits on the AHB bus are toggling since the previous transaction