Skip to main content
Hoang_Tran
Associate III
Apr 27, 2019 4:31 AM UTC
Solved

error when changing the UART parameter

error description:

I wrote a function to change the UART parameter! After using this function, the UART parameter worked as installed but when the data was sent, the UART interrupt function changed a global variable of I am back to 0!

Everyone can see more in the video link: https://drive.google.com/file/d/1rr3l6uq9uWrCteFjBGVlcXUlvGNMlUly/view? usp = sharing

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Apr 27, 2019 6:35 AM UTC

Liking you own post seems a bit unnecessary.

How large is the stack? Does the problem change if you define your local/auto variables as static?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Apr 27, 2019 6:35 AM UTC

Liking you own post seems a bit unnecessary.

How large is the stack? Does the problem change if you define your local/auto variables as static?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Hoang_Tran
Associate III
May 2, 2019 8:02 AM UTC

0690X000008BA1xQAG.pnghi!the stack size is 128byte!I used debug for printf address of variable!the address of tmp( variable in interrupt UART function) include address of MB_COIL(global Variable)