Skip to content

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented May 23, 2020

Contribution description

There is an older version of the stm32f429i-disc1 called the stm32f429i-disco. From what I could gather, they are completely exchangeable.

The debugger on the stm32f429i-disco however does not provide a UART connection.
To spare the user of having to wire up a USB-TTL adapter, enable CDC-ACM on the micro-USB port.

Testing procedure

Flash any example on the stm32f429i-disco board.
You should have a serial console on the micro-USB connector of the board.

Issues/PRs references

e01a95d is taken from #12778 to allow stdio_cdc_acm on stm32

@benpicco benpicco requested review from aabadie and bergzand May 23, 2020 14:09
@benpicco benpicco added Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation labels May 23, 2020
@aabadie
Copy link
Contributor

aabadie commented May 23, 2020

The debugger on the stm32f429i-disc1 does not provide a UART connection.

Not the case for mine. What is the revision of your board ?

@benpicco
Copy link
Contributor Author

benpicco commented May 23, 2020

Not the case for mine. What is the revision of your board ?

Huh, odd - I just updated the on-board ST-Link to the latest firmware, it only provides ST-LINK functionality and no ACM functionality.

It has a sticker on the backside that says

MB1075 B-01
214090631

It's this board. It's actually the older STM32F429I-DISCO

@benpicco
Copy link
Contributor Author

Two different board references are available: STM32F429I-DISCO and STM32F429I-DISC1.

The discovery board referenced STM32F429I-DISCO does not support the drag&drop and Virtual Comm Port features. If you are using this board version, you will have to use an external tool (for example the STM32 STLink utility) to program your code .bin file. There is no possibility to use either the printf in your code.

https://os.mbed.com/platforms/ST-Discovery-F429ZI/

@benpicco
Copy link
Contributor Author

I think I could do the same as for openlabs-kw41z-mini-256kib and create a new stm32f429i-disco board

@benpicco benpicco force-pushed the boards/stm32f429i-disc1_usb_stdio branch from bca82ea to 2d4701a Compare May 23, 2020 15:16
@benpicco benpicco changed the title boards/stm32f429i-disc1: enable stdio over CDC ACM boards/stm32f429i-disco: add support May 23, 2020
@benpicco benpicco force-pushed the boards/stm32f429i-disc1_usb_stdio branch from 2d4701a to 5bee19d Compare May 23, 2020 15:27
@benpicco benpicco added the Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer label May 27, 2020
@benpicco benpicco force-pushed the boards/stm32f429i-disc1_usb_stdio branch from 5bee19d to 788ecf1 Compare June 3, 2020 16:43
The boards/stm32f429i-disco board is an ealier version of the stm32f429i-disc1.

The boards are compatible with the difference that the older on-board debugger
does not provide a UART connection.

To spare the user of having to wire up a USB-TTL adapter, enable CDC-ACM
on the micro-USB port.
@benpicco benpicco force-pushed the boards/stm32f429i-disc1_usb_stdio branch from 788ecf1 to b082368 Compare June 11, 2020 21:22
@aabadie
Copy link
Contributor

aabadie commented Jun 15, 2020

How do you manage the serial port automatically ? If you plug the debugger USB first, it will appear as /dev/ttyACM0 on the host computer. Then if you plug the second USB (User USB) to the host, with CDC ACM, it will show up as /dev/ttyACM1 on the host. So you will have to set PORT=/dev/ttyACM1 to ensure pyterm can connect.
This should be documented.

@benpicco
Copy link
Contributor Author

If you plug the debugger USB first, it will appear as /dev/ttyACM0 on the host computer.

No, the STLINKv2 on the board does not provide a CDC ACM interface.

@aabadie aabadie self-assigned this Jun 16, 2020
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me and I trust @benpicco that it works.

ACK

@aabadie aabadie merged commit 2c030c3 into RIOT-OS:master Jun 16, 2020
@benpicco benpicco deleted the boards/stm32f429i-disc1_usb_stdio branch June 16, 2020 09:13
@miri64 miri64 added this to the Release 2020.07 milestone Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants