Become a leader in the IoT community!

New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!

Step 1 of 5

CREATE YOUR PROFILE *Required

Change Email
OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Collaboration & Work 🤝
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware & Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. Our community uses Answer Overflow to index content on the web. By posting in this channel your messages will be indexed on the worldwide web to help others find answers.
  7. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Why does my MCU produce garbage characters on the serial monitor after a reset &how can I prevent it

file0.jpg

  1. undefined2001#0000

    I am getting this whenever I reset my MCU

  2. undefined2001#0000

    which introduce a garbage character to my serial monitor

  3. undefined2001#0000

    is it normal and how to prevent it?

  4. enthernetcode#0000

    @undefined2001 A spurious serial data transmission occurring when your microcontroller (`MCU`) resets is kinda common which leads to a garbage character appearing on your serial monitor. it’s usually caused by
    `UART Line Behavior During Reset`, `Baud Rate Instability` and electrical noise to resolve this u should use a capacitor on d reset pin to reduce noise and signal instability and also ensure `UART` transmissions are only enabled after full initialization, Implement pull-up/pull-down resistors on UART lines to prevent them from floating and apply logic to ignore or filter unexpected characters during startup.

  5. undefined2001#0000

    got it

  6. undefined2001#0000

    I am using a aliexpress board it doesn’t have any pull up resistor on uart line

  7. enthernetcode#0000

    Implement it and u should be good

  8. undefined2001#0000

    should I go with 10K one?

  9. undefined2001#0000

    i doesn’t have a bit low value like 4.7k one

  10. enthernetcode#0000

    Yea its okay

  11. undefined2001#0000

    not fixing the issue

  12. enthernetcode#0000

    But if u issues like electrical noise or instability surfaces the solution would be d 4.7k

  13. undefined2001#0000

    maybe 4.7k is needed

  14. enthernetcode#0000

    Then I think u really need d 4.7k

  15. enthernetcode#0000

    Yea

  16. undefined2001#0000

    adding two 10k in parallel should do the job

  17. undefined2001#0000

    since it will be 5k

  18. enthernetcode#0000

    Not done this b4 but u can try it out and see if it does

  19. undefined2001#0000

    still the issue remains

  20. undefined2001#0000

    I think the behavior is kinda normal

  21. enthernetcode#0000

    Did u add d logic to filter out the unexpected/garbage characters

  22. undefined2001#0000

    no

  23. undefined2001#0000

    it is happening as i hit the reset button

  24. undefined2001#0000

    there is no code to run at that stage

  25. enthernetcode#0000

    Is ur pull up resistor closed to ur uart input pin

  26. superbike_z#0000

    is it corrupting anything or just spurios noise on power cycle?

  27. undefined2001#0000

    noise on power cycle

  28. superbike_z#0000

    have you read the datasheet, go through that power up and power down sequence again

  29. superbike_z#0000

    There could be some work happening during power cycle that you may not be able to change

CONTRIBUTE TO THIS THREAD

Browse other questions tagged