2015-08-20 12:55 PM
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?
2015-08-20 02:07 PM
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, etc2015-08-20 10:46 PM
On STM3210E's schematic A0 is connected to a PF0 (FSMC_A0).
2015-08-21 07:40 AM
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.2015-08-21 02:18 PM
Now I see! Thank You very very much :)