nuttx/configs/stm32f429i-disco/src
Gregory Nutt f02de7c7ec stm32f429i-disco: implements ili9341 interface
This add a new sub driver ili93414ws which implements the ili9341
interface. This allows to control the ili9341 lcd display of the
stm32f429i-disco board. This also modifies the board specific header to
make the entry point to the sub driver known.

Generally the display supports two different ways to drawing pixel data. This
can be done by RGB interface or MCU interface. Second one is supported by this
driver.

The configuration of the MCU interface is fixed by the hardware pinout.
In the case of the stm32f429i-disco board it is a 4-wire serial (spi)
interface. The display is connected on spi5 and acts as a slave device.
It supports half duplex bidirectional mode for transmitting and receiving data.

Nuttx spi interface only support full duplex so the interface can not be used
for the driver in conventional way. Therefore the driver has its own logic for
the communication with the spi5 device.

But if multiple devices share the same spi5 bus, e.g. if MEMS support enabled
the spi bus must be locked to avoid inconsistency. This is done by enable
CONFIG_STM32_SPI5 in the nuttx configuration. In this case the driver uses the
spi_dev_s instance for the spi5 port to interact with the nuttx spi interface,
e.g. using method SPI_LOCK to lock the bus for the current usage. So it is safe
to share the spi bus. Keep in mind this is a possible workaround.
I would be happy if nuttx spi interface supports different spi modes other
than full duplex only. Are there any plans?

Futhermore the driver supports a few configurable settings:

1. SPI Frequency.

This allows to configure the spi frequency for the communication with the
display. As a result of the spi devices of the stm32f429 only allow fixed
frequency by divider depending on PCLK1, it is not possible to configure each
spi clock we want. A divider of 4, what means ~10Mhz spi clock, gives me the
best results and should be near the upper limit.

2. SPI 16-bit mode.

This allows to setup the spi hardware to 16-bit mode for read or write
operations when receiving or transmitting pixel data from or to the gram of the
display. This is not documented in the ili9341 reference manual but this trick
works just fine because we use only one read or write operation for each pixel,
instead two. This gives a small performance boost.

The driver implements all functions described in the header (see
include/nuttx/lcd/ili9341.h).
Note! Using the backlight function has no effect, because the board
doesn't support controlling of the backlight in the current hardware
layout.

Todo: Add support for dma transfer for writing pixel data to the displays gram.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:17:56 -06:00
..
.gitignore
Makefile Remove non-functional vestiges of OTGHS in FS mode (including OTGFS2); try to convert the stm32f429i-disco configuration to use OTGHS instead of OTFHS in FS mode (OTGFS2). But I don't have the boards and can't test 2014-10-07 15:25:31 -06:00
stm32_autoleds.c STM32F429 Discovery: All src/ files renamed to make consistent with current naming conventions 2014-02-18 12:24:21 -06:00
stm32_boot.c Remove non-functional vestiges of OTGHS in FS mode (including OTGFS2); try to convert the stm32f429i-disco configuration to use OTGHS instead of OTFHS in FS mode (OTGFS2). But I don't have the boards and can't test 2014-10-07 15:25:31 -06:00
stm32_buttons.c More trailing whilespace removal 2014-04-13 16:22:22 -06:00
stm32_cxxinitialize.c STM32F429 Discovery: All src/ files renamed to make consistent with current naming conventions 2014-02-18 12:24:21 -06:00
stm32_extmem.c More trailing whilespace removal 2014-04-13 16:22:22 -06:00
stm32_idle.c STM32F429 Discovery: All src/ files renamed to make consistent with current naming conventions 2014-02-18 12:24:21 -06:00
stm32_ili93414ws.c stm32f429i-disco: implements ili9341 interface 2014-10-20 15:17:56 -06:00
stm32_nsh.c stm32f429i-disco: Fix obsolete SPI5 dependency. From Marco Krahl 2014-10-20 15:10:50 -06:00
stm32_ostest.c STM32F429 Discovery: All src/ files renamed to make consistent with current naming conventions 2014-02-18 12:24:21 -06:00
stm32_spi.c STM32F429 Discovery: All src/ files renamed to make consistent with current naming conventions 2014-02-18 12:24:21 -06:00
stm32_usb.c Remove non-functional vestiges of OTGHS in FS mode (including OTGFS2); try to convert the stm32f429i-disco configuration to use OTGHS instead of OTFHS in FS mode (OTGFS2). But I don't have the boards and can't test 2014-10-07 15:25:31 -06:00
stm32_userleds.c More trailing whilespace removal 2014-04-13 16:22:22 -06:00
stm32f429i-disco.h stm32f429i-disco: implements ili9341 interface 2014-10-20 15:17:56 -06:00