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

[question] uart connection #2

Closed
midnight-wonderer opened this issue Aug 18, 2015 · 3 comments
Closed

[question] uart connection #2

midnight-wonderer opened this issue Aug 18, 2015 · 3 comments

Comments

@midnight-wonderer
Copy link

Hello,
Sorry noob question.
Does uart example works with screen?
When I try out uart example I connect the controller with a usb uart device and the screen command

screen /dev/ttyUSB0 9600

It will send some data periodically with some delay as expected but all data were garbled.
I want to identify if it hardware or software issue so I want some confirmation that my software setup (screen) is correct.

PS. I use 16Mhz internal RC oscillator and already confirm the correctness of value in BRR1 and BRR2.

@vdudouyt
Copy link
Owner

Hi,

I don't see any problems with your screen command, that's exactly how I'm usually using it. I suggest you to start with writing a blinky program in order to ensure that the clock speed really matches what do you think.

@midnight-wonderer
Copy link
Author

You are correct.
I don't have time to investigate yet but according to the datasheet I probably run the CPU at 2Mhz.
I will recalculate BRR if that the case.
Thank you for pointing me the direction.

@midnight-wonderer
Copy link
Author

It works now. My master frequency is actually 2MHz.
So I have to use BRR1 = 0x0, BRR2=0xd
Thanks a lot

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