Not working on ESP32-C3-Mini-1

vapisoft
Posts: 12
Joined: Sun Sep 03, 2023 6:12 am

Not working on ESP32-C3-Mini-1

Postby vapisoft » Tue Jul 30, 2024 8:59 am

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
Attachments
ESP32_TX_RX.jpg
ESP32_TX_RX.jpg (171.9 KiB) Viewed 2155 times

aliarifat794
Posts: 128
Joined: Sun Jun 23, 2024 6:18 pm

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

Postby aliarifat794 » Tue Jul 30, 2024 2:15 pm

Please check for any loose connections or soldering issues on the PCB.

esp-at
Posts: 177
Joined: Mon May 09, 2022 3:00 am

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

Postby esp-at » Tue Aug 06, 2024 3:00 am

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.

javier.reyes
Posts: 2
Joined: Tue Jul 09, 2024 8:09 am

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

Postby javier.reyes » Tue Aug 06, 2024 8:56 am

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?

Who is online

Users browsing this forum: No registered users and 19 guests