GDISP driver

colombo
Posts: 3
Joined: Sun Sep 02, 2012 5:11 pm

Re: GDISP driver

Postby colombo » Sun Sep 02, 2012 8:11 pm

Hi Abhishek,

thank you for your reply.
Abhishek wrote:Here's the pin assignment, hope this should clear your confusion:
FSMC_NWE = WR Signal of LCD
FSMC_NOE = RD Signal of LCD
FSMC_NE1 = CS Signal of LCD
Good :)

Abhishek wrote:The Address pin is connected to RS which is the A16 pin on the F4
I was lost D11 pin alternate and the comment /* Using FSMC A16 as RS */

Abhishek wrote:And yes, you're right. We'll update the code soon, so that the I/O layer for all the FSMC/GPIO drivers for the QVGA LCDs and SSD1963 is in sync.
Thank you for this work.

I see in STM32F4Discovery some pins of FSMC is shared with other peripherals, for example PD4/FSMC_NOE is connected to Audio_Rst and has a 10K(R43) pull-down.
Does not create problems?

Another doubt

Code: Select all

/* Using FSMC A16 as RS */
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define LCD_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */

0x60020000 => 1100000000000100000000000000000
Does set A17? Is it correct?

Best Regards
colombo

User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm
Location: Bath, UK
Contact:

Re: GDISP driver

Postby Badger » Sun Sep 02, 2012 8:29 pm

colombo wrote:I see in STM32F4Discovery some pins of FSMC is shared with other peripherals, for example PD4/FSMC_NOE is connected to Audio_Rst and has a 10K(R43) pull-down.
Does not create problems?


On my board I removed the chips, resistors etc that had shared features with FSMC. I'm not sure if it was necessary, I did it as part of troubleshooting whilst implementing the FSMC code and found the problem to be elsewhere, but didn't bother putting the chips back.

Another doubt

Code: Select all

/* Using FSMC A16 as RS */
#define LCD_REG (*((volatile uint16_t *) 0x60000000)) /* RS = 0 */
#define LCD_RAM (*((volatile uint16_t *) 0x60020000)) /* RS = 1 */

0x60020000 => 1100000000000100000000000000000
Does set A17? Is it correct?

I was also somewhat confused by this convention, but it does indeed seem to be correct, even if it goes against intuition.

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: GDISP driver

Postby mobyfab » Sun Sep 02, 2012 9:37 pm

I only removed the USB over current resistor

The address pin is A16.

User avatar
Tectu
Posts: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: GDISP driver

Postby Tectu » Sun Sep 02, 2012 9:54 pm

Thanks for your contribution, Mobyfab!!!

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: GDISP driver

Postby mobyfab » Mon Sep 03, 2012 1:14 pm

Tectu wrote:Thanks for your contribution, Mobyfab!!!


You're welcome ;)

Now working on GWEN :D

colombo
Posts: 3
Joined: Sun Sep 02, 2012 5:11 pm

Re: GDISP driver

Postby colombo » Mon Sep 03, 2012 2:03 pm

mobyfab wrote:I only removed the USB over current resistor
47K R51 Pull-up 3V. Rigth?

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: GDISP driver

Postby mobyfab » Tue Sep 04, 2012 6:26 pm

Don't remember, check on the discovery datasheet :)

Otherwise I have started integrating GWEN to ChibiOS: http://github.com/mobyfab/ChibiOS-Gwen

It compiles but does nothing as I haven't really started to port it.
it *should* not be too complicated to port.

There is an example here: https://github.com/mobyfab/ChibiOS-Examples/tree/master/STM32F4-LCD-GWEN

FYI the code is around 308k with GWEN displaying a skinned button.
The gdisp demo is 14k in C, 245k in C++. So the GWEN overhead is around 63k.

miguelmoreto
Posts: 15
Joined: Thu Jun 28, 2012 9:21 pm
Location: Brazil
Contact:

Re: GDISP driver

Postby miguelmoreto » Tue Sep 04, 2012 11:39 pm

To Badger and colombo:

0x60020000 => 1100000000000100000000000000000
Does set A17? Is it correct?


This address sets A16. FSMC controller shifts it right by 1 when FSMC is used to address data of 16bits. See Table 164, page 1227 of STM32F407VG reference manual (document DM00031020).

I had the same doubt until reading this FSMC documentation.

Best regards,

Miguel

User avatar
Badger
Posts: 346
Joined: Mon Apr 18, 2011 6:07 pm
Location: Bath, UK
Contact:

Re: GDISP driver

Postby Badger » Tue Sep 04, 2012 11:52 pm

miguelmoreto wrote:This address sets A16. FSMC controller shifts it right by 1 when FSMC is used to address data of 16bits. See Table 164, page 1227 of STM32F407VG reference manual (document DM00031020).

I spent a little while trying to understand what was going on, thanks for the explanation :oops:

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: GDISP driver

Postby mobyfab » Wed Sep 05, 2012 3:03 pm

Found out the string class is taking up around 120k of code :lol:

I'll try to find an alternative, much lighter class.

The C++ example takes 18K of code without the string class or using new.
with new it goes up to 90K of code.


Return to “LCD Driver and Graphic Framework”

Who is online

Users browsing this forum: No registered users and 31 guests