Memory configuration:
The heap start address of memory region 3 starts at 0xD0000000.
The allocated framebuffer of the layers is addressed up to the end of the memory
region 3.
If the layer pixel format changes e.g. from RGB565 to RGB24, than the memory
configuration must be configured too. Currently an easy memory calculation
is missing for that in Kconfig.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
Memory configuration:
The heap start address of memory region 3 starts at 0xD0000000.
The allocated framebuffer of the layers is addressed up to the end of the memory
region 3.
If the layer pixel format changes e.g. from RGB565 to RGB24, than the memory
configuration must be configured too. Currently an easy memory calculation
is missing for that in Kconfig.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This adds support for initializing of the ltdc controller and the lcd device connected on the stm32f429i-disco. The following methods are provided for the generic fb interface:
- up_fbinitialize
- up_fbgetvplane
- fb_uninitialize
The following methods are provided for the ltdc interface:
- up_ltdcgetlayer
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This adds support for initializing of the ltdc controller and the lcd device connected on the stm32f429i-disco. The following methods are provided for the generic fb interface:
- up_fbinitialize
- up_fbgetvplane
- fb_uninitialize
The following methods are provided for the ltdc interface:
- up_ltdcgetlayer
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
initializing
As long as the method up_spiinitialize recognized the initialized state of the
spi device by the spi enable flag of the cr1 register, it isn't safe to disable
the spi device outside of the nuttx spi interface structure. But this has to be
done as long as the nuttx spi interface doesn't support bidirectional data
transfer for multiple devices share one spi bus. This wrapper store the
initialized state of the spi device after the first initializing and should be
used by each driver who shares the spi5 bus.
Note! Understand this as temporary workaround.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
initializing
As long as the method up_spiinitialize recognized the initialized state of the
spi device by the spi enable flag of the cr1 register, it isn't safe to disable
the spi device outside of the nuttx spi interface structure. But this has to be
done as long as the nuttx spi interface doesn't support bidirectional data
transfer for multiple devices share one spi bus. This wrapper store the
initialized state of the spi device after the first initializing and should be
used by each driver who shares the spi5 bus.
Note! Understand this as temporary workaround.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This adds a new default platform configuration to support the lcd device
connected to the stm32f429i-disco board.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This adds a new default platform configuration to support the lcd device
connected to the stm32f429i-disco board.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This enables the initializing of the lcd device connected on the
stm32f429i-disco. The following methods are provided:
- up_lcdinitialize
- up_lcduninitialize
- up_lcdgetdev
The corresponding ili9341 lcd device in the nuttx driver section can be
configured by Kconfig. Interface 0 is used by default.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
This enables the initializing of the lcd device connected on the
stm32f429i-disco. The following methods are provided:
- up_lcdinitialize
- up_lcduninitialize
- up_lcdgetdev
The corresponding ili9341 lcd device in the nuttx driver section can be
configured by Kconfig. Interface 0 is used by default.
Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
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>
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>