cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Disco Flash IAP questions

Phillips Jr..Clyde
Associate III
Posted on July 04, 2014 at 02:48

I program in assembly language. I need hardware calrification, not c code please.

1) The parallelsim setting for USB/St-Link power would be x32? (PSIZE=10). Ie I understand the external power option whic I would be supplying but for the ST-Link supplied power is this a correct understanding?

2) The Standard Programming section of RM0090 implied that you write a word ( with x32 parallelism setting ) at a time with each word write ''ack'd'' by waiting for the BSY bit to be cleared. Is this correct understanding.

3) Access to flash code execution is mentioned in a way that implies it os ''tricky'' Does this mean that I can't execute code in flash sector 1/2 to program other sectors?

Thanks, Clyde

2 REPLIES 2
Posted on July 04, 2014 at 03:16

The STM32 parts achieve execution while programming by stuffing wait states and stalling the processor. This can stall the processor for a significant amount of time, often beyond the service windows of peripherals (USART, SPI, etc). Both Write and Erase will cause this to occur. The processor will crash if you erase the sector you are executing from. ST does have a couple of Dual Bank devices (F1 XL 1MB, F4 2MB) where write/erase in one bank will not impeded execution in the other. Watch out for interrupts to FLASH based code.

I have some assembler flashing code for the F1/F2/F4 parts, and RAM based execution, would be willing to discuss privately. sourcer32@gmail.com
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Phillips Jr..Clyde
Associate III
Posted on July 06, 2014 at 02:23

Clive,

I sent you an email and it didn't bounce, so maybe see if it's being segregated....

Thanks, Clyde