Skip to main content
SKiri
Associate
November 12, 2020
Solved

Cannot select ADC channel 16 with CubeIDE and STM32G031J6

  • November 12, 2020
  • 2 replies
  • 2536 views

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

This topic has been closed for replies.
Best answer by Khouloud ZEMMELI

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

2 replies

Khouloud ZEMMELI
Khouloud ZEMMELIBest answer
ST Employee
November 12, 2020

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
SKiriAuthor
Associate
November 12, 2020

Ah! I see!

Thanks a lot.​