I am using the experimental_ble_app_uart for s110. I want to use the sd_temp_get() and convert the temperature value to a uint8_t, but if understand correctly when i do this i only get information from the first bytes of the int32_t and these are not the actual temperature value. I was wondering if someone could help me with this problem. This is part of the code i am using at the moment.

The value from sd_temp_get() is in units of 0.25 degrees Celsius (source). This means a value of 4 is 1 degree Celsius, a value of 8 is 2 degrees Celsius, a value of 12 is 3 degrees Celsius, etc.

Assuming you wish to convert the result into a whole number, you would simply divide it by four. I wouldn't worry about any integer overflow as a result of going from a 32 bit to an 8 bit number since the operating range of the nrf514122 is between -25 and 75 degrees C. However, since the temperature can drop below zero, you should use an int8_t instead of a uint8_t.