Page 1 of 1

Not working on ESP32-C3-Mini-1

Posted: Tue Jul 30, 2024 8:59 am
by vapisoft
I conect my STM32 to the ESP32-C3-DevKit, and it works OK (with AT commands).
The STM32 connects its UART to pin GPIO6 and GPIO7 as it is explained in the AT-Project user Guide page 14
I don't conect the CTS and RTS.
I installed the ESP32-C3-Mini-1 on the PCB and connected the same line, it doesn't work.
The ESP doesn't even echo the AT commands or answer the AT+GMR as it oes with the DevKit.

The following is the code that I initialize the UAR on the STM32 side.

Code: Select all

static void AT_UARTs_Init(uint32_t baud_rate)
{
  __HAL_RCC_USART4_CLK_ENABLE();
  __HAL_RCC_USART5_CLK_ENABLE();

   // Configure the UART parameters
  huart4.Instance = USART4;
  huart4.Init.BaudRate = baud_rate;
  huart4.Init.WordLength = UART_WORDLENGTH_8B;
  huart4.Init.StopBits = UART_STOPBITS_1;
  huart4.Init.Parity = UART_PARITY_NONE;
  huart4.Init.Mode = UART_MODE_TX;
  huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  huart4.Init.OverSampling = UART_OVERSAMPLING_16;
  huart4.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
  huart4.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;

  if (HAL_UART_Init(&huart4) != HAL_OK)
  {
     my_error_handler(6);
  }

  huart5.Instance = USART5;
  huart5.Init.BaudRate = baud_rate;
  huart5.Init.WordLength = UART_WORDLENGTH_8B;
  huart5.Init.StopBits = UART_STOPBITS_1;
  huart5.Init.Parity = UART_PARITY_NONE;
  huart5.Init.Mode = UART_MODE_RX;
  huart5.Init.HwFlowCtl = UART_HWCONTROL_NONE;
  huart5.Init.OverSampling = UART_OVERSAMPLING_16;
  huart5.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
  huart5.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;

  if (HAL_UART_Init(&huart5) != HAL_OK)
  {
     my_error_handler(7);
  }

  HAL_UART_Receive_IT(&huart5,  &at_in_buff[0][0], 1);

  HAL_NVIC_SetPriority(USART4_5_IRQn, 5, 0);
  HAL_NVIC_EnableIRQ(USART4_5_IRQn);
}
Image

Re: Not working on ESP32-C3-Mini-1

Posted: Tue Jul 30, 2024 2:15 pm
by aliarifat794
Please check for any loose connections or soldering issues on the PCB.

Re: Not working on ESP32-C3-Mini-1

Posted: Tue Aug 06, 2024 3:00 am
by esp-at
To specifically determine whether the issue is with TX or RX, you can use a logic analyzer to capture the data on the UART TX & RX lines:
- Observe if the PCB's UART TX is correctly sending data to the Wi-Fi device's UART RX.
- Observe if the Wi-Fi device's UART TX is correctly sending data to the PCB's UART RX.

Re: Not working on ESP32-C3-Mini-1

Posted: Tue Aug 06, 2024 8:56 am
by javier.reyes
Did you flashed the module on your custom PCB correctly? Are you sure you are not in Bootloader mode instead of normal flash mode? Have you looked at the output of the LOG UART? Is the module logging anything at all in the LOG interface?