Add Phase 0 RS-232 characterization harness and test firmware with cli
This commit is contained in:
@@ -6,16 +6,17 @@ Universal wireless serial adaptor firmware for the ESP32-S3.
|
||||
|
||||
## Initial hardware target
|
||||
|
||||
- ESP32-S3-DevKitC-1
|
||||
- ESP32-S3-DevKitC-1-compatible development board
|
||||
- ESP32-S3-WROOM-1-N16R8 module
|
||||
- 16 MB flash
|
||||
- 8 MB octal PSRAM
|
||||
- Adafruit MAX3243 full-pinout RS-232 breakout, product 5988
|
||||
|
||||
The initial smoke-test firmware continuously sweeps the onboard addressable RGB LED through the color wheel at reduced brightness. The official ESP32-S3-DevKitC-1 v1.0 uses GPIO48 for the LED data signal, while official v1.1 boards use GPIO38. Compatible boards and clones may vary.
|
||||
The current firmware is a command-driven **Phase 0 hardware-characterization harness**. It validates the MAX3243 breakout, its three drivers, its five receivers, valid-signal detection, active-low shutdown, and UART1 loopback before development of the wireless serial firmware begins. Tests run only when explicitly requested at the console; booting the board does not start an electrical test.
|
||||
|
||||
## Hardware wiring
|
||||
|
||||
See [`wiring.md`](wiring.md) for hardware-specific wiring profiles. The initial profile covers the ESP32-S3-DevKitC-1 N16R8 and the Adafruit MAX3243 full-pinout RS-232 breakout.
|
||||
See [`wiring.md`](wiring.md) for the hardware profile, GPIO assignments, loopback diagrams, safety notes, and the recommended test sequence. The initial profile covers the ESP32-S3-DevKitC-1 N16R8 and the Adafruit MAX3243 full-pinout RS-232 breakout.
|
||||
|
||||
## Build
|
||||
|
||||
@@ -29,18 +30,34 @@ Connect the board's USB-to-UART port, then run:
|
||||
|
||||
```sh
|
||||
pio run --target upload
|
||||
pio device monitor
|
||||
pio device monitor -b 115200
|
||||
```
|
||||
|
||||
The application logs its startup, detected PSRAM size, and configured RGB LED GPIO at 115200 baud. Expected output includes:
|
||||
The firmware starts an interactive console on UART0. Type `help` to display command descriptions. The Phase 0 commands are:
|
||||
|
||||
```text
|
||||
ESP32-S3 build-chain smoke test started
|
||||
PSRAM initialized: 8388608 bytes
|
||||
Sweeping the onboard RGB LED on GPIO48
|
||||
status
|
||||
transceiver <enable|disable>
|
||||
drivers <tx 0|1> <dtr 0|1> <rts 0|1>
|
||||
loopback-a
|
||||
loopback-b
|
||||
valid-test
|
||||
uart-loopback <baud> [8N1|8E1|8O1|8N2|7E1|7O1] [bytes]
|
||||
uart-suite
|
||||
```
|
||||
|
||||
If the firmware runs but the RGB LED remains dark, verify the board revision. The project defaults to GPIO48, commonly used by DevKitC-compatible boards and official v1.0 boards. For an official v1.1 board — or another board wired that way — change `RGB_LED_GPIO` in `platformio.ini` from `48` to `38`, rebuild, and upload again.
|
||||
`uart-loopback` defaults to `8N1` and 256 bytes. Its accepted payload range is 1–512 bytes. `uart-suite` covers 300 through 250000 baud and all supported frame formats. Follow the applicable loopback wiring in [`wiring.md`](wiring.md) before invoking a test.
|
||||
|
||||
The onboard RGB LED reports the most recent test-harness state:
|
||||
|
||||
| Color | Meaning |
|
||||
|---|---|
|
||||
| Blue | Idle; waiting for a command |
|
||||
| Yellow/orange | Test running |
|
||||
| Green | Last test passed |
|
||||
| Red | Last test failed |
|
||||
|
||||
This hardware profile uses the onboard RGB LED on GPIO48. Official ESP32-S3-DevKitC-1 v1.1 boards commonly use GPIO38 instead, and compatible boards or clones may vary. A different board revision requires an adjusted board pin profile before running this firmware.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
Reference in New Issue
Block a user