Switched UART DMA on

This commit is contained in:
shadowm60 2020-06-16 23:44:15 +03:00
parent 7d02cde0b4
commit 4a23974c43
6 changed files with 16 additions and 16 deletions

View File

@ -239,7 +239,7 @@
#endif
#ifndef EFI_USB_SERIAL
#define EFI_USB_SERIAL TRUE
//#define EFI_USB_SERIAL TRUE
#endif
/**
@ -342,10 +342,10 @@
* STM32_UART_USE_USARTx
* in mcuconf.h
*/
#define TS_UART_DMA_MODE FALSE
#define TS_UART_DMA_MODE TRUE
//#define TS_UART_DEVICE (&UARTD3)
#define TS_SERIAL_DEVICE (&SD3)
#define TS_UART_DEVICE (&UARTD3)
//#define TS_SERIAL_DEVICE (&SD3)
#define AUX_SERIAL_DEVICE (&SD6)

View File

@ -162,7 +162,7 @@
* @brief Enables the SERIAL over USB subsystem.
*/
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
#define HAL_USE_SERIAL_USB TRUE
#define HAL_USE_SERIAL_USB FALSE
#endif
/**

View File

@ -341,7 +341,7 @@
#define STM32_UART_USE_USART1 FALSE
#define STM32_UART_USE_USART2 FALSE
#define STM32_UART_USE_USART3 TRUE
#define STM32_UART_USE_UART4 FALSE
#define STM32_UART_USE_UART4 TRUE
#define STM32_UART_USE_UART5 FALSE
#define STM32_UART_USE_USART6 FALSE
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5)

View File

@ -66,18 +66,18 @@ static void tsRxIRQIdleHandler(UARTDriver *uartp) {
/* Note: This structure is modified from the default ChibiOS layout! */
static UARTConfig tsDmaUartConfig = {
.txend1_cb = NULL, .txend2_cb = NULL, .rxend_cb = NULL, .rxchar_cb = NULL, .rxerr_cb = NULL,
.speed = 0, .cr1 = 0, .cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN, .cr3 = 0,
.speed = 0, .cr1 = 0, .cr2 = 0, .cr3 = 0,
.timeout_cb = tsRxIRQIdleHandler, .rxhalf_cb = tsRxIRQHalfHandler
};
#elif TS_UART_MODE
/* Note: This structure is modified from the default ChibiOS layout! */
static UARTConfig tsUartConfig = {
.txend1_cb = NULL, .txend2_cb = NULL, .rxend_cb = NULL, .rxchar_cb = NULL, .rxerr_cb = NULL,
.speed = 0, .cr1 = 0, .cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN, .cr3 = 0,
.speed = 0, .cr1 = 0, .cr2 = 0, .cr3 = 0,
.timeout_cb = NULL, .rxhalf_cb = NULL
};
#else
static SerialConfig tsSerialConfig = { .speed = 0, .cr1 = 0, .cr2 = USART_CR2_STOP1_BITS | USART_CR2_LINEN, .cr3 = 0 };
static SerialConfig tsSerialConfig = { .speed = 0, .cr1 = 0, .cr2 = 0, .cr3 = 0 };
#endif /* TS_UART_DMA_MODE */
#endif /* EFI_PROD_CODE */
@ -103,7 +103,7 @@ void startTsPort(ts_channel_s *tsChannel) {
#if defined(TS_UART_DEVICE) || defined(TS_SERIAL_DEVICE)
if (CONFIG(useSerialPort)) {
print("TunerStudio over USART");
//print("TunerStudio over USART");
/**
* We have hard-coded USB serial console so that it would be clear how to connect to each specific board,
* but for UART serial we allow users to change settings.

View File

@ -147,14 +147,14 @@ static bool getConsoleLine(BaseSequentialStream *chp, char *line, unsigned size)
CommandHandler console_line_callback;
#if (defined(EFI_CONSOLE_SERIAL_DEVICE) && ! EFI_SIMULATOR )
SerialConfig serialConfig = { 0, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
SerialConfig serialConfig = { 0, 0, 0, 0 };
#endif
#if (defined(EFI_CONSOLE_UART_DEVICE) && ! EFI_SIMULATOR )
/* Note: This structure is modified from the default ChibiOS layout! */
UARTConfig uartConfig = {
.txend1_cb = NULL, .txend2_cb = NULL, .rxend_cb = NULL, .rxchar_cb = NULL, .rxerr_cb = NULL,
.speed = 0, .cr1 = 0, .cr2 = 0/*USART_CR2_STOP1_BITS*/ | USART_CR2_LINEN, .cr3 = 0,
.speed = 0, .cr1 = 0, .cr2 = 0, .cr3 = 0,
.timeout_cb = NULL, .rxhalf_cb = NULL
};

View File

@ -169,10 +169,10 @@ void print(const char *format, ...) {
if (!isCommandLineConsoleReady()) {
return;
}
va_list ap;
va_start(ap, format);
chvprintf((BaseSequentialStream*) getConsoleChannel(), format, ap);
va_end(ap);
//va_list ap;
//va_start(ap, format);
//chvprintf((BaseSequentialStream*) getConsoleChannel(), format, ap);
//va_end(ap);
#else
UNUSED(format);
#endif /* EFI_UART_ECHO_TEST_MODE */