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

Fix#45 afonly #49

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix#45 afonly #49

wants to merge 7 commits into from

Conversation

RGD2
Copy link
Contributor

@RGD2 RGD2 commented May 4, 2017

This just changes the uarrt's rx inpin to async_in_filter.

This protects the buart input from metastability and glitches on the rx input, which seems to fix #45. And is likely to increase reliability whenever the buart is connected to an asynchronously-clocked serial signal. (ie, with icepll settings other than 12 or 48 MHz).

async_in_filter is a good way to implement slow asynchronous inputs, which may otherwise suffer from metastability or glitches.

It's useful as a switch de-bouncer with larger FILTERBITS settings like so:

async_in_filter #(.FILTERBITS(11)) _myinpin(.clk(clk), .pin(somepin), .rd(myinput));

It adds a delay, but will prevent oscillations with periods less than 2^(FILTERBITS-1) clks.
Total delay to an isolated pulse should be 3+(3/4)*2^(FILTERBITS) clks.

5 bits is good for a 1 MHz square wave, when used with a 48 MHz system clk, and is the default setting.

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

Successfully merging this pull request may close these issues.

serial data corruption at 460800
1 participant