为什么我把开发板的ESP32的GPIO7配置成output的时候,烧写完重启系统后,串口一直报:
rst:0xc (SW_CPU_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57
rst:0x10 (RTCWDT_RTC_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0008,len:8
load:0x3fff0010,len:4404
load:0x40078000,len:11072
ho 0 tail 12 room 4
load:0x40080000,len:252
请问大神这是什么原因呢?然后试了几个IO。发现从IO6到IO11都会有类似的问题,是不是系统默认这个几个IO是用来配成SD卡的呢?
离线
我是在网上买开发板的,你手上有开发板的话,可以配来试下,应该没有影响到都flash
离线
#define TFT_LCD_DC       10     //数据/指令连接
#define TFT_LCD_CS       11     //片选
#define TFT_LCD_RESET    9     //复位连接
#define TFT_LCD_SDA      7     //串行数据连接
#define TFT_LCD_SCL      6     //串行时钟连接
#define TFT_LCD_PIN_SEL ((1<<TFT_LCD_SCL) | (1<<TFT_LCD_SDA) | (1<<TFT_LCD_RESET)| (1<<TFT_LCD_DC) | (1<<TFT_LCD_CS))
void lcd_gpio_config(void)
{
    gpio_config_t io_conf;
    //disable interrupt
    io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
    //set as output mode
    io_conf.mode = GPIO_MODE_OUTPUT;
    //bit mask of the pins that you want to set,e.g.GPIO18/19
    io_conf.pin_bit_mask = TFT_LCD_PIN_SEL;
    //disable pull-down mode
    io_conf.pull_down_en = 0;
    //disable pull-up mode
    io_conf.pull_up_en = 1;
    //configure GPIO with the given settings
    gpio_config(&io_conf);
}
离线
把引脚 TFT_LCD_PIN_SEL 定义缩到一个试一试
离线
我单个配置了,还是不行的
离线

如果把调用这个函数 lcd_gpio_config() 注释起来, 还会出现吗?
离线
https://github.com/espressif/esp-idf/issues/1132
有可能是ESP-IDF自己携带的bug
Several issues related to restart process and clock switching have been fixed in abacf8d. Please update ESP-IDF and give it a try.
在abacf8d中已经修复了几个与重启进程和时钟切换相关的问题。 请更新ESP-IDF并尝试一下。
你的版本是多少?
离线
在ESP32论坛上面看到这个:
Ah, it doesn't say GPIO12, but rather MTDI under the strapping pins section, so I didn't get it before.
So, in my next revision of my board it should avoid using these pins then;
- GPIO0, GPIO2, GPIO5, GPIO12 and GPIO15 (because they are strapping pins)
- GPIO6, GPIO7, GPIO8, GPIO9, GPIO10 and GPIO11 (because they are used by SPI-Flash)
- GPIO34, GPIO35, GPIO36, GPIO37, GPIO38 and GPIO39 (can only be inputs)
离线

翻译了一下
啊,它并没有说GPIO12,而是MTDI在捆扎销部分下,所以我没有得到它。
所以,在我的电路板的下一版本中,应该避免使用这些引脚;
没看明白, 哪位解释一下。
离线
也要看看开发板这个IO有没有被其他硬件电路占用引起冲突
离线