Posts

Showing posts from April, 2020

GD32F3 not really clone of STM32F3

Image
Just before the virus outbreak, i bought a few G32F303 from LSCS It ends up they are *not* alternatives to STM32F3 They are beefed up STM32F1, with  a M4 core, more ram, more flash and faster ADC/DAC It might end up as a good thing, as they run the F1 code without problem (as far as i ve seen so far) Time to update the DSO shell with a new MCU it boots and seems to work :)

Inside a rechargeable desktop lamp

Image
I bought this lamp a while back on amazon It is really handy, cheap, no cable attached, and  usb rechargeable. Lately i noticed it was discharging REALLY fast, with very little use Time to open it up : 1: SMD - 312F- Battery protection circuit 2: SMD - 8205- Mosfet 3: SMD - 57ba - Battery charge circuit 4 HC8T046 - small MCU So there is a protection circuit on the main board, and none on the battery itself. Let's look at the battery : 1200 mA/h on the package, that's not much to start with. Let's check how much there is actually : ..... 600 mA ! It decayed really fast already. Let's put a spare battery from an old laptop  instead, measured at 1300 mA and back in business

BlackMagic + FreeRTOS: yes we can

Sometimes it really helps to have RTOS support in the debugger (i.e. gdb), that would be FreeRTOS in our case. But sadly, my beloved blackmagic does not support it and i dont like much St link v2+ openOcd (tastes & colors...) So let's modify a github project  to add the function we need  : new  Git Hub Project: armFreeRTOS-GDB Short version : List the tasks, their status and be able to switch the active one (sort of) Current state   (gdb) source ~/FreeRTOS-GDB/src/FreeRTOS.py   (gdb) show Task-List     0   TCB: 0x20001160 Name:    MainTask State:Delay1 TopOfStack:0x200010f0                    LR=0x8005fa7 PC=0x8006078 SP=0x20001130 function=vTaskDelay   1   TCB: 0x20001348 Name:      dummy1 State:Delay1 TopOfStack:0x200012f0                    LR=0x8005fa7 PC=0x8006078 SP=0x20001330 function=vTaskDelay   2   TCB: 0x20001530 Name:      dummy2 State:Delay1 TopOfStack:0x200014d8                  LR=0x8005fa7 PC=0x8006078 SP=0x20001518 function=vTaskDelay   3 * TC