Skip to main content
Explorer
October 7, 2025
Solved

STM32MP135F-DK OpenSTlinux USART1/USART2

  • October 7, 2025
  • 2 replies
  • 289 views

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.

    This topic has been closed for replies.
    Best answer by Gregory PLANCHON

    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

    2 replies

    ST Employee
    October 8, 2025

    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

    AMend.7Author
    Explorer
    October 13, 2025

    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

    ST Employee
    October 13, 2025

    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

    AMend.7Author
    Explorer
    October 13, 2025

    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