Skip to content
Back to skills

Esp32 Can Fd Gateway

ASecurity

Use when building CAN or CAN-FD gateways with ESP32, including TWAI, external CAN-FD controllers, bus-off recovery and industrial isolation.

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
ai-agentsnode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add Esmail-sarhadi/esp32-agent-skills --skill esp32-can-fd-gateway --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Esp32 Can Fd Gateway?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Esp32 Can Fd Gateway
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/esmail-sarhadi-esp32-can-fd-gateway/badge)](https://www.skillsdirectory.com/skills/esmail-sarhadi-esp32-can-fd-gateway)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: esp32-can-fd-gateway
description: Use when building CAN or CAN-FD gateways with ESP32, including TWAI, external CAN-FD controllers, bus-off recovery and industrial isolation.
license: MIT
---

# ESP32 Can Fd Gateway

Classic ESP32 TWAI is a Classical CAN controller, not CAN-FD. Some newer SoCs have different peripheral support; check the exact target. CAN-FD requires an FD-capable controller and transceiver path.

## Controller capability

- Verify TWAI presence and supported modes in the target datasheet and ESP-IDF release.
- Do not assume S2/S3/C3/C6/H2/P4 share the same CAN peripheral capability.
- For CAN-FD, select an external FD controller such as an SPI-attached device and a matching FD transceiver; a Classical CAN transceiver/controller cannot transmit FD frames.
- Keep controller, transceiver and protocol support distinct in the design document.

## Physical bus

- Terminate the CAN differential pair with 120 Ω at the two physical ends only; measure approximately 60 Ω across CANH/CANL on an unpowered, correctly terminated bus.
- Use twisted pair, appropriate common-mode range, isolation and surge protection for industrial wiring.
- Keep stubs short relative to bitrate and topology.
- Select transceiver standby, slope and fault behavior deliberately.

## Firmware behavior

- Configure bitrate and sample point to match the network; CAN-FD has separate nominal and data phase rates.
- Handle error-passive and bus-off states explicitly; define bounded recovery and expose counters.
- Use hardware acceptance filters where available; avoid unbounded application queues.
- Timestamp frames and preserve arbitration ID, DLC, flags and payload length without truncation.

## Gateway safety

- Define ID translation, rate limiting, filtering and loop prevention.
- Never blindly bridge safety-critical frames between buses with different bitrate or semantics.
- Preserve FD/BRS/ESI flags and reject unsupported frames explicitly.
- Provide watchdog behavior that leaves outputs in a safe state if the gateway stalls.

## Verification

| Test | Expected result |
|---|---|
| Two-node nominal bus | ACK and correct frames |
| Missing termination | Error counters reveal degradation |
| Bus-off injection | Recovery policy executes |
| FD frame on Classical CAN path | Explicit rejection, no silent truncation |
| Gateway overload | Bounded queue and observable drops |

## Agent rules

- State controller and transceiver part numbers separately.
- Never label Classical CAN as CAN-FD.
- Require a bus topology and bitrate before generating a pin/wiring example.
- Treat bus-off recovery as a system policy, not an unconditional automatic retry.

Files in this skill

  • LICENSE.txt823 B
  • SKILL.md2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.