2016-06-14 05:02 AM
I've used code found on the internet for generating VGA video directly out of F4 devices thru r2r dacs, but since the introduction of HAL, I have yet to see any examples. Most existing code are still written for standard peripheral library only. I'm just thinking that if the Discovery boards can directly drive an LCD to 800x600x16k, is there an easy way to change the timing of the ltdc signals so that the code will drive a standard external VGA 15-pin color monitor directly? Any ideas, or suggestions?
#hal-stm32f7-vga-video #stm32f7-vga-halSolved! Go to Solution.
2016-07-21 09:59 AM
Piece of cake with CubeMX. See the two attached files. VGA Output on a STM32F429i-Disco with simple Resistor DAC and a resolution of 800x480 pixel in the onboard SDRAM. I use a 16:9 resolution, because most monitors today are widescreen. Works with my PC monitor and my TV. The analog signal Quality is not very good because VGA needs an Impedance of 75 Ohms which was not possible with this VGA hack, but a prove of concept. See it in motion : https://youtu.be/seekcKivPwA
Other resolutions work, too, like 640x480, 800x600. I prefer 800x480, because some TFT for embedded systems use the same resolution(but not the same timings !).No excuse for tiny TFT and low resolution when you can use LTDC. Best regards, Markus. ________________ Attachments : CubeMX_VGA_LTDC.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Cj&d=%2Fa%2F0X0000000bjr%2FB.JpsxPuv8kSdAFSloy84oesBFmnWNjQIzpxUyj5S3Q&asPdf=falsestm32f429i-disco_vga.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Ce&d=%2Fa%2F0X0000000bjp%2FrH719.uRT4sSC9zxcxYOeAYdTcxCgb6WaePdZgFSdvs&asPdf=false2016-06-14 09:40 AM
I'd imagine it is just a matter of configuring the clocking, line timing, and sync signal polarities. The VESA Modes being the best defined, with clear support from multi-sync monitors.
You'll have to port the code/configuration to HAL, not sure there are people falling out of the trees to do that.2016-07-18 10:58 AM
Okay, this will become a background task for now. Not many people are using boards with external video because the new discovery boards already have built-in displays. At some point, I will just get the Adafruit TFT display shield, and use the BSP functions to generate a display, and squint at the tiny 1.8'' display heheheh..
2016-07-18 11:33 AM
I'm surprised ST doesn't have a DISCO with a VGA 15-pin connector on it. A Video DAC might be asking a bit much, but a resistor chain/ladder would do, and it wouldn't have the licensing or IP issues of HDMI, etc.
2016-07-21 09:59 AM
Piece of cake with CubeMX. See the two attached files. VGA Output on a STM32F429i-Disco with simple Resistor DAC and a resolution of 800x480 pixel in the onboard SDRAM. I use a 16:9 resolution, because most monitors today are widescreen. Works with my PC monitor and my TV. The analog signal Quality is not very good because VGA needs an Impedance of 75 Ohms which was not possible with this VGA hack, but a prove of concept. See it in motion : https://youtu.be/seekcKivPwA
Other resolutions work, too, like 640x480, 800x600. I prefer 800x480, because some TFT for embedded systems use the same resolution(but not the same timings !).No excuse for tiny TFT and low resolution when you can use LTDC. Best regards, Markus. ________________ Attachments : CubeMX_VGA_LTDC.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Cj&d=%2Fa%2F0X0000000bjr%2FB.JpsxPuv8kSdAFSloy84oesBFmnWNjQIzpxUyj5S3Q&asPdf=falsestm32f429i-disco_vga.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I1Ce&d=%2Fa%2F0X0000000bjp%2FrH719.uRT4sSC9zxcxYOeAYdTcxCgb6WaePdZgFSdvs&asPdf=false2016-07-22 04:25 PM
Thank you so much, Markus!!!
Just a few days ago, I setup a CubeMX project with ltdc, I was staring at the parameters screen, and I just did not have a clue as to where to start to get the monitor to sync with the output.I used your parameters, generated code, set the background vars to red, then green, then blue. The monitor locked into the signal immediately each re-boot. So happy that you shared this information with the group, Markus!To simplify things, I skipped the resistor DAC and just used the R7/G7/B7 signals and passed them directly into the monitors RGB inputs. This is also ok for my use, I really don't require 64k colors, I can live with eight.I am up and running now on my old Westinghouse PC monitor!Thanks again!Christopher2016-07-26 06:06 AM
Hi Chris,
I am glad I can help you with this infos. If you are happy with the Nucleo-144, you should give a try for the STM32F429i-Disco. With the SDRAM as framebuffer, you will love it even more. I often wonder if i could swap the STM32F429 with an STM32F746zg in QFP-144 package on the disco board to get the best performance+SDRAM. ST promises pin2pin compatibility except the qfp-100 package. The STM32F429i-disco and the nucleo-144 STM32F746zg share the same uC footprint. I have both boards here, but a confirmation from ST would give me more confidence to do this experiment. Or better a STM32F746i-disco board with SDRAM+VGA instead of the small TFT. This would be a great platform for some LTDC/DMA2D projects. Are there other people out there who agree and waiting for this? Best regards, Markus. PS: the Nucleo-144 STM32F746ZG is a great board but shares too much pins to use the LTDC, and without external RAM, there are too much limitations.2016-07-28 06:48 AM
I wouldn't mind seeing a VGA-only version of the Discovery line of development boards (maybe just for the F7 only).
The last boards that I used were the F429i-disco, and the F746z-disco.The F429i-disco board was a great board, once the TFT is removed from it. Plenty of open I/Os and the extra SRAM on the board was a convenience to have.The F746z-disco board was just terrible. The lack of access to the most basic of I/Os made it impossible to work with. I removed the TFT and tried to splice in to the signals and in no time had damaged the board beyond repair.The only boards that made any sense for me to use were the F746z and F767i Nucleo-144 boards. Obviously, the main limitation of these boards is the lack of extended SRAM and the built-in ethernet chip stealing I/Os away from the user. The best part is full access to every pin on the processor, and the basic pins on the extended arduino port.I always hoped that STM would go in the direction of producing Multimedia-enabled chips like TI's OMAP (more SRAM, HDMI, Audio Codec, etc,) but for now I can live with the current line of F7 processors.2016-07-29 03:16 AM
The TI OMAP parts are Cortex-A (or ARM-9 or 11, which morphed into the Cortex-A) microprocessors. The Cortex-A family are not single-chip microcontrollers like the Cortex-M's; they usually have on-chip SRAM but no on-chip non-volatile memory. Any comparison with the STM32F7 is apples and oranges, not apples and apples.
ST do make a few ARM-9's (STR9 family) but I'm not familiar with them and they're ''NRND'' (not recommended for new designs).2016-07-29 08:28 AM
You are right. I think what I meant to says is Multimedia-enabled processors like the Allwinner A-series (one of the chips used in most of the portable tablets today).
I got my processors mixed up...hehehe.Still, these chips lack large amounts of built-in SRAM, and some I have worked with don't even contain a single DAC or audio codec.Overall, the F7 is still the most balanced general-purpose processor available, and as of today it appears to be the one that fits the needs for the apps I'm writing.