Posts

Showing posts with the label firmware

How to read protect STM32 microcontrollers

Image
Pretty much all that is needed to enable RDP (read protection) is to enable level 1 of the protection by writing values between 0xAA - 0xCC to a specific register.   If you are using the STM32 HAL library you can check my integration as part of the function  FlashAdapter_setReadProtection  and function  ActivateProtection . After enabling RDP level 1 the whole flash will be read-protected. Once you decide to disable it the whole flash will be wiped out and no one will be able to read your binary. This is now part of the IMBootlaoder code. Once when you enable RDP protection all code is protected. The cool thing you can still update your firmware code by using the IMFlahser application, without disabling RDP .  You can ignore PCROP (Proprietary code readout protection). It is a cool feature that SMT32 also has, but I'll cover this in some future posts. 

Inside Turnigy AE-65A

Image
If you are trying to flash your Turnigy AE-65A ESC but you are not sure what MCU is inside, here is the answer. Inside is Silicon Labs C8051F310 MCU, the same one as inside Turnigy AE-45A. So that means you can flash it with BLHeli firmware for 45A version? I'm pretty sure the answer is yes but I didn't test it yet. If I do that I will post it here. Here are some pictures from inside. I have checked pinouts and they are same as those on AE-45A. Image 1 - C8051F310 with pinouts for C2 interface Link to datasheet: https://www.silabs.com/documents/public/data-sheets/C8051F31x.pdf   Image 2 - C8051F310 Pinout Diagram Image 3 - before disassembling Image 4 - the bottom side of the upper part after disassembling