Skip to main content

Posts

Showing posts from April, 2018

Tracing a Bluepill

Did you know the lowly STM32F103C8 has non-invasive trace logic along for the ride? Did you also know that via program control: 1) Trace can be enabled out to a pin on the board (PB3). 2) 32 channels can be used to emit 32, 16 or 8bit (char) values from running code. Useful to monitor values from your code. 3) A cycle count can be emitted 4) Data Watchpoints can also be reported. See a picture below. Showing SysTick exception handling: Showing a sensor range value being emitted on channel 16 (that's the max 1FFE in mm's btw) Showing a watchpoint on the read modify write of the Green LED on PC13 (HW watchpoint on: BSRR @0x40011010). Also an Overflow is seen (first time I have seen that actually). Can be mitigated by bumping the output rate. Bluepill shown with a VL53L10X range sensor. The trace is the yellow wire connected to TRACESWO PB3 and green wire is connected to GPIO1 from the sensor. That is plumbed up to go low when a new sample is re...