Adjusted global struct to be volatile, it is updated through ISR