2008-03-07 04:47 AM
FLASH programming
2011-05-17 03:25 AM
Hi wobble, STOne-32
I have also the same pb :( anyone could help us to understand how the flash is clocked when programming ? It seems that the charge pump is using the internal RC (HSI). Thanks , Asterix.2011-05-17 03:25 AM
Dear All,
I am trying to get FLASH programming & erasing working. I have successfully got the ST Flash example program to work. I have my own RCC clock setup. When I use that, the flash does not program properly. Since I'm not using the ST library, I've turned off the HSI oscillator (since I've got an external crystal). If I disable HSI, flash programming doesn't work. If I enable HSI, it does! I can't seem to find it in the manuals, but I assume the HSI clock is used for programming the flash? Is this correct? Thanx.2011-05-17 03:25 AM
Dear asterix, wobble,
You are right and this information is already mentioned in Flash programming manual PM0042: Page 9/31. It is more clear now ? :) Cheers, STOne-322011-05-17 03:25 AM
Thanks ST-One, I missed that!
2011-05-17 03:25 AM
where do we enable the HSI oscillator.
I was looking at the example code under the flash section I could not see where we enable the HSI oscillator. In the function void RCC_Configuration(void) I could see how we enable the HSE oscillator not HSI.2011-05-17 03:25 AM
Hi smart.avr
In my code, I'm accessing the RCC Control register directly. The HSI is bit 0. Not using the libraries, but here's my code: #define STM32_RCC_CR_HSION 1 //Turn on the internal oscillator RCC->CR = RCC->CR | STM32_RCC_CR_HSION; Hope this helps. :)2011-05-17 03:25 AM
@smart.avr,
haven't seen the example you mention, but I believe the HSI will be enabled unless you specifically turn it off.2011-05-17 03:25 AM
if you download the ARM-based 32-bit MCU STM32F101xx and STM32F103xx firmware library under that you will get the UM0427 Zip file.
Over there you can find out the 2 example code under the flash section.