2012-07-01 04:32 AM
FSMC_Bank1->BTCR[0] = //FSMC_BCR2_EXTMOD |
FSMC_BCR2_WREN | FSMC_BCR2_FACCEN | FSMC_BCR2_MWID_0 | FSMC_BCR2_MTYP_1 | FSMC_BCR2_MUXEN | FSMC_BCR2_MBKEN; FSMC_Bank1->BTCR[1] = (2 << 8) | // DATAST = 2 (1 << 4) | // ADDHLD = 1 (2 << 0); // ADDSET = 2 FSMC_Bank1E->BWTR[0] = (2 << 8) | // DATAST = 2 (1 << 4) | // ADDHLD = 1 (2 << 0); // ADDSET = 2 If EXTMOD = 0, so good. If EXTMOD = 1, FSMC does not generate NL (NADV) and address (an error when writing and reading). In what may be the problem? This is a bug stm32f407VG?2012-07-01 11:25 AM
There is a bug(s) in your code or hw. Extended address mode assumes you need two ALE strobes, for complex addressing modes. I used to connect external RAM (1MByte) to STM32F4-Discovery board (with my ZP_DSF4 dockstation) in mux mode and all works perfectly.
2012-07-04 11:41 AM
I only use stm32f4discovery, the signals look oscilloscope (a bug in the hardware can not be).
I have two programs differ only in one line (bug in the software may not be): FSMC_Bank1-> BTCR [0] = / / FSMC_BCR2_EXTMOD ... - Works MUX FSMC_Bank1-> BTCR [0] = FSMC_BCR2_EXTMOD ... - Does not work MUX (stm32f407 does not give AL and Address on the bus, but the gates are WR, RD and Data these issues).2012-07-04 02:59 PM
YOUR software may contain bugs or improper FSMC initialization. I can assure with right implementation it works fine.
Here you are. My docking station for STM32F4-Discovery:http://www.zaurosoft.com/images/ZP_DSF4/ZP_DSF4_08.jpg
Timings (not optimal, just for test) for the external RAM in mux mode:http://www.zaurosoft.com/images/ZP_DSF4/MuxRAM.png
You see the running code as follows:*(uint16_t *) (Bank1_SRAM1_ADDR + 0x02) = 0xaa;
*(uint16_t *) (Bank1_SRAM1_ADDR + 0x10) = 0x55; *(uint16_t *) (Bank1_SRAM1_ADDR + 0xf0) = 0x18;*pBuf++ = *(uint16_t*) (Bank1_SRAM1_ADDR + 0x02);
*pBuf++ = *(uint16_t*) (Bank1_SRAM1_ADDR + 0x10); *pBuf++ = *(uint16_t*) (Bank1_SRAM1_ADDR + 0xf0); Due to 16 bit access offsets 0x02, 0x10 and 0xf0 seen as 0x01, 0x08 and 0x78.