cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 FSMC physical addressing

Bertrand PICARD
Associate II
Posted on July 04, 2017 at 12:56

Hello everybody,

I am a new ARM microcontroller user.

I drive a winstar 3,5' display (SSD1963 embedded) with a STM32F4-discovery board.

I use FSMC to drive the display with 8080 mode.

To drive the input D/C# (Data / Command) I use FSMC address A19 (PE3).

It works fine if i use the code below :

#define LCD_REG (*((volatile unsigned short *) 0x60000000)) /* DC = 0 */

#define LCD_RAM (*((volatile unsigned short *) 0x60100000)) /* DC = 1 */

The questions are:

- Why I need to write '1' to bit #20 to switch A19 to '1' ?

- Why I cannot use bit #19 rather than bit #20 ?

Thanks in advance

Regards

BP

#stm32f407-fsmc-physical-addressing

Note: this post was migrated and contained many threaded conversations, some content may be missing.
12 REPLIES 12
Posted on November 27, 2017 at 18:05

It is a Dual-Port-Memory which is inside a netX51 from Hilscher.

https://www.hilscher.com/fileadmin/cms_upload/en-US/Resources/pdf/netX_51_52_Design-In_Guide_DG_08_EN.pdf

(page 39 and following)

This chip is highly configurable, so its not that easy to find all information in one datasheet. I had some contact with Hilscher support and they gave me the information, that the memory is byte-addressed.

I do not insist on 32-bit bus. This was just an example to get only 8 bits.

Here is a part of the data structure in that memory of netX51 from address 0x00. As you can see there is data which is 8-bit, 16-bit or 32 bit wide and there is also a data container on a higher address to exchange lot of data. Sometimes I need just one byte but most time I have an array of data to transfer or receive. So it make sense to have a 32-bit bus for fast transfer. next to this memory I also have a SDRAM on the same 32-bit FMC bus and this works without problems.

0690X00000608yNQAQ.png

And here is the memory viewer during debugging my STM32. As you can see at address 0x60000000 there are 4 bytes (0x6E657458), these are interpreted as characters (abCookie[4] in picture above), which means ''netX''. Then at address 0x60000010 there is the ulDpmTotalSize. But this data I would expect at address 0x60000004. But at this address there is again the ''abCookie'' only the lowest byte is missing. This is because of this address shifting in STM.

The data in column 0-3 is correct, but I have to calculate the addresses, to get data from the memory as in the picture above.

0690X00000608yIQAQ.png

Dani

Posted on November 27, 2017 at 18:15

Something is wrong. You are supposed to see offset 0x0004 at 0x60000 Show us how did you connect things.

JW

Posted on November 27, 2017 at 18:27

Okay, so looking at the pdf, the 32-bit connection appears to be an afterthough... I'd connect it this way:

0690X00000608qoQAA.png

JW