If I create new project and I call this string predefined function or extern variables all works fine. But when I continuously modified or did some operation with those string function or variables then those functions are not working properly and shows some junk characters at the UART output.

1

There are 1 best solutions below

0
On

It may because of the memory issue. please check the buzzer size if it is string array, make sure if are you using string then at end of the buzzer put the null ('\0') terminate.

If you are modifying variable in different process or function , please try to use "volatile " key word for the update.

Thank you. Ketan