cancel
Showing results for 
Search instead for 
Did you mean: 

The firmware loads just fine, but how come the Option Bytes fail? Even if I change absolutely nothing except the Option Bytes, it fails. What is wrong with what I am doing?

MrSassyBritches
Associate

Hello, I am using an STM32F303CC MCU and I am able to successfully upgrade the Internal Flash, but any time I try applying the update to the Option Bytes I get the following error: "Target 01: Unable to find data for that device/target from the file..."

Target 01 is the Option Bytes, according to Dfuse Demo.

Things I have tried

Apply a firmware file without Option Bytes - WORKS

Apply a firmware file to Option Bytes, and not Internal Flash - ERROR (Target 01: ...)

Select/Deselect "Verify after download" - ERROR

Select/Deselect "Optimize Upgrade duration" - ERROR

All of the above with .dfu .bin and . hex - SAME RESULTS

Tools I have tried

DfuSe Demo

CUBE Programmer

dfu-util

(and about a dozen forks of these found around GitHub)

I went into the assembly file we are using to generate the .dfu and found the part relevant to the Option Bytes Read Protection and am pasting it. I did not make this, i was generated by someone else from some of your tools. I believe the issue to be in this section of the code, but I do not know assembly.

;// <e> Flash Option Bytes

FLASH_OPT       EQU     1

; // <h> Flash Read Protection

; //     <i> Read protection is used to protect the software code stored in Flash memory

; //   <o0> Read Protection Level

; //     <i> Level 0: No Protection

; //     <i> Level 1: Read Protection of Memories (debug features limited)

; //     <i> Level 2: Chip Protection (debug and boot in RAM features disabled)

; //          <0xAA=> Level 0 (No Protection)

; //          <0xA5=> Level 1 (Read Protection of Memories)

; //          <0xCC=> Level 2 (Chip Protection. It's no more possible to go back to level 1 or 0!)

; // </h>

RDP             EQU     0xA5

nRDP            EQU     RDP:EOR:0xFF

Any sort of help you could provide would be greatly appreciated. Please let me know if there is any other information you need to assist me. :)

0 REPLIES 0