---
** [tickets:#87] STM32L0 invalid option bytes leads to read out protection and
mass erase**
**Status:** new
**Milestone:** 0.9.0
**Labels:** stm32lx flash
**Created:** Thu Dec 18, 2014 11:44 AM UTC by top4z
**Last Updated:** Thu Dec 18, 2014 11:44 AM UTC
**Owner:** nobody
Dear support,
I've been using OpenOCD for years, and astonishingly I never been bothered by
any bug. So first, congrats guys for such a convenient tool.
Today I've switched to a new board the STM32L053-nucleo. And I'm facing a
strange problem regarding the option bytes invalid programming. This leads to a
read out protection level 1 (+mass erase) to be activated whenever I power
cycle (not reset) the device.
I dug into the problem and here is a patch to fix the problem. The problem
seems to be that an invalid option byte value is programmed.
The following patch completely fixes the problem. The device is not in read out
protection level 1 (+mass erase) anymore after power cycled.
~~~~~~~
*** ../openocd-git-master/src/flash/nor/stm32lx.c 2014-12-03
09:10:20.000000000 +0100
--- src/flash/nor/stm32lx.c 2014-12-18 12:29:24.000000000 +0100
***************
*** 98,99 ****
! #define OPTION_BYTE_0_PR1 0x015500AA
! #define OPTION_BYTE_0_PR0 0x01FF0011
--- 98,99 ----
! #define OPTION_BYTE_0_PR1 0xFFEE0011 // !=CC (level 2) && !=AA (level 0) =>
level 1
! #define OPTION_BYTE_0_PR0 0xFF5500AA // level 2
~~~~~~~
I'm glad I participated to this amazing project.
Cheers,
Topaz.
---
Sent from sourceforge.net because [email protected] is
subscribed to https://sourceforge.net/p/openocd/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/openocd/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel