So we had a field issue, and after days of debugging, narrowed down the problem to this particular bit of code, where the processing in a while loop wasn\'t happening :
Literal 1 in of int, i.e. in your case int32 type, so operations with int32 and int16 give results of int32.
1
int
To have result of numberA + 1 statement as uint16_t try explicit type cast for 1, e.g.: numberA + (uint16_t)1
numberA + 1
uint16_t
numberA + (uint16_t)1