enrico.dallavia Posted October 14, 2015 Report Posted October 14, 2015 Hi to all,Is the information written at http://wiki.ugfx.org/index.php?title=Display_Driver_Model be enough to try to implement the support of the new hardware? I mean the functions I need to implement to make it work.I have a board (not the discovery) with stm32F429 processor and I have to use a KOPIN LCOS controller A913. It is connected with display signals, 8 bit luminance and I2C.So the pin I will use areLCD_G0 with PA6LCD_G1 with PG10LCD_G2 with PB10LCD_G3 with PB0LCD_G4 with PA11LCD_G5 with PA12LCD_G6 with PB1LCD_G7 with PG6LCD_VSync with PA4LCD_HSync with PC6LCD_PCLK with PG7The system has a 8 Mbyte of pSRAM as a frame buffer connected to FSMC controller, so can I look inside stm32f4xx_fmc.c as an "inspiration"?Thanks for the suggestions.Enrico
Joel Bodenmann Posted October 14, 2015 Report Posted October 14, 2015 Yes, that article should contain all the necessary information to write your own display driver and board files.To use your display with uGFX you need to do two things:Write a display driverWrite a board fileDisplay DriverThe display driver is represented by a folder in /drivers/gdisp. The display driver is the part that knows how to initialize the controller and how to manipulate the frame buffer content. There are three different types of how to implement a display driver and the wiki article you linked explains all three of them. Which one you are going to use depends on your display controller. Without knowing the A913 that you are mentioning I am pretty sure that you will want to write a driver using the Window Model.Important: The display driver itself does NOT know how to talk to the actual display. It contains functions like write_cmd() and write_data() or similar, but it does not know how to communicate to the actual hardware.Note: The display driver implements the interface specified in /src/gdisp/gdisp_driver.h.Board fileThe board file contains the actual interface to the hardware. It just implements the functions that the display driver is using. For example the display driver will call write_cmd(uint8_t cmd) from the board file. The implementation of that function in the board file will make sure that the display controller is in write mode and write the actual cmd value to the interface. In your case it would just put that value on the FSMC bus.We strongly recommend taking a look at some existing drivers such as the SSD1289 or the ILI9341 to get some inspiration on how things should look at the end.I hope that helps. Let us know when you have any additional questions.~ Tectu
Joel Bodenmann Posted October 14, 2015 Report Posted October 14, 2015 I am not sure what the I2C peripheral on your display controller is there for as I couldn't find a datasheet. However, there are other display controllers that need to be configured before a particular interface can be used. For example, the ILI9341 that you can find on the STM32F429i-Discovery board needs to be configured via SPI before the RGB interface can be used. It is very well possible to cleanly encapsulate such behavior in the display driver & board files of the uGFX GDISP driver interface.~ Tectu
enrico.dallavia Posted October 15, 2015 Author Report Posted October 15, 2015 Good morning,does anyone know how to use the L8 8bit mode of STM32? Because what I need is not a rgb 24 bit color output but only a monochromatic one (I read I maybe have to use a CLUT but the information is not clear and google does not help me so much..)The I2C is to configure the controller, i've attached the pdf to anyone who want to take a peek.Thanks
enrico.dallavia Posted October 15, 2015 Author Report Posted October 15, 2015 since pdf is not allowed to be attached, I put it on my dropbox accounthttps://www.dropbox.com/s/3ciqn6r3m444qxo/A913_spec_Rev1_2.pdf?dl=0
Joel Bodenmann Posted October 15, 2015 Report Posted October 15, 2015 does anyone know how to use the L8 8bit mode of STM32? Because what I need is not a rgb 24 bit color output but only a monochromatic one (I read I maybe have to use a CLUT but the information is not clear and google does not help me so much..)I am not sure what your question really is. uGFX supports many different color formats and you select the one that your driver uses in the drivers configuration file. In your case you can just GDISP_PIXELFORMAT_MONO (or GDISP_PIXELFORMAT_GRAY* in case of you have a grayscale display) and everything else will be taken care of for you.~ Tectu
enrico.dallavia Posted October 15, 2015 Author Report Posted October 15, 2015 Hi,I was talking about the color setup for stm32, I discovered an enum inside /drivers/gdisp/stmf429i-discovery/stm32_ltdc.h which seems to be what I want (or what I understood from stmf429 programming manual) LTDC_FMT_L8. I will look on GDISP_PIXELFORMAT_MONO to see if it is what I need.Thanks
Joel Bodenmann Posted October 17, 2015 Report Posted October 17, 2015 We never used a monochrome or grayscale display with the STM32 LTDC ourselves but I gave the STM32F4xx reference manual a quick look and it indeed looks like the L8 mode is what you would want to be using for that.In either way I assure you that it will be no problem to use a monochrome or grayscale display with your STM32F429 and uGFX.Please note that you ARE NOT SUPPOSED TO use the STM32F429iDiscovery GDISP driver unless that is the board you are really using. Please use the generic STM32LTDC driver instead. The reason is that the display used on the STM32F429i-Discovery board needs to be initialized via SPI before the LTDC can be used.~ Tectu
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now