Question
uint16_t sometimes overflow in 255
Posted on September 25, 2017 at 00:19
Hello friends
I defined a variable uint16_t x;
in my code I will compare x >= 500 Most of the time works fine
But sometimes variable is Overflow in 256 i see in debug
variable is 0 after 255+1
i using IAR , STM32F103ZET6 , HAL
How can I fix this?
Thank