cancel
Showing results for 
Search instead for 
Did you mean: 

ST-Link Utility External Loader sources

lukasz589
Associate II
Posted on August 20, 2015 at 21:55

Hello!

I have custom board with STM32F746NG, sdram and NOR flash Spansion S29GL128S10 mapped at 0x6000 0000. I tried to download bin file into nor using external loader (used STM32F756G-EVAL) M29W128GL looks very similar to S29GL128S. Writing few bytes works perfectly, sector erase too, mass erase doesn't. Writing larger bin file (~1MB) doesn't work...

In ST-Link directory are only few sources... Is it possible to get project for STM32F756G-EVAL?

One thing more.

I am exploring M29W128GL_STM3210E-EVAL example project and in file stm3210e_eval_fsmc_nor.c I can see makro that is used with write operation

#define ADDR_SHIFT(A) (Bank1_NOR2_ADDR + (2 * (A)))

Why A is multiplied by 2?

4 REPLIES 4
Posted on August 20, 2015 at 23:07

Probably because it's an 16-bit data path device, and A0 (from the STM32) isn't connected, and you need to present the ''magic'' addresses to the bus.

Bit 1 of the STM32 address bus connects to pin A0 of the NOR, bit 14 to A13, etc

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lukasz589
Associate II
Posted on August 21, 2015 at 07:46

On STM3210E's schematic A0 is connected to a PF0 (FSMC_A0).

Posted on August 21, 2015 at 16:40

On STM3210E's schematic A0 is connected to a PF0 (FSMC_A0).

And this connects to Bit 1 (NOT BIT 0) of the STM32's internal address bus for 16-bit accesses. The magic address has to shift so the data presented on the FSMC_Ax bus is the pattern the NOR device is looking for.

Would suggest a review of the FSMC section of the Reference Manual, and Data Manuals.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lukasz589
Associate II
Posted on August 21, 2015 at 23:18

Now I see! Thank You very very much 🙂