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

hardware vs software serial #43

Open
neilger opened this issue Dec 29, 2019 · 4 comments
Open

hardware vs software serial #43

neilger opened this issue Dec 29, 2019 · 4 comments

Comments

@neilger
Copy link

neilger commented Dec 29, 2019

I'm delighted to find pyupdi; I'm looking at options for making embedded interfaces. I've got it working through an FTDI FT230X, but not through the preferred solution of an ATSAMD11C running a USB-UART bridge. I'd like to review what pyupdi needs to be able to configure in the serial interface that's being missed by the simple byte bridge code I tested.

@ClundXIII
Copy link

@neilger I am sorry to hijack your Thread but what was your exact circuit? Does 4.7kOhms work as well or did you go higher or lower? Did you use the 3.3V as VCCIO?

@neilger
Copy link
Author

neilger commented Jan 9, 2020

Hijack away.

This D11 board:

http://academy.cba.mit.edu/classes/embedded_programming/D11C/hello.D11C.serial.3V3.png

works to do a serial echo:

http://academy.cba.mit.edu/classes/embedded_programming/D11C/hello.D11C.serial.3V3.mp4

to a t1614:

http://academy.cba.mit.edu/classes/embedded_programming/t1614/hello.t1614.echo.png

This FT230XS board:

http://academy.cba.mit.edu/classes/embedded_programming/FTDI/USB-FT230XS-UPDI.png

works to program the t1614:

http://academy.cba.mit.edu/classes/embedded_programming/t1614/hello.t1614.echo.mp4

as does this adapter with an FTDI cable:

http://academy.cba.mit.edu/classes/embedded_programming/UPDI/FTDI-UPDI.png

but not with the D11C bridge.

Looking through the pyupdi code I see it's dynamically reconfiguring the port; short of working through the UPDI protocol, my question is what the bridge code needs to support.

@mraardvark
Copy link
Owner

UPDI uses UART with even parity and 2 stop bits. Baud rate is not that important since the target will sync with it. In order to recover from an error state, a sequence of two break characters is sent. This is currently done by reconfiguring the UART to a lower baud and sending slow 0-characters.

@neilger
Copy link
Author

neilger commented Jan 13, 2020

Thanks, that's what I needed, I'll test.

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

3 participants