Skip to main content
Bernardo1947
Associate II
February 3, 2023
Solved

STM32G030K6T6 with only 8 ADCs

  • February 3, 2023
  • 6 replies
  • 2752 views

I am developing a STM32 project with STM32G030K6T6 ADC channels but when I start setting the MCU, it allows only 8 ADC convertions (the datasheet describes there are 12 and the system configuration allows to add up to 12 channels) . However, I need all the 12 channels. How can I use them?

This topic has been closed for replies.
Best answer by Andreas Bolsch

That's due to your CHSELRMOD setting. Either up to 8 channels in arbitrary sequence or up to all channels in numerical sequence (up or down).

In CubeMX it's the "Sequencer" selection.

6 replies

Andreas Bolsch
Lead III
February 3, 2023

What do you mean by "when I start setting the MCU, it allows only 8 ADC"? CubeMX? It's possible to use 12 external channels, see picture.

Bernardo1947
Associate II
February 3, 2023

Yes, I enabled the 12 external channels, but when I try to use them with DMA, it appear this option on the image.0693W00000Y9wMEQAZ.png

waclawek.jan
Super User
February 3, 2023

This limitation stems from setting ADC_CFGR1.CHSELRMOD, read the ADC chapter in RM.

Cube/CubeMX implements only a fraction of the hardware's possible functionality.

JW

Andreas Bolsch
Andreas BolschBest answer
Lead III
February 3, 2023

That's due to your CHSELRMOD setting. Either up to 8 channels in arbitrary sequence or up to all channels in numerical sequence (up or down).

In CubeMX it's the "Sequencer" selection.

Bernardo1947
Associate II
February 3, 2023

@Community member​ which RM you mean?

Andreas Bolsch
Lead III
February 3, 2023

Obviously RM0454, that's for G0x0.

Bernardo1947
Associate II
February 3, 2023

@Andreas Bolsch​  so it's possible to use all the 12 channels, since I read them into a sequential order?

Andreas Bolsch
Lead III
February 3, 2023

Not only 12, all available channels (incl. the internal ones).