Check https://os.mbed.com/platforms/ST-Nucleo-L432KC/It is mentioned there:By default the PA_5 (A4) and PA_6 (A5) pins can only be used as Input floating (ADC function). Remove SB16 and SB18 solder bridges in order to use these pins as Digital output...