Vietool STM32F103: LCD updates (still does not work)
This commit is contained in:
parent
4d8bbe350c
commit
c694797c2a
@ -79,17 +79,17 @@
|
||||
# define LCD_YRES 320
|
||||
#endif
|
||||
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
|
||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as ship select signal */
|
||||
/* RS <==> A16 */
|
||||
|
||||
#define LCD_REG (*((volatile unsigned short *) 0x60000000)) /* RS = 0 */
|
||||
#define LCD_RAM (*((volatile unsigned short *) 0x60020000)) /* RS = 1 */
|
||||
#define LCD_REG (*((volatile unsigned short *) 0x60000000)) /* RS = 0 */
|
||||
#define LCD_RAM (*((volatile unsigned short *) 0x60020000)) /* RS = 1 */
|
||||
|
||||
/* LCD IDs */
|
||||
|
||||
#define LCD_ID 0x1505
|
||||
#define LCD_ID 0x1505
|
||||
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
|
@ -94,7 +94,13 @@
|
||||
# define LCD_YRES 320
|
||||
#endif
|
||||
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
|
||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as ship select signal */
|
||||
/* RS <==> A16 */
|
||||
|
||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||
|
||||
/* Debug ******************************************************************************/
|
||||
#ifdef CONFIG_DEBUG_LCD
|
||||
@ -105,12 +111,6 @@
|
||||
# define lcdvdbg(x...)
|
||||
#endif
|
||||
|
||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as ship select signal */
|
||||
/* RS <==> A16 */
|
||||
|
||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||
|
||||
/**************************************************************************************
|
||||
* Private Type Definition
|
||||
**************************************************************************************/
|
||||
|
@ -650,13 +650,62 @@ Configurations
|
||||
4. USB support is disabled by default. See the section above entitled,
|
||||
"USB Interface"
|
||||
|
||||
5. This configuration has been used for verifying the touchscreen on
|
||||
3. This configured can be re-configured to use either the Viewtool LCD
|
||||
module. NOTE: The LCD module can only be used on the STM32F103 version
|
||||
of the board. The LCD requires FSMC support.
|
||||
|
||||
System Type -> STM32 Chip Selection:
|
||||
CONFIG_ARCH_CHIP_STM32F103VCT6=y : Select STM32F103VCT6
|
||||
|
||||
System Type -> Peripherals:
|
||||
CONFIG_STM32_FSMC=y : Enable FSMC LCD interface
|
||||
|
||||
Device Drivers -> LCD Driver Support
|
||||
CONFIG_LCD=y : Enable LCD support
|
||||
CONFIG_NX_LCDDRIVER=y : LCD graphics device
|
||||
CONFIG_LCD_MAXCONTRAST=1
|
||||
CONFIG_LCD_MAXPOWER=255
|
||||
CONFIG_LCD_LANDSCAPE=y : Landscape orientation
|
||||
CONFIG_LCD_SSD1289=y : Select the SSD1289
|
||||
CONFIG_SSD1289_PROFILE1=y
|
||||
|
||||
Graphics Support
|
||||
CONFIG_NX=y
|
||||
|
||||
Graphics Support -> Supported Pixel Depths
|
||||
CONFIG_NX_DISABLE_1BPP=y : Only 16BPP supported
|
||||
CONFIG_NX_DISABLE_2BPP=y
|
||||
CONFIG_NX_DISABLE_4BPP=y
|
||||
CONFIG_NX_DISABLE_8BPP=y
|
||||
CONFIG_NX_DISABLE_24BPP=y
|
||||
CONFIG_NX_DISABLE_32BPP=y
|
||||
|
||||
Graphics Support -> Font Selections
|
||||
CONFIG_NXFONTS_CHARBITS=7
|
||||
CONFIG_NXFONT_SANS22X29B=y
|
||||
CONFIG_NXFONT_SANS23X27=y
|
||||
|
||||
Application Configuration -> Examples
|
||||
CONFIG_EXAMPLES_NXLINES=y
|
||||
CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
|
||||
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16
|
||||
CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
|
||||
CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
|
||||
CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
|
||||
CONFIG_EXAMPLES_NXLINES_BPP=16
|
||||
|
||||
STATUS: Now working; reads 0x8999 as device ID. This may perhaps
|
||||
be due to incorrect jumper settings
|
||||
|
||||
6. This configuration has been used for verifying the touchscreen on
|
||||
on the Viewtool LCD module. NOTE: The LCD module can really only
|
||||
be used on the STM32F103 version of the board. The LCD requires
|
||||
FSMC support (the touchscreen, however, does not but the touchscreen
|
||||
is not very meaningful with no LCD).
|
||||
|
||||
CONFIG_ARCH_CHIP_STM32F103VCT6=y : Select STM32F103VCT6
|
||||
System Type -> STM32 Chip Selection:
|
||||
CONFIG_ARCH_CHIP_STM32F103VCT6=y : Select STM32F103VCT6
|
||||
|
||||
With the following modifications, you can include the touchscreen
|
||||
test program at apps/examples/touchscreen as an NSH built-in
|
||||
@ -697,6 +746,8 @@ Configurations
|
||||
CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output
|
||||
CONFIG_DEBUG_INPUT=y : Enable debug output from input devices
|
||||
|
||||
STATUS: Working
|
||||
|
||||
highpri:
|
||||
|
||||
This configuration was used to verify the NuttX high priority, nested
|
||||
|
@ -92,7 +92,13 @@
|
||||
# define LCD_YRES 320
|
||||
#endif
|
||||
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
#define LCD_BL_TIMER_PERIOD 8999
|
||||
|
||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as chip select signal */
|
||||
/* RS <==> A16 */
|
||||
|
||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||
|
||||
/* Debug ******************************************************************************/
|
||||
|
||||
@ -104,12 +110,6 @@
|
||||
# define lcdvdbg(x...)
|
||||
#endif
|
||||
|
||||
/* LCD is connected to the FSMC_Bank1_NOR/SRAM1 and NE1 is used as chip select signal */
|
||||
/* RS <==> A16 */
|
||||
|
||||
#define LCD_INDEX 0x60000000 /* RS = 0 */
|
||||
#define LCD_DATA 0x60020000 /* RS = 1 */
|
||||
|
||||
/**************************************************************************************
|
||||
* Private Type Definition
|
||||
**************************************************************************************/
|
||||
@ -207,25 +207,21 @@ static void stm32_enablefsmc(void);
|
||||
|
||||
const uint16_t fsmc_gpios[] =
|
||||
{
|
||||
/* A16... A24 */
|
||||
/* A16... A23. REVIST: only A16 is used by the LCD */
|
||||
|
||||
GPIO_NPS_A16, GPIO_NPS_A17, GPIO_NPS_A18, GPIO_NPS_A19, GPIO_NPS_A20,
|
||||
GPIO_NPS_A21, GPIO_NPS_A22, GPIO_NPS_A23,
|
||||
|
||||
/* D0... D15 */
|
||||
|
||||
GPIO_NPS_D0, GPIO_NPS_D1, GPIO_NPS_D2, GPIO_NPS_D3, GPIO_NPS_D4,
|
||||
GPIO_NPS_D5, GPIO_NPS_D6, GPIO_NPS_D7, GPIO_NPS_D8, GPIO_NPS_D9,
|
||||
GPIO_NPS_D0, GPIO_NPS_D1, GPIO_NPS_D2, GPIO_NPS_D3, GPIO_NPS_D4,
|
||||
GPIO_NPS_D5, GPIO_NPS_D6, GPIO_NPS_D7, GPIO_NPS_D8, GPIO_NPS_D9,
|
||||
GPIO_NPS_D10, GPIO_NPS_D11, GPIO_NPS_D12, GPIO_NPS_D13, GPIO_NPS_D14,
|
||||
GPIO_NPS_D15,
|
||||
|
||||
/* NOE, NWE */
|
||||
/* NOE, NWE, and NE1 */
|
||||
|
||||
GPIO_NPS_NOE, GPIO_NPS_NWE,
|
||||
|
||||
/* NE1 */
|
||||
|
||||
GPIO_NPS_NE1
|
||||
GPIO_NPS_NOE, GPIO_NPS_NWE, GPIO_NPS_NE1
|
||||
};
|
||||
|
||||
#define NGPIOS (sizeof(fsmc_gpios)/sizeof(uint16_t))
|
||||
@ -486,6 +482,10 @@ static void stm32_selectlcd(void)
|
||||
|
||||
putreg32(FSMC_BCR_MBKEN | FSMC_BCR_SRAM | FSMC_BCR_MWID16 | FSMC_BCR_WREN,
|
||||
STM32_FSMC_BCR1);
|
||||
|
||||
/* Configure the LCD RESET\ pin. Initial value will take the LCD out of reset */
|
||||
|
||||
stm32_configgpio(GPIO_LCD_RESET);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
@ -549,6 +549,8 @@ int up_lcdinitialize(void)
|
||||
{
|
||||
lcdvdbg("Initializing\n");
|
||||
|
||||
/* Initialize the backlight */
|
||||
|
||||
init_lcd_backlight();
|
||||
|
||||
/* Configure GPIO pins and configure the FSMC to support the LCD */
|
||||
|
Loading…
Reference in New Issue
Block a user