Floyd-Fish / ST7789-STM32

using STM32's Hardware SPI to drive a ST7789 based IPS displayer
GNU General Public License v3.0
276 stars 55 forks source link

De-select CS before resetting #16

Open deividAlfa opened 2 years ago

deividAlfa commented 2 years ago

Not doing so will cause issues if you don't spècifically take care of the CS pin before calling ST7789_Init. Adjust reset timings as in datasheet.

Stredoslovak commented 1 year ago

@deividAlfa Hello, I'm writing this here cuz u didn't provide an Issues tab on your fork of this lib.

I am having some problems regarding the PIN_DEFFINITONs. Mainly the DC and RST pins. I don't know what you meant by "CUBEmx pin names", I've tried defining as PAx and also numbers. None of this works. Could you please provide me with a configured LCD.h file? So I can figure out the names?

Here is a part of my current LCD.h setup:

/* Pin connections. Use same names as in CubeMX */
#define LCD_DC 11
#define LCD_RST 12
//#define LCD_CS                LCD_CS  
//#define LCD_BL              LCD_BL

EDIT I've managed to advance by using this:

/* Pin connections. Use same names as in CubeMX */
#define LCD_DC GPIO_PIN_11
#define LCD_RST GPIO_PIN_12
//#define LCD_CS                LCD_CS  /* Disable if your display has no CS pin */
//#define LCD_BL              LCD_BL  /* Enable if you need backlight control */

But it still does not compile correctly. What am I missing?

deividAlfa commented 1 year ago

Hi, I enabled the Issues tab, please open one for this. About cube: simply do right-click on the pin and assign a custom pin name, ex. "LCD_DC”