Where can I see the internal reference buffer settings for STM32 in micropython?

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
ndarkness
Posts: 3
Joined: Tue Feb 12, 2019 6:41 pm

Where can I see the internal reference buffer settings for STM32 in micropython?

Post by ndarkness » Wed Feb 13, 2019 8:06 am

Hello

I am working with micropython for a STM32L4 mcu.

I would like to ensure that my adc is using the external voltage reference that I am imposing to. Thus, I want to check whether or not the internal reference buffer is disabled in micropython for this mcu.

How and where can I check this?

Thanks in advance

User avatar
marfis
Posts: 191
Joined: Fri Oct 31, 2014 10:29 am
Location: Zurich / Switzerland

Re: Where can I see the internal reference buffer settings for STM32 in micropython?

Post by marfis » Thu Feb 14, 2019 12:08 pm

you can always check the HW registers... e.g. stm.mem32[stm.VREFBUF]

assigning 5 for example activates the 2.5v reference

ndarkness
Posts: 3
Joined: Tue Feb 12, 2019 6:41 pm

Re: Where can I see the internal reference buffer settings for STM32 in micropython?

Post by ndarkness » Mon Oct 07, 2019 1:12 pm

HI,

Could you let me know what is exaclty stm in your code?

User avatar
jimmo
Posts: 632
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia

Re: Where can I see the internal reference buffer settings for STM32 in micropython?

Post by jimmo » Mon Oct 07, 2019 11:01 pm

Code: Select all

import stm
It's a module that gets auto-generated by the build system to include a constant for all the register names for your build target.

Post Reply