Skip to content

ufnalski/esp32_at_wifi_sntp_g431kb

Repository files navigation

ESP-AT Wi-Fi SNTP for STM32 (STM32G431KB)

AT (from 'attention') commands were originally developed in 1981 for dial-up modems1. Nowadays the idea is still being implemented in communication modems/modules. Sets of commands usually differ from device to device but the format of messages exchanged via UART is kept. Some common examples popular among DIYers include:

  • GSM/GPRS modules such as SIM9002,
  • BT/BLE modules such as AT-09/HM-103,
  • LoRa modules such as the ones from Reyax4,
  • Wi-Fi modules such as ESP32 SoC flashed with a dedicated firmware.

This submission focuses on the last one. We will provide the network time to an STM32 uC that has no ETH peripheral. Such an approach, i.e. to have a separate uC/SoC responsible for wireless communication, is not uncommon in connected devices. A popular example of that is the Arduino UNO R4 WiFi board5.

My setup

  • An ESP32-C6 evaluation board flashed with the newest ESP-AT firmware.
  • A Nucleo board plus an OLED to talk to the ESP32-C6.
  • A USB2UART converter for debugging plus the YAT serial terminal.
  • A logic analyzer to be able to check the exchanged messages directly on the wires.

ESP32-C6 AT SNTP in action

ESP32-C6 AT SNTP OLED

ESP32-C6 AT SNTP logic analyzer

ESP32-C6 AT SNTP YAT settings

ESP32-C6 AT SNTP YAT terminal

Missing files?

Don't worry 🙂 Just hit Alt-K to generate /Drivers/CMCIS/ and /Drivers/STM32G4xx_HAL_Driver/ based on the .ioc file. After a couple of seconds your project will be ready for building.

Tip

RTBM/RTFM6 - this will save you a lot of time. And yes, professionals do read manuals 🙂

Manuals and tools from Espressif

More examples

Call for action

Create your own home laboratory/workshop/garage! Get inspired by ControllersTech, DroneBot Workshop, Andreas Spiess, GreatScott!, ElectroBOOM, Phil's Lab, atomic14, That Project, Paul McWhorter, Max Imagination, and many other professional hobbyists sharing their awesome projects and tutorials! Shout-out/kudos to all of them!

Warning

Control engineering - do try this at home 😎

190+ challenges to start from: Control Engineering for Hobbyists at the Warsaw University of Technology.

Stay tuned!

Footnotes

  1. Hayes AT command set (Wikipedia)

  2. Moduł SIM900 GSM GPRS shield dla UNO R3 (msalamon.pl)

  3. Bluetooth 4.0 BLE - HM-10 (Botland)

  4. RYLR998 868/915MHz LoRa Antenna Transceiver Module (Reyax)

  5. UNO R4 WiFi (Arduino)

  6. RTFM (Wikipedia)

Releases

No releases published

Packages

No packages published