Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Embiq Community

  1. Home
  2. Get Help
  3. Firmware & FreeRTOS
  4. 🔧 Firmware bugs? Post like this

🔧 Firmware bugs? Post like this

Scheduled Pinned Locked Moved Firmware & FreeRTOS
firmwarefreertoshelp
1 Posts 1 Posters 128 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    admin
    wrote on last edited by
    #1

    Half of firmware debugging is how you ask. A good report gets you an answer in an hour; "it doesn't work" gets you silence. Use this format every time:

    What I'm trying to do: one sentence — the goal, not the method.
    What I tried: the steps, in order. "Changed the baud rate, added a delay, swapped cables."
    What happened: exact text, not paraphrase. Paste the panic dump, the serial output, the wrong value.
    My setup: board (ESP32 DevKitC? which revision), IDE + version, relevant library versions.
    Minimal code: the smallest snippet that reproduces it — 20 lines beats 500. Use code blocks, never screenshots of code.
    Serial output: pasted as text, from boot to failure.

    Decode your own crash first

    A Guru Meditation Error print is a gift — it tells you the exception cause, the guilty program counter, and a backtrace. The fastest path: rebuild the exact same binary with symbols, feed the addresses to the decoder, and read the function names. Nine times out of ten it lands on one of these:

    • Stack overflow — a task with a 1 KB stack calling deep library functions, or a large array declared inside a function. Symptom: crash inside random-looking code, corrupted backtrace. Fix: grow the stack, move big buffers to static/global.
    • Watchdog bite — a task that never blocks. Any loop without a delay or blocking call starves the idle task and the watchdog resets the chip. Fix: yield every iteration.
    • Null / wild pointer — dereferencing a queue handle or object that was never created, or used after deletion. Symptom: LoadProhibited on an address near zero. Fix: check every create call's return before use.
    • Shared state without protection — a variable touched from a task and an ISR (or two tasks) with no guard. Symptom: works for hours, then corrupts once. Fix: qualifier or guard, depending on who shares it.

    The five gotchas that solve most posts here

    1. ADC reads garbage with WiFi on → use ADC1 pins, never ADC2 under WiFi.
    2. Board resets randomly on USB → weak cable or port; measure the rail under load, try a shorter cable and a powered hub.
    3. Serial shows garbage → monitor baud must match Serial.begin() exactly.
    4. "Worked yesterday" → something changed: code, wiring, power source, library update. Figure out what, then bisect it.
    5. Timing drift under WiFi → never use blocking delays for cadence; sample on a stable timebase.

    Post with the format above and tag with firmware, freertos or esp32.

    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    Powered by NodeBB Contributors
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups