2014-11-26 07:51 AM
I used JFlash to program the bootloader & application FW into STM32F103RC on board via Jlink.'Secure chip' was enable. The unit is able to upgrade the application FW via USB and this worked fine. The bootloader remove the protection, write the new firmware and enable the protection again.
Recently I wanted to modify the bootloader via USB. The idea was to upgrade an application FW first. This application FW was allowed to accept a bootloader image via USB. It was then expected to remove the protection, replace the bootloader and enable the protection again.
I tried some available functions such as
FLASH_Unlock(),
FLASH_ReadOutProtection(DISABLE)
Anyway, I failed to program the bootloader successfully.
Does anyone know the method to achieve this purpose?
(Remark: If I disable 'Secure chip' during JFlash step in the beginning, I find USB upgrading for bootloader can succeed.)
2014-11-26 08:16 AM
Disabling the read-out protection will mass erase the part, including your application, assuming you can't keep functioning under those conditions.