<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Error: Flash Download failed - &amp;quot;Cortex-M3&amp;quot; after FLASH_EnableWriteProtection</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/24560/error-flash-download-failed---cortex-m3-after-flash_enablewriteprotection</link><description> 
Hi. 

 
I was trying to protect my custom bootloader pages but the
call 

 
FLASH_EnableWriteProtection
 

 
always returned with error, so I followed the advice at 

 
 www.st.com/.../forums-cat-8438-23.html 

 
and found that 

 
FLASH_EnableWriteProtection</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Error: Flash Download failed - "Cortex-M3" after FLASH_EnableWriteProtection</title><link>https://community.arm.com/thread/115204?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2009 05:26:17 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e63ccfe1-5728-4654-8ee3-1254ede9f581</guid><dc:creator>M D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Yes, I also tried that.&lt;br /&gt;
The flash erase returns ok (&lt;i&gt;Full Chip Erase Done&lt;/i&gt;), but then if
I try to Download or to start the debugger I get the usual error
(&lt;i&gt;Error: Flash Download failed - &amp;quot;Cortex-M3&amp;quot;&lt;/i&gt;), both with blinky
project any my.&lt;br /&gt;
I included the option key programming file and its algorithm in my
project and then selected &lt;i&gt;Erase Sectors&lt;/i&gt; instead of &lt;i&gt;Erase
Full Chip&lt;/i&gt; as stated in&lt;br /&gt;

&lt;a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka12723.html"&gt;infocenter.arm.com/.../index.jsp&lt;/a&gt;&lt;br /&gt;

It seems to works!&lt;br /&gt;
Thanks a lot!&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: Flash Download failed - "Cortex-M3" after FLASH_EnableWriteProtection</title><link>https://community.arm.com/thread/103388?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2009 05:13:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:71aabf09-65f6-492c-a2ff-81cac317fdf9</guid><dc:creator>Robert &amp;#160;</dc:creator><description>&lt;p&gt;&lt;p&gt;
You need to use &lt;i&gt;ULINK Cortex Debugger&lt;/i&gt; and erase the
Flash.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: Flash Download failed - "Cortex-M3" after FLASH_EnableWriteProtection</title><link>https://community.arm.com/thread/92109?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2009 05:06:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2c7a002e-c8d8-47e7-b888-302a0d59b77e</guid><dc:creator>M D</dc:creator><description>&lt;p&gt;&lt;p&gt;
Robert,&lt;/p&gt;

&lt;p&gt;
I opened the blinky project and noticed that under &amp;#39;&amp;#39;utilities&amp;#39;&amp;#39;
it uses &lt;b&gt;Signum system JTAGjet&lt;/b&gt;. The debug instead is correctly
set to &lt;i&gt;ULINK Cortex Debugger&lt;/i&gt;.&lt;br /&gt;
If I use this project without changes the debugger starts and the
propgram seems to works(all the board leds turn on in sequence).&lt;br /&gt;
The Flash menu commands don&amp;#39;t work and they cause the following
error:&lt;/p&gt;

&lt;pre&gt;
Emu=JTAGGjet;Port=USB emulator canot be found
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
Anyway, after that I turned back to my project and found the same old
problem (Error: Flash Download failed - &amp;quot;Cortex-M3&amp;quot;).&lt;br /&gt;
I was thinking about including option keys programing in my project
but I noticed that if I change the target driver to &lt;i&gt;ULINK Cortex
Debugger&lt;/i&gt; (the right one for me) in the blinky project I have the
same error (Error: Flash Download failed - &amp;quot;Cortex-M3&amp;quot;) with BOTH
debugger and flash commands.&lt;/p&gt;

&lt;p&gt;
I&amp;#39;m confused :-)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Error: Flash Download failed - "Cortex-M3" after FLASH_EnableWriteProtection</title><link>https://community.arm.com/thread/56731?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2009 04:30:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a35f08da-b370-4e6d-810e-7dc2369befec</guid><dc:creator>Robert &amp;#160;</dc:creator><description>&lt;p&gt;&lt;p&gt;
You should be able to remove the Flash protection with uVision and
ULINK.&lt;/p&gt;

&lt;p&gt;
- open project Keil\ARM\Boards\Keil\MCBSTM32\Blinky in your MDK
installation&lt;br /&gt;
- change target to &amp;quot;MCBSTM32 + OPT&amp;quot; (programs also option bytes)&lt;br /&gt;
- optionally edit the STM32F10xOPT.s file using the Configuration
Wizard (default values will already remove Flash Write
Protection)&lt;br /&gt;
- program flash (Blinky application together with option keys) or
just execute Flash\Erase&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>