2015-02-11 06:44 AM
We've got a new board and we can't flash them. I am sending an output from STVP
> Programming OPTION BYTE area... Removing *READ PROTECTION* option, this will ERASE all the device flash memory! < OPTION BYTE programming completed. > Verifying OPTION BYTE area... Error : The device is protected Operation aborted Error : < OPTION BYTE verifying failed. What can I do? #damaged-flash #stvp #option-bytes2015-02-11 09:05 AM
What can I do?
Review what's actually happening with your hardware, and what the System Loader is doing. This sounds like a communications issue. Start by looking the the loaders protocol, and send commands back and forth through the console to understand what is going on.2015-02-11 10:31 AM
I've seen this a few times with F2 and F4 series on a stepper controller board. I asked ST about it but they had no answer. The read protection byte is set and won't clear, blocking JTAG access. Using the serial port boot doesn't clear it either. In one case it happened while checking some lines with a voltmeter while power on, so I suspect it has to do with some kind of transient damaging the option flash memory. I had to scrap the boards, no solution.
Jack2015-02-12 02:33 AM
Ok l a little bit more details:
1)We have got many boards, our own design. Already done several times last years. 2)Now few of them(2 pieces) have this problem. 3)I use a ST Visual Programmer(3.2.9) with ST Link (STM32F415xG) in JTAG mode/SWD mode 4) On the tab ''OPTION BYTE'' I click on the RDP and set ''No protection (Level 0)'' and with a right click mouse click on ''Program current'', other sequences like programm all etc also have been tried. After that I get the error message mentioned above. 5) PB2/BOOT1 is pulldown(47k), BOOT0 is pulldown (47k). TDI, TMS,TDO have pull up (10k). TCK pull down (10k), /RST has C=100n to GND. What else shall I check?2015-02-12 02:53 AM
What is ''System Loader''?
2015-02-12 06:04 AM
We've compared the SWD signals between a ''healthy'' and an ''unhealthy'' board. Same signal's quality. For what shall we look?
2015-02-12 07:45 AM
Hello,
Try with the latest STVP version (3.3.2). Is the Reset pin of STM32F4 device connected to the ST-Link ? You can also try with STLink Utility software. Rgds, Laurent2015-02-12 08:44 AM
My collegue already tried STVP 3.3.1. The same.
I've installed STLink Utility with these results: 17:33:55 : ST-LINK SN : 57FF6D064966505517161667 17:33:55 : ST-LINK Firmware version : V2J23S4 17:33:55 : Connected via SWD. 17:33:55 : SWD Frequency = 1,8 MHz. 17:33:55 : Connection mode : Normal. 17:33:55 : Debug in Low Power mode enabled. 17:33:55 : Device ID:0x413 17:33:55 : Device family :STM32F40xx/F41xx 17:33:55 : Can not read memory! Disable Read Out Protection and retry. 17:34:16 : Read out protection is activated 17:34:36 : SWV Reception started. 17:34:38 : SWV Reception stopped. 17:36:48 : Could not set Option bytes! Please reset the target and retry. In the GUI ''Device Information'' Device: STM32F40xx/F41xx DeviceId: 0x413 Revision ID : Rev Z Flash size:Unknown
I have added a window with option bytes. ________________ Attachments : OptionBytes.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0zS&d=%2Fa%2F0X0000000bh9%2FMHJSvaLwC4MoVHgtkPGP9i04GpjjHdO53TyNxwgbg9k&asPdf=false2015-02-12 09:02 AM
On ST-LINK Utility, try to change the mode in target settings to ''Connect under reset'' (if STM32F4 Reset connected to ST-Link).
Laurent2015-02-12 09:14 AM
Pin /RST goes from 20Pin connector to the STM Pin 7, checked.