cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot select ADC channel 16 with CubeIDE and STM32G031J6

SKiri
Associate II

I'm trying to enable ADC channel 16 on STM32G031J6 but the IDE does not list up the channel.

What is the matter? How can I enable the channel?

0693W000005B6cNQAS.png 

My environment as bellow.

STM32CubeIDE

Version: 1.4.2

Build: 7643_20200813_1322 (UTC)

STM32CubeMX - STM32 Device Configuration Tool

Version: 6.0.1-RC3

Build: 20200810-1643 (UTC)

STM32CubeG0 Firmware Package V1.3.0 / 25-June-2019

1 ACCEPTED SOLUTION

Accepted Solutions
Khouloud ZEMMELI
ST Employee

Hello @SKiri​ ,

When sequencer is set to "not fully configurable" => CHSELRMOD = 0 in ADC_CFGR1

=> ADC_CHSELR is up to 19 channels (CHSEL 0 to CHSEL 18)

When sequencer is set to "fully configurable" => CHSELRMOD = 1 in ADC_CFGR1

=> ADC_CHSELR is able to sequence up to only 8 channels (CH 0 to CH 14)

The Rank configuration can be done only in the "fully configurable" sequencer case, for that, you cannot choose Channel 16 under Rank.

Best Regards,

Khouloud

View solution in original post

2 REPLIES 2
Khouloud ZEMMELI
ST Employee

Hello @SKiri​ ,

When sequencer is set to "not fully configurable" => CHSELRMOD = 0 in ADC_CFGR1

=> ADC_CHSELR is up to 19 channels (CHSEL 0 to CHSEL 18)

When sequencer is set to "fully configurable" => CHSELRMOD = 1 in ADC_CFGR1

=> ADC_CHSELR is able to sequence up to only 8 channels (CH 0 to CH 14)

The Rank configuration can be done only in the "fully configurable" sequencer case, for that, you cannot choose Channel 16 under Rank.

Best Regards,

Khouloud

SKiri
Associate II

Ah! I see!

Thanks a lot.​