2025-10-07 2:09 PM
Hi,
When transmitting data to the ttySTM0 port, the data goes to the UART4_TX pin connected to the JTAG virtual serial input. However, I need an available TTL serial port to communicate with a microcontroller. How do I enable the USART1 port connected to the PC0/PB0 pins?
To which pins is the ttySTM3 port linked? How do I enable it?
root@stm32mp1:~# dmesg | grep tty
[ 0.000000] Kernel command line: root=PARTUUID=e91c4e10-16e6-4c0e-bd0e-77becf4a3582 rootwait rw console=ttySTM0,115200
[ 0.598790] 40010000.serial: ttySTM0 at MMIO 0x40010000 (irq = 61, base_baud = 4000000) is a stm32-usart
[ 3.619483] printk: console [ttySTM0] enabled
[ 4.294977] 4c001000.serial: ttySTM3 at MMIO 0x4c001000 (irq = 62, base_baud = 4000000) is a stm32-usart
[ 4.304256] serial serial0: tty port ttySTM3 registered
[ 11.426540] systemd[1]: Created slice Slice /system/getty.
[ 11.502583] systemd[1]: Created slice Slice /system/serial-getty.
Solved! Go to Solution.
2025-10-13 6:36 AM - edited 2025-10-13 6:46 AM
Hi @AMend.7 ,
You need to go to the file .../stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sources/ostl-linux/linux-stm32mp-6.6.78-stm32mp-r2-r0
https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package#Installing_the_OpenSTLinux_BSP_packages
2025-10-08 12:35 AM
Hi @AMend.7 ,
I think this wiki page can help you :
https://wiki.st.com/stm32mpu/wiki/Serial_TTY_device_tree_configuration
Regards,
Grégory
2025-10-13 5:51 AM
Hi Gregory,
I was only able to install the source code (BSP) from the Developer package. Now I don't know what to do next:
Is it mandatory to use STM32CubeIDE to generate a new dts Device Tree file, or can I just edit the kit's original BSP dts file? If so, in which directory of the BSP source code is this dts file located?
After editing the dts file, can I compile this file separately, or do I need to recompile the entire Linux kernel?
Ari
2025-10-13 6:02 AM
Hi @AMend.7 ,
You can find an explanation here about how to modify your device tree. You don't need to use the Cube IDE. You can edit the DT directly.
Regards,
Grégory
2025-10-13 6:22 AM
Grégory,
According to the link, the dts file is in the path: arch/arm/boot/dts/stm32mp135f-dk.dts but I can't find this path in the BSP source code installation on my computer: \Developer-Package\stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.08.27\sources\ostl-linux
Ari
2025-10-13 6:36 AM - edited 2025-10-13 6:46 AM
Hi @AMend.7 ,
You need to go to the file .../stm32mp-openstlinux-6.6-yocto-scarthgap-mpu-v25.06.11/sources/ostl-linux/linux-stm32mp-6.6.78-stm32mp-r2-r0
https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package#Installing_the_OpenSTLinux_BSP_packages
2025-10-13 7:24 AM
Grégory,
Thank you very much.
I found the file. I'll try following the steps in the link you sent me to test changing the LED's initial state before trying to add a new serial port to the kit's Linux image.
Ari