2023-04-18 02:35 AM
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
Solved! Go to Solution.
2023-04-19 12:23 AM - edited 2023-11-20 07:49 AM
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
I hope this helped!
2023-04-18 02:38 AM
Can you share a screenshot? with the information given i cannot help you.
Or you can share the IOC file
2023-04-18 07:13 PM
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
2023-04-19 12:23 AM - edited 2023-11-20 07:49 AM
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
I hope this helped!
2023-04-19 12:42 AM
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
2023-04-19 12:49 AM - edited 2023-11-20 07:50 AM
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
--Not fully configurable--
2023-04-19 12:55 AM
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
2023-04-19 01:10 AM
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