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!
I am getting this whenever I reset my MCU
which introduce a garbage character to my serial monitor
is it normal and how to prevent it?
@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.
got it
I am using a aliexpress board it doesn’t have any pull up resistor on uart line
Implement it and u should be good
should I go with 10K one?
i doesn’t have a bit low value like 4.7k one
Yea its okay
not fixing the issue
But if u issues like electrical noise or instability surfaces the solution would be d 4.7k
maybe 4.7k is needed
Then I think u really need d 4.7k
Yea
adding two 10k in parallel should do the job
since it will be 5k
Not done this b4 but u can try it out and see if it does
still the issue remains
I think the behavior is kinda normal
Did u add d logic to filter out the unexpected/garbage characters
no
it is happening as i hit the reset button
there is no code to run at that stage
Is ur pull up resistor closed to ur uart input pin
is it corrupting anything or just spurios noise on power cycle?
noise on power cycle
have you read the datasheet, go through that power up and power down sequence again
There could be some work happening during power cycle that you may not be able to change
CONTRIBUTE TO THIS THREAD