It has nothing to do with printf. If I try another way of exposing the value of variable, such as sending it to mprj_datal or send it raw out over the UART, I get the same result. The variable reads as garbage the first time its read, and correctly all other times.