You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
@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?
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.
The text was updated successfully, but these errors were encountered: