cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable VREFBUF and supply external VREF for ADC (which is assigned to M4 runtime context)?

NGajic
Associate III

Hi,

I need to supply external VREF for ADC which is assigned to M4 runtime context. Now when I start M4 firmware VREFBUF is activated (I'm measuring 2.5V on AVDD pin on DK2 kit). I suppose that I need to edit device tree, but I'm not sure. Can I for example set 3v3 supply in device tree and then connect wire between 3v3 and AVDD on DK2 board? How this can be done?

Thanks in advance,

Nenad

2 REPLIES 2
NGajic
Associate III

Today I edited device tree files for STM32MP157C-DK2 board but I had no luck. For my project I'm using stm32mp157c-dk2-m4-examples.dts file (I'm selecting it when board is booting). This .dts file is including stm32mp157c-dk2.dts file which is including stm32mp157a-dk1.dts file so I first disabled vrefbuf in stm32mp157a-dk1.dts file (changed from "okay" to "disabled"). Now when I start firmware which uses ADC on M4 the firmware didn't start because vrefbuf is disabled and in m4_adc node vref-supply is &vrefbuf. So I changed this to &v3v3. Now when I start M4 firmware I have no errors and firmware started, but this time 2.5V (VREFBUF default voltage) is always active on AVDD pin (VREF+) on Arduino header so I suppose that I can't connect external voltage as reference voltage for ADC. With default device tree files delivered from STM 2.5V is not active when M4 firmware which is using ADC is not started, 2.5V appear only when consumer is active (which is ADC on M4). This is seen in regulator_summary in debugfs. Still searching for solution...

PatrickF
ST Employee

Hi,

please check the Device Tree of STM32MP157-EV1 board, as on this board, VREF+ is tied to VDDA, so VREFBUF is not used.

Maybe have a look to https://wiki.st.com/stm32mpu/wiki/How_to_configure_system_resources

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.