Tags: xMasterX/all-the-plugins
Tags
VGM Tool: make the SWDIO direction switch atomic (#262) swd_turnaround() flipped SWDIO with a raw LL_GPIO_SetPinMode(), a read-modify-write of GPIOA->MODER done with interrupts enabled. SWDIO is PA13, and PA9/PA10 in that same register are the internal I2C bus - fuel gauge, charger, LED driver - which the power service reconfigures around 19 times a second. A turnaround preempted between the load and the store wrote back a stale value and pulled those pins out from under an I2C transaction in flight. Measured on f7 hw_ver 12: 19.6M unguarded turnarounds over 15s produced 15 mid-transaction MODER clobbers against ~290 I2C transactions, with bursts of bq27220_read_word failed alongside; the same loop inside FURI_CRITICAL produced none. The gauge was left with OperationStatus.INITCOMP stuck at 0 until a reboot, which is the symptom in DarkFlippers/unleashed-firmware#961. Also adds the changelog the app never had, filled in retrospectively, and takes the version to 1.4 - this copy already carried upstream's 1.3 change without the manifest being bumped for it.
PreviousNext