VREFBUF configuring based on GPIO state with CubeMx
I am using a G474RE nucleo board and i have 2 separate interface boards which i ca connect to it.
One board requires a VREFBUS of 2.5V and the other 2.90 .
Currently i modify the .IOC file and select the appropriate VREFBUS, compile the code. So currently i have 2 separate .elf files, one for each scenario.
I will want a single code version so that on start up based on the status of a switch connected to a GPIO,
it will configure the correct VREFBUF value.
The attachment shows my setup for the 2.90V internal voltage reference.
Thanks
David

