cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G070CB: STM32CubeMX Ver 6.8.0

Chan.Calvin
Associate II

Hi

In my MX setup, using STM32G070CB, I tried to allocate PB11 as ADC_IN15 and PB12 as ADC_IN16. Funny enough, the PB11 & PB12 pins are changed in yellow colours, While PB10 as ADC_IN11 bears no problem with the normal green colour allocated.

Hovering both PB11 and PB12 pins gives information about ADC1_IN15 (no mode) and ADC1_IN16 (no mode) while at PB10 pin, it is ADC1_IN11 (IN11).

The same applies to STM32G071RB and the like.

Any one has any idea what is that all about? Is it a Mx bug or what?

Rgds

Calvin

1 ACCEPTED SOLUTION

Accepted Solutions

You are proberly still in normal mode and not in legacy mode.

If you configer the ADC to "not fully configurable" you can use ADC_IN15&16&17


_legacyfs_online_stmicro_images_0693W00000biO0fQAE.png
_legacyfs_online_stmicro_images_0693W00000biO1JQAU.pngI hope this helped!

View solution in original post

7 REPLIES 7

Can you share a screenshot? with the information given i cannot help you.

Or you can share the IOC file

Chan.Calvin
Associate II

Hi

Just open a new project with the STM32G070RB device selected.

click on PB10 to select ADC1_IN11 to turn green

click on PB11 to select ADC1_IN15, and PB12 to select ADC1_IN16 both turns yellow.

Here is the screenshots and ioc file in zip.

01 and 02 pictures shows the hovering at PB10 (green- ADC1_IN11 (IN_11)), and PB12 (yellow _ ADC1_IN16 (no mode)).

The centre panel-ADC mode and configuration, shows ADC configuration with IN15 to IN18 grey out ???

BTW, Vsense is IN12, Vrefint is IN13 and Vbat/3 is IN14 though which are not exposed in the centre panel.

Rgds

Calvin

You are proberly still in normal mode and not in legacy mode.

If you configer the ADC to "not fully configurable" you can use ADC_IN15&16&17


_legacyfs_online_stmicro_images_0693W00000biO0fQAE.png
_legacyfs_online_stmicro_images_0693W00000biO1JQAU.pngI hope this helped!

Chan.Calvin
Associate II

Thank you for the reply, That seems to solve the problem. It is really hidden in the reference manual that is not easy to spot.

Calvin

No problem

Took me a while to find it! hope it helps you and more people!

!!Source RM0454 section 14.3.8 page 284 and 285


_legacyfs_online_stmicro_images_0693W00000biOAfQAM.png 

--Not fully configurable--


_legacyfs_online_stmicro_images_0693W00000biOAuQAM.png
_legacyfs_online_stmicro_images_0693W00000biOBEQA2.png

Chan.Calvin
Associate II

That is correct. Really need to look deep into the reference manual and need to understand what is it all about. Surely this should help other users as well.

Good catch.

Calvin

Chan.Calvin
Associate II

By the way, a newly created project should have the default of 0 for CHSELRMOD bit if not explicitly configured, which means the default is "Sequencer not fully configurable" and should have the green for both PB11 & PB12 though. But this is not the case.

Calvin