cancel
Showing results for 
Search instead for 
Did you mean: 

Error: verification of flash memory failed after write operation

sandeep2
Associate II
Posted on July 10, 2009 at 01:00

Error: verification of flash memory failed after write operation

12 REPLIES 12
sandeep2
Associate II
Posted on May 17, 2011 at 15:03

Hey Jatin and Morza,

The HSE clock frequency is 16 Mhz.

-SU

jatin
Associate II
Posted on May 17, 2011 at 15:03

Hi Sandeep,

The clock switching sequence should be like:

/* Disables Switch interrupt */

CLK->SWCR &= (u8)(~CLK_SWCR_SWIEN);

CLK->SWCR |= CLK_SWCR_SWEN; // Enables Clock switch

CLK->SWR = (u8)CLK_SOURCE_HSE;

while((CLK->SWCR & 0x01)); // wait for SWBSY to get cleared

Pls try this sequence and let me know.

floodever
Associate II
Posted on May 17, 2011 at 15:03

Dear all,

I think he should check the load capacitance of the 16M OSC.Connect the OSC correctly according to datasheet.Change capacitor size to 22pF and try...