Commit Graph
17 Commits
Author SHA1 Message Date
hathach a11132212f Merge branch 'master' into master 2019-01-10 16:55:22 +07:00
hathach 6ee2212913 add note for Serial2 (not yet implemented) 2018-11-06 16:39:10 +07:00
hathach 49691adb81 remove Serial.started(), make it safe to call Serial.begin() multiple times 2018-10-18 14:38:43 +07:00
hathach 6f8c546595 serial port clean up 2018-09-01 13:40:04 +07:00
hathach 057cba9a93 redirect Serial to USBSerial for nrf52840 2018-08-30 15:40:16 +07:00
hathach 043aa57f43 clean up 2018-08-24 00:31:42 +07:00
hathach 5adabb9c6a Merge branch 'master' into develop 2018-07-12 21:36:36 +07:00
hathach e6c4b0ff7e support serialEvent() 2018-07-12 16:51:28 +07:00
ChristofR 0c0026029f Bug Fix: UART IRQ Freezing
It was found that receiving UART data too rapidly would completely brick the UART peripheral (no further UART IRQs would be generated).

To brick the peripheral all of the following needs to be true.
1. A BLE connection is active
2. Serial speed is set fast enough (>= 115,200)
3. A continuous stream of Serial data needs to be received

Since interrupt timing is no longer guaranteed when the SoftDevice has an active BLE connection it is much more likely for UART data to be received when inside the UART IRQ. Clearing nrfUart->EVENTS_RXDRDY at the end of the IRQ increases the likelyhood of the system setting a pending IRQ before the current IRQ loop has cleared nrfUart->EVENTS_RXDRDY. If this occurs then the UART IRQ will be called again, but nrfUart->EVENTS_RXDRDY will be 0. Since nrfUart->RXD is no longer being cleared overruns start occuring and for some unknown reason the UART IRQ stops trigerring.
2018-06-07 15:51:57 +02:00
ChristofR 47ae6e88fd Bug Fix: UART IRQ Freezing
It was found that receiving UART data too rapidly would completely brick the UART peripheral (no further UART IRQs would be generated).

To brick the peripheral all of the following needs to be true.
1. A BLE connection is active
2. Serial speed is set fast enough (>= 115,200)
3. A continuous stream of Serial data needs to be received

Since interrupt timing is no longer guaranteed when the SoftDevice has an active BLE connection it is much more likely for UART data to be received when inside the UART IRQ. Clearing nrfUart->EVENTS_RXDRDY at the end of the IRQ increases the likelyhood of the system setting a pending IRQ before the current IRQ loop has cleared nrfUart->EVENTS_RXDRDY. If this occurs then the UART IRQ will be called again, but nrfUart->EVENTS_RXDRDY will be 0. Since nrfUart->RXD is no longer being cleared overruns start occuring and for some unknown reason the UART IRQ stops trigerring.
2018-06-07 15:49:54 +02:00
hathach 313705e15c add nrf52 series common macros NRF52_SERIES 2018-04-17 17:20:22 +07:00
Ureloc 92b638100c Implemented Uart::flush() 2017-10-25 14:35:08 +02:00
hathach 2583357eff clean up 2017-07-29 01:30:28 +07:00
hathach 9c99fe9c03 add Uart.setPins() to remap Serial rx, tx 2017-07-28 12:28:22 +07:00
hathach b1336100cc add mutex for uart to prevent write conflict 2017-04-04 12:39:02 +07:00
hathach fe148b78d7 add Uart _begun, fix potetial hard fault with Debug level ON but Serial.begin() is not called 2017-03-17 13:36:26 +07:00
hathach 6151838f8f adding file from sandeepmistry/arduino-nRF5 2016-11-22 01:08:21 +07:00