mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
bsp/atsam: Optionally use DMA for UART Rx
If the system is busy with other interrupts and the UART is set to a fast baud rate, it's possible to loose UART interrupts and therefore characters. This allows to optionally enable a DMA for the UARTs so that a number of lost interrupts can be tolerated. The number of DMAs on this chip is limited and not not all applications need that feature. Therefore the DMA is disabled by default. Close #4578
This commit is contained in:
1 parent
fbd18c09af
commit
aa95122c17
2 files changed
+190
-5
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <bspopts.h>
|
||||
#include <bsp/default-initial-extension.h>
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
#include <rtems.h>
|
||||
|
||||
@@ -109,6 +110,18 @@ void atsam_rtc_get_time(rtems_time_of_day *tod);
|
||||
|
||||
void bsp_restart( const void *const addr );
|
||||
|
||||
/*
|
||||
* This ioctl enables the receive DMA for an UART. The DMA can be usefull if you
|
||||
* loose characters in high interrupt load situations.
|
||||
*
|
||||
* Disabling the DMA again is only possible by closing all file descriptors of
|
||||
* that UART.
|
||||
*
|
||||
* Note that every UART needs one DMA channel and the system has only a limited
|
||||
* amount of DMAs. So only use it if you need it.
|
||||
*/
|
||||
#define ATSAM_UART_ENABLE_RX_DMA _IO('d', 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in new issue
Block a user