2024-06-06 01:18 PM - edited 2024-06-06 01:28 PM
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):
https://www.bilibili.com/video/BV15U4y1E7Bh/
https://www.bilibili.com/video/BV1kr4y1c7bv/
https://www.alientek.com/Product_Details_17/31.html
WiKi Compiler YOCTO Linux Image:
https://han-ya.blogspot.com/2024/03/stm32mp157-linux.html
ADC1+ADC2 - Analog Multi channel IO
DEVICE TREE
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 channels:
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
2024-06-07 02:46 AM
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
https://wiki.st.com/stm32mpu/wiki/Category:STM32MPU_Embedded_Software_distribution
more specifically for ADC and PWM
https://wiki.st.com/stm32mpu/wiki/ADC_device_tree_configuration#DT_configuration_-board_level-
https://wiki.st.com/stm32mpu/wiki/PWM_overview
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)
Regards.
2024-06-07 12:02 PM - edited 2024-06-07 12:04 PM
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:
https://mega.nz/file/QHtSWJwT#i2PgTgWjf48058L6PZbGG666GtgZ5CBr89ktRE0znoM
Link MEGA SOM CORE Board STM32MP157DAA1_1G-RAM _ 8GB-eMM - Alientek:
https://mega.nz/file/ND12UJwB#ThZhvhrpqe2X3mz7G6Mb5SgykJ1XQyiwGn1z3Ebr9gc
2024-06-07 01:58 PM - edited 2024-06-07 02:14 PM
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:
http://47.111.11.73/thread-327490-1-1.html
https://www.cnblogs.com/toutiegongzhu/p/17632985.html#%E2%91%A4%20of_iomap%20%E5%87%BD%E6%95%B0
2024-06-08 08:29 AM - edited 2024-06-08 08:30 AM
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 -
2024-06-09 05:21 AM - edited 2024-06-09 05:22 AM
is there anyone here?
Not possible too little information on STM32MP157 Linux platform, analog GPIO multi pin mapping,
2024-06-13 03:29 PM - edited 2024-06-13 03:41 PM
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:
2024-06-14 05:34 AM
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 https://wiki.st.com/stm32mpu/wiki/STM32MP1_Distribution_Package ).
Regarding ADC, please have a look to
https://wiki.st.com/stm32mpu/wiki/ADC_device_tree_configuration
https://wiki.st.com/stm32mpu/wiki/ADC_OpenSTLinux_drivers#Linux_kernel_driver
Regards
2024-06-14 12:40 PM
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?
2024-06-14 03:07 PM - edited 2024-06-14 03:09 PM
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?
https://www.unihiker.com/wiki/pinpong_python_lib
https://wiki.dfrobot.com/pinpong_introduction
https://www.unihiker.com/wiki/system-framework
https://www.unihiker.com/wiki/ specifies