Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access serial/uart ports on STM32MP157-Dev DK2 board #62

Open
SPJAU opened this issue Feb 10, 2025 · 4 comments
Open

Access serial/uart ports on STM32MP157-Dev DK2 board #62

SPJAU opened this issue Feb 10, 2025 · 4 comments

Comments

@SPJAU
Copy link

SPJAU commented Feb 10, 2025

Hi, I am trying to connect simple serial device to the dev board. How do I access and print to consol/terminal output from the serial device.

@mstaack
Copy link

mstaack commented Feb 10, 2025

you can simply use the onboard stlink device connected via usb. it enumerates as a serial device on you computer

@mstaack
Copy link

mstaack commented Feb 10, 2025

rereading your question:

for normal uart to work it needs to be enabled in the devicetree of course.

check this: https://wiki.st.com/stm32mpu/wiki/Serial_TTY_device_tree_configuration#DT_configuration_-28Board_level-29

@SPJAU
Copy link
Author

SPJAU commented Feb 10, 2025

According to manual I can modify or change device tree using CubeMx, however there are no clear explanation how to do it. It could be handy to have this option to enable low level devices without compiling Linux core. I believe easiest way going to be edit stm32mp157c-dk2.dts file. How do I make sure that this file has been selected during compilation? because in my case I cannot access serial port except ttySTM. Thanks in advance.

@mstaack
Copy link

mstaack commented Feb 11, 2025

editing the device tree does not require compiling the linux core.

highly recommend the wonderful bootlin article here:

https://bootlin.com/blog/building-a-linux-system-for-the-stm32mp1-basic-system/

this shows how to work with the stm32mp1 dev boards and enabling custom io (i2c in this case) in the device-tree.

the key point is here to enable the uart port afaik:

https://github.com/STMicroelectronics/linux/blob/v4.19-stm32mp-r1.3/arch/arm/boot/dts/stm32mp157c.dtsi#L491

status = "disabled"; -> status = "okay";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants