2025-09-17 10:02 AM - last edited on 2025-09-17 10:07 AM by mƎALLEm
Post edited by ST moderator to be inline with the community rules especially with the code sharing. In next time please use </> button to paste your code. Please read this post: How to insert source code
#define FMC_BANK1_BASE ((uint32_t)0x60000000)
#define FMC_A16_OFFSET ((uint32_t)0x00020000)
#define LCD_REG (*((volatile uint8_t *) FMC_BANK1_BASE))
#define LCD_RAM (*((volatile uint8_t *) (FMC_BANK1_BASE | FMC_A16_OFFSET)))
0x00020000 does not work
0x00010000 does not work
when write data (LCD_RAM ) is has to be high maybe it is the other way around
I am using STM32F427VGT6
the display is 8 BIT FMC, maybe it has something to do with declaration ((uint32_t)0x60000000) instead of
((uint8_t)0x60000000)
the pin will not switch properly to choose data or command register
when I assign PD11 (which is the A16) as regular GPIO then the display works
void LCD_WR_REG(uint8_t reg)
{
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11, GPIO_PIN_RESET);
LCD_REG = reg;
}
// Write 8-bit data
void LCD_WR_DATA8(uint8_t data)
{
HAL_GPIO_WritePin(GPIOD, GPIO_PIN_11, GPIO_PIN_SET);
LCD_RAM = data;
}