cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030K6T6 with only 8 ADCs

Bernardo1947
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Andreas Bolsch
Lead II

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.

View solution in original post

8 REPLIES 8
Andreas Bolsch
Lead II

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

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

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
Lead II

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

@Community member​ which RM you mean?

Obviously RM0454, that's for G0x0.

Bernardo1947
Associate II

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

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