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

Bit error when in AR9331 #4

Open
YYYaoSir opened this issue Jul 26, 2018 · 2 comments
Open

Bit error when in AR9331 #4

YYYaoSir opened this issue Jul 26, 2018 · 2 comments

Comments

@YYYaoSir
Copy link

I compile and install this kmod in AR9331(400MHZ Mips Soc). It works. I can use the ttySOFT0 to transmit and recieve. But it always encounters some bit error. I modified some of the code, now it works well.

1: Change the RX trigger from "IRQF_TRIGGER_FALLING" to "IRQF_TRIGGER_LOW".
2: In handle_rx_start(), after start the timer, disable the RX_IRQ
if (rx_bit_index == -1) { hrtimer_start(&timer_rx, ktime_set(0, 0), HRTIMER_MODE_REL); } disable_irq_nosync(gpio_to_irq(gpio_rx)); return (irq_handler_t) IRQ_HANDLED;
3: After has recieved a byte, enable the RX_IRQ.
receive_character(character); rx_bit_index = -1; enable_irq(gpio_to_irq(gpio_rx));

It reduce the bit error when RX receive bits significantly. I haven't test it in Raspberry pi. You can test it. Maybe it will improve the baud rate.

@adrianomarto
Copy link
Owner

Hi YYYaoSir,

Thanks for the suggestion. I will definitively try it.

Kind regards,

Adriano.

@adrianomarto
Copy link
Owner

Hi @YYYaoSir,

@ulde has provided a different solution for what seems to be the same problem you are experiencing. Would you mind trying his modification and verifying if it reduces the bit errors?

See:
#5
Kind regards,

Adriano.

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