Add glitch protection to the software UART in the XPLAINBridge project code, so that very short glitches on the RX line don't cause a frame reception to occur.

This commit is contained in:
Dean Camera 2010-07-12 02:23:11 +00:00
parent 229935184b
commit 3fd246041b
2 changed files with 14 additions and 8 deletions

View file

@ -180,7 +180,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
{
EndpointConfigSuccess &= CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
/* Configure the UART flush timer */
/* Configure the UART flush timer - run at FCPU/1024 for maximum interval before overflow */
TCCR0B = ((1 << CS02) | (1 << CS00));
}
else