Commit Graph

9147 Commits

Author SHA1 Message Date
Gregory Nutt
bfc12bf3a7 ARMv7: Add support to use ITM for SYSLOG debug output 2014-10-22 09:03:00 -06:00
Gregory Nutt
d98d1e9d21 Eliminate a warning 2014-10-22 07:56:48 -06:00
Gregory Nutt
0196b77961 EFM32: Add IDLE power management hooks. Nothing implemented; just define the hooks 2014-10-22 07:26:31 -06:00
Gregory Nutt
caaa73e8b5 Update ChangeLog 2014-10-21 16:47:35 -06:00
Gregory Nutt
9ef8abc5ec Add ARMv7-M DWT and TPI register definitions 2014-10-21 16:46:26 -06:00
Gregory Nutt
485e71bf7e Update ChangeLog 2014-10-21 16:17:55 -06:00
Gregory Nutt
d094fd1c19 Add CMSIS ITM header file and library 2014-10-21 16:16:00 -06:00
Gregory Nutt
d930f2cdbc EFM32: Add buton interrupt handling for the Olimex board 2014-10-21 13:51:30 -06:00
Gregory Nutt
37e08c3b49 The olimex-efm32g880f128-stk now defaults to use LEUART1 as the serial console. Also fixes lots of compile bugs from the original LEUART checkin 2014-10-21 11:38:51 -06:00
Gregory Nutt
d273686d42 EFM32: Add LFA and LFB clock support 2014-10-21 10:45:33 -06:00
Gregory Nutt
d13c9a08b9 EFM32: Add configuration support for LEUARTs 2014-10-21 09:37:02 -06:00
Gregory Nutt
d9abc779fe EFM32: Add a LEUART-based serial driver (untestee) 2014-10-21 09:21:03 -06:00
Gregory Nutt
2be00bbde2 EFM32: Add basic, low-level support for the low energy UARTs 2014-10-21 08:48:38 -06:00
Gregory Nutt
73874782db EFM32: Addred LEUART register definition header file 2014-10-21 08:11:03 -06:00
Gregory Nutt
d8a13272de Update ChangeLog 2014-10-21 06:49:47 -06:00
Gregory Nutt
6737c28066 Add ADC pinmap definitions for the STM32 F103R from Lederhilger Martin 2014-10-21 06:48:16 -06:00
Gregory Nutt
00ea98acdd Update ChangeLog 2014-10-21 06:39:40 -06:00
Gregory Nutt
0e9955a37c Fixe to allow compile of lpc43_gpioint.c. It likely doesn't work. From Brandon warhurst_002 2014-10-21 06:36:27 -06:00
Gregory Nutt
07ff23d1ce Update ChangeLog 2014-10-20 15:46:55 -06:00
Gregory Nutt
9537715ebb stm32f429i-disco: add wrapper for spi5 evice
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>
2014-10-20 15:36:11 -06:00
Gregory Nutt
c6c5a221e9 stm32f429i-disco: add new platform config
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>
2014-10-20 15:33:25 -06:00
Gregory Nutt
fa3753c466 rivers: enable usage of ili9341
This enables build and configuration of the ili9341 lcd interface driver.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:27:56 -06:00
Gregory Nutt
7a217f1015 stm32f429i-disco: enable usage of ili93414ws
This enables build and configuration of the ili94314ws sub driver.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:24:24 -06:00
Gregory Nutt
17af388456 stm32f429i-disco: implements lcd initializing
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>
2014-10-20 15:21:48 -06:00
Gregory Nutt
beff697bc7 drivers: implements lcd interface for ili9341
This implements the lcd interface to displaying data on the lcd display powered
by the ili9341 lcd driver.

This driver implements all methods defined in the lcd_dev_s structure except
getcontrast and setcontrast. They are not supported by the hardware.

Furthermore the driver allows to use multiple displays powered by the ili9342 IC
with only one driver instance. So it is theoretically possible to support more
than one connected ili9341 lcd display. The displays can be configured
independently. Currently two lcd devices supported. This should be enough for
now. Read the corresponding code section of how to add more devices if
neccessary.

The following settings are configurable:

1. Pixel format
   Define the pixel format of the connected display. Currently only
   RGB-565 supported.

2. Orientation
   Define the orientation of the display. This can be portrait or
   landscape and reversed values.

1. Write only
   The driver allows to disable any getrun method if not neccessary to
   reduce code size. This is done by enable CONFIG_LCD_NOGETRUN in the nuttx
   configuration.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:19:43 -06:00
Gregory Nutt
b8b9834ae9 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
Gregory Nutt
f8c4c75c17 include: adds interface description for ili9341
This adds the description of the generic interface to communicate with
the ili9341 lcd single chip driver used by any displays.

The interface have to be implemented by the platform specific subdriver.
The following functions must be exported:

-select
 Select the spi device before starting an operations.

-deselect
 Deselect the spi device after operations finished and if the device was
 selected before.

-sendcmd
 Send any command to the ili9341 display driver.

-sendparam
 Send any parameter corresponding to the ili9341 display driver.

-recvparam
 Receive any parameter from the ili9341 display driver. This is only possible
 for the read commands supported by the ili9341.

-sendgram
 Send pixel data to the gram of the display. This i similar to the function
 sendparam, but pixel data operations needs another handling of how to send the
 data to the display.

-recvgram
 Receive pixel data to the gram of the display. This i similar to the function
 recvparam, but pixel data operations needs another handling of how to receive
 the data from the display.

-backlight
 Change the backlight level of the display.

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:15:22 -06:00
Gregory Nutt
5c20da2a34 stm32: rename spi frame format definition
This renames the stm32 spi frame format definition to the short description
name as well as the other cr2 register flags.

Note! STM32_SPI3_FRF was never used by nuttx somewhere

Signed-off-by: Marco Krahl <ocram.lhark@gmail.com>
2014-10-20 15:12:59 -06:00
Gregory Nutt
bce6a9e077 stm32f429i-disco: Fix obsolete SPI5 dependency. From Marco Krahl 2014-10-20 15:10:50 -06:00
Gregory Nutt
b505c11e48 Update README files 2014-10-20 15:08:35 -06:00
Gregory Nutt
f566c5ed53 EFM32: Another update to USART oversampling calculation. Clip to positive; update comments 2014-10-20 13:54:43 -06:00
Gregory Nutt
f754a51d15 Fix some naming 2014-10-20 12:29:28 -06:00
Gregory Nutt
26acd8d067 Update ChangeLog 2014-10-20 12:02:15 -06:00
Gregory Nutt
01984fe6e7 Add board support for the Olimex EFM32G8809128 STK 2014-10-20 12:00:37 -06:00
Gregory Nutt
4fb5e6d05d EFM32 Gecko Starter Kit: Must initialize LEDs on boot 2014-10-20 11:52:31 -06:00
Gregory Nutt
09f6908aa1 EFM32 USART: Fix oversampling selection; Should be biased toward higher oversampling rates 2014-10-20 10:54:13 -06:00
Gregory Nutt
8c99adf42c Update documentation/READMEs 2014-10-20 08:26:09 -06:00
Gregory Nutt
a8f2e854c7 Update ChangeLog 2014-10-20 08:25:54 -06:00
Gregory Nutt
1f60e40115 Merge branch 'efm32' 2014-10-20 08:15:53 -06:00
Gregory Nutt
945da2e9f9 Merge branch 'master' of ssh://git.code.sf.net/p/nuttx/git 2014-10-20 08:15:52 -06:00
Gregory Nutt
8e227ef756 Merge remote-tracking branch 'origin/master' into efm32 2014-10-20 08:12:09 -06:00
Gregory Nutt
ba21728389 Finsh USART configuration logic 2014-10-20 08:12:08 -06:00
Gregory Nutt
735268d266 Add GPIO interrupt logic 2014-10-20 08:12:08 -06:00
Gregory Nutt
574840778f Trivial, cosmetic typos in comments 2014-10-20 08:12:07 -06:00
Gregory Nutt
7bcca354c2 Trivial, cosmetic typos in comments 2014-10-19 18:59:11 -06:00
Gregory Nutt
b9a8456582 Add EFM32 serial driver 2014-10-19 18:55:44 -06:00
Gregory Nutt
5fa6188c55 Add some UART configuration logic (still incomplete) 2014-10-19 16:42:15 -06:00
Gregory Nutt
302e16223e Fleshes out GPIO configuration logic 2014-10-19 13:47:52 -06:00
Gregory Nutt
8125da0424 Add GPIO header file + a little bit of GPIO configuration logig 2014-10-19 13:07:52 -06:00
Gregory Nutt
6839ac9c60 Basic clock configuration logic 2014-10-19 11:08:56 -06:00