Showing results for 
Search instead for 
Did you mean: 

STM32MP157 MINI - ADC Analog Muti channel IO

Associate II

Hello friends,
Please, if you can really help me, I'm not an expert in the Linux device tree.

I urgently need to understand the commands to execute on the device tree on the powerful STM32MP157 MINI Linux board alientek ATOMIC (Note: Chinese language, please right click google automatically translate from browser):


WiKi Compiler YOCTO Linux Image:




ADC1+ADC2  - Analog Multi channel IO




It is essential to create from device tree :

- 8 ANALOG type GPIO physical pins on the board (AN0,AN1,AN2, AN3,AN4,AN5,AN6,AN7)

- 3 GPIO physical pins of PWM type real time motors on the board (PWM0, PWM1,PWM3)

But manufacturing company says only 2 ADC pins can be read,
I attach STM32MP157 MINI mapping:



STM32MP157DAA1_1G-RAM _ 8GB-eMMC - Datasheet
But the powerful SOM BOARD STM32MP157DAA1_1G-RAM _ 8GB-eMMC clearly specifies 22 multiple IO Analog channels on ADC1 and ADC2 and 32 multiple PWM IO channelsADC_PWM_channel.jpg

Please multiple control of 8 analog sensors and 3 PWM sensors (motor control) in Linux is fundamental for my machine control project from Linux CPU, that's why I chose the powerful STM32MP157 MINI board from alintek (STM32MP157DAA1_1G-RAM _ 8GB-eMMC)

Your precious help is essential, thanks

ST Employee

Hi @bass34 

I don't know which kind of default configuration the board manufacturer has made on their HW and their provided SDK.


You should ask board manufacturer in first intend.

If you need to rebuild the whole Yocto sequence for a particular board, please have a look to


more specifically for ADC and PWM


you might also need to look at component datasheet and reference manual to see which pins have ADC input and TIM output capabilities (link to STM32MP157F page)




In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

thanks Patrick but I'm very angry,
the manufacturer responded Alientek simply by sending the pin mapping of the motherboard saying that only 2 GPIO PINS can be used to read channels and therefore only 2 analog sensors B23 e B24:




while their data sheet of their assembled SOM CORE Board STM32MP157DAA1_1G-RAM _ 8GB-eMM clearly talks about ADC1 and ADC2 on which up to 22 analog channels can run, I am very angry now and confused:


Link Mega pin MAPPING STM32MP157 MINI Linux development board Alientek:



Link MEGA SOM CORE Board STM32MP157DAA1_1G-RAM _ 8GB-eMM - Alientek:




Scheda di sviluppo Linux Alientek STM32MP157 (cinese, tradurre il pulsante dal browser):
nessuna indicazione su come mappare e inizializzare canali multi analogici e PWM sui pin del connettore GPIO:



Is it possible to indicate here a ready-made YOCTO STM32MP157 factory linux image?                                              Device tree already integrated with multi analog pin GPIO and multi PWM pin GPIO real time motor control?

NOTE: Little information Linux system ready images fast run on STM32MP157 compared to the raspberry platform -

Associate II

is there anyone here?
Not possible too little information on STM32MP157 Linux platform, analog GPIO multi pin mapping,

Associate II

The manual for MULTIPLEXING GPIO pins has arrived and I attach it here on topic,
but it is not clear how to create a new .tsv file of the new firmware

1) after modifying the dtsi files of the KERNEL source device tree (mapping of the new 6 GPIO pins as Analog INPUT) how to create a new firmware .tsv file?


Should these 3 commands for compiling the new device tree be executed via ssh directly on the file system of the STM32MP157 MINI board?

1)source /opt/st/stm32mp1/3.1-snapshot/environment-setup-cortexa7t2hf-neonvfpv4-ostl-linux-gnueabi
2) make stm32mp1_atk_defconfig
3) make uImage dtbs LOADADDR=0XC2000040 vmlinux -j16




2) The software to read the analog voltage on a specific GPIO PIN as per the MULTIPLEXING manual on page 56 is performed by calling together device 1 (entire ADC1 voltage) and device 2 (entire ADC2 voltage), but in the case of 6 pins GPIO separated and configured on ADC1 and ADC2 how do you read the analog voltage on the individual GPIO pins separately and independently:



Hi @bass34 

I cannot help you on the way to generate binaries from Alientek SDK (As ST support is done with Yocto based SDK, see ).

Regarding ADC, please have a look to


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi Patrick
Thank you, 


The YOCTO factory image of the STM32MP157 is a .tsv:



The MULTIPLEXING STM32MP157 MINI powerful board manual says that after editing the .dtsi files:

"Once you have completed editing the files, save the file and compile the device tree by indicating these commands MAKE Compile":

source /opt/st/stm32mp1/3.1-snapshot/environment-setup-cortexa7t2hf-neonvfpv4-ostl-linux-gnueabi
make stm32mp1_atk_defconfig
make uImage dtbs LOADADDR=0XC2000040 vmlinux -j16


1) but where should they be launched on the STM32MP157 MINI board or on the compiler PC?

2) how to create a new .tsv file with compiled analog GPIO multi pins?


Associate II

For reading the Analog IOs I want to use the powerful python3 pinPong libraries developed by DFRobot, a quick compile and run technique, specify only the IO pin number on which the sensor is connected, without any specification of the type of MCU microcontroller integrated on the ARM CPU (Arduino , ESP32, Risk), can you tell me does it also work on the Linux STM32MP157 board for analog IO reading MPU integrated?​​​ specifies

image (8).png