# Technical reference manual for Argon-ESP32 connection

**URL:** https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481
**Category:** Firmware
**Tags:** argon
**Created:** [November 11, 2021, 5:50am UTC](https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481 "2021-11-11T05:50:25Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jsbang](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jsbang](https://community.particle.io/u/jsbang)
#### Post date: [November 11, 2021, 5:50am UTC](https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481/1 "2021-11-11T05:50:25Z")

</div>

I’m trying to create my own firmware to load onto nrf52840.  
What I understood is:

1. Argon connects nrf52840 and ESP32 using UART,
2. ESP32 is already programmed and accessible using AT commands (CLI)

However, I am quite confused, which signal (0 or 1) should I put into BOOT\_MODE, WIFI\_EN, HOST\_NWK?

My question is:

1. Is there a technical reference manual regarding the setup between nrf52840 and ESP32?
2. If not, is there example source codes regarding the setup (using APIs of GPIO and UART level)?

Many thanks in advance!

---

<div class="post-metadata">

### Author: ![rickkas7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rickkas7/32/8681_2.png) [@rickkas7](https://community.particle.io/u/rickkas7)
#### Post date: [November 11, 2021, 3:15pm UTC](https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481/2 "2021-11-11T15:15:57Z")

</div>

On the Argon the the ESP32 does connect by UART serial to Serial2 and it uses esp-at, the AT command interface.

This is how you get the ESP32 to boot from user firmware manually. You’ll be doing this directly from your nRF52 code, but it should be obvious how to translate it.

```cpp
    WiFi.off();
    delay(5000);

    // Enable ESP32
    _log.trace("rebooting ESP32");

    pinMode(ESPBOOT, OUTPUT);
    pinMode(ESPEN, OUTPUT_OPEN_DRAIN);
    digitalWrite(ESPBOOT, 1);
    delay(100);
    digitalWrite(ESPEN, 0);
    delay(100);
    digitalWrite(ESPEN, 1);
    delay(100);

    // Set up serial
    _log.trace("Starting serial");
    Serial2.begin(921600, SERIAL_FLOW_CONTROL_RTS_CTS); // 115200

```

There is no documentation, however the Argon [schematics](https://github.com/particle-iot/argon) are open source. This is the [fork of esp-at](https://github.com/particle-iot/esp32-at).

Note that the Argon uses the ESP32 in CMUX mode, and the esp-at build does not have multi-socket enabled. It’s going to be a lot of work implementing CMUX in native nRF52. You may want to consider also rebuilding the esp-at with AT-based multi-socket and server enabled instead of CMUX.

---

<div class="post-metadata">

### Author: ![jsbang](https://avatars.discourse-cdn.com/v4/letter/j/b3f665/32.png) [@jsbang](https://community.particle.io/u/jsbang)
#### Post date: [November 12, 2021, 1:09am UTC](https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481/3 "2021-11-12T01:09:59Z")

</div>

It helped a lot!  
Well, I’m not going to implement multi-socket behavior, but it is also good to know that there’s a way.  
Thank you, and have a nice day.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/6/4/64635adccc35238caa19e9b553ec3e98b163d026.png) [@system](https://community.particle.io/u/system)
#### Post date: [December 12, 2021, 11:10am UTC](https://community.particle.io/t/technical-reference-manual-for-argon-esp32-connection/61481/4 "2021-12-12T11:10:02Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
