Skip to content

ESP32 P4 lcd_spi 示例 报告invalid sclk speed 错误,是什么原因? #199

Open
@linghuye

Description

@linghuye

正点原子ESP32 P4小系统板,接ST7789驱动320*240屏幕,用examples\arduino\drivers\lcd\lcd_spi做测试,
SPI屏幕频率EXAMPLE_LCD_SPI_FREQ_HZ,设置超过20M就报invalid sclk speed,这是啥原因?

E (122) spi_master: spi_bus_add_device(426): invalid sclk speed
E (123) lcd_panel.io.spi: esp_lcd_new_panel_io_spi(92): adding spi device to bus failed
[E][Panel][esp_panel_bus_spi.cpp:0321](begin): create panel IO failed [ESP_ERR_INVALID_ARG]
[E][Panel][esp_panel_lcd.cpp:1028](processDeviceOnInit): Bus begin failed
[E][Panel][esp_panel_lcd_st7789.cpp:0049](init): Process device on init failed
[E][Panel][esp_panel_lcd.cpp:0404](begin): Init failed
#define EXAMPLE_LCD_NAME                ST7789
#define EXAMPLE_LCD_WIDTH               (240)
#define EXAMPLE_LCD_HEIGHT              (320)
#define EXAMPLE_LCD_COLOR_BITS          (16)
#define EXAMPLE_LCD_SPI_FREQ_HZ         (40 * 1000 * 1000)

#define EXAMPLE_LCD_SPI_IO_CS       (28)
#define EXAMPLE_LCD_SPI_IO_DC       (49)
#define EXAMPLE_LCD_SPI_IO_SCK      (30)
#define EXAMPLE_LCD_SPI_IO_SDA      (29)
#define EXAMPLE_LCD_SPI_IO_SDO      (-1)
#define EXAMPLE_LCD_RST_IO          (50)  
#define EXAMPLE_LCD_BL_IO           (23) 
#define EXAMPLE_LCD_BL_ON_LEVEL     (1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions