UART1 TXD on IO33

gigijoe
Posts: 21
Joined: Wed Aug 02, 2017 10:16 am

UART1 TXD on IO33

Postby gigijoe » Tue Nov 20, 2018 3:04 pm

I got problem with UART1 TXD on IO33
It works ONLY if auto light sleep DISABLED

Code: Select all

#define UART1_TXD GPIO_NUM_33
#define UART1_RXD GPIO_NUM_2
#define UART1_RTS  (UART_PIN_NO_CHANGE)
#define UART1_CTS  (UART_PIN_NO_CHANGE)

	uart_config_t uart_config = {
		.baud_rate = 230400,
		.data_bits = UART_DATA_8_BITS,
		.parity = UART_PARITY_DISABLE,
		.stop_bits = UART_STOP_BITS_1,
		.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
		.rx_flow_ctrl_thresh = 120,
		.use_ref_tick = true,
	};
	/* gpio33 route to digital io_mux */
	REG_CLR_BIT(RTC_IO_XTAL_32K_PAD_REG, RTC_IO_X32N_MUX_SEL);

	//Configure UART1 parameters
	uart_param_config(uart_num, &uart_config);
	//Set UART1 pins(TX: IO4, RX: I05, RTS: IO18, CTS: IO19)
	uart_set_pin(uart_num, UART1_TXD, UART1_RXD, UART1_RTS, UART1_CTS);
	//Install UART driver (we don't need an event queue here)
	//In this example we don't even use a buffer for sending data.
	uart_driver_install(uart_num, BUF_SIZE, 0, 0, NULL, 0);

Code: Select all

    esp_pm_config_esp32_t cfg;
    cfg.max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; 
    cfg.min_freq_mhz = CONFIG_ESP32_XTAL_FREQ;
#if CONFIG_FREERTOS_USE_TICKLESS_IDLE
    cfg.light_sleep_enable = true;
#endif          
    esp_pm_configure(&cfg);
If cfg.light_sleep_enable = true; I see none stop square wave on scope
If cfg.light_sleep_enable = false; UART1 TX works perfectly

Any idea ?

Who is online

Users browsing this forum: Google [Bot], YaCy [Bot] and 137 guests