# HG changeset patch # User Ideenmodellierer # Date 1726086725 -7200 # Node ID 1b05a84f6d0fc981d1b2cc2e3315e4e68c18b30c # Parent 0e084e5554a870a13b5d7a8f5ac39328ce89c4e9 Reenabled fast communication: The communication may be improved with regard to speed by increasing the baud rate between bluetooth module and CPU. This may now be activated using a compile switch. diff -r 0e084e5554a8 -r 1b05a84f6d0f Common/Inc/configuration.h --- a/Common/Inc/configuration.h Tue Sep 10 21:18:36 2024 +0200 +++ b/Common/Inc/configuration.h Wed Sep 11 22:32:05 2024 +0200 @@ -81,4 +81,7 @@ /* Enable if the menu item predive check shall be available */ /* #define ENABLE_PREDIVE_CHECK */ +/* Enable to have a faster transfer speed between bluetooth module and CPU */ +#define ENABLE_FAST_COMM + #endif diff -r 0e084e5554a8 -r 1b05a84f6d0f Discovery/Src/tComm.c --- a/Discovery/Src/tComm.c Tue Sep 10 21:18:36 2024 +0200 +++ b/Discovery/Src/tComm.c Wed Sep 11 22:32:05 2024 +0200 @@ -2193,7 +2193,12 @@ break; case BM_CONFIG_SIGNAL_POLL: sprintf(TxBuffer,"AT+BSTPOLL=100\r"); break; - case BM_CONFIG_BAUD: sprintf(TxBuffer,"AT%%B22\r"); + case BM_CONFIG_BAUD: +#ifdef ENABLE_FAST_COMM + sprintf(TxBuffer,"AT%%B22\r"); +#else + BmTmpConfig++; +#endif break; case BM_CONFIG_RETRY: ConfigRetryCnt--; HAL_Delay(1); @@ -2260,7 +2265,7 @@ UartHandle.Init.BaudRate = 460800; HAL_UART_Init(&UartHandle); } - if((BmTmpConfig == BM_CONFIG_BAUD) && (result == HAL_OK) && (UartHandle.Init.BaudRate == 460800)) /* This shut not happen because default speed is 115200 => update module configuration */ + else if((BmTmpConfig == BM_CONFIG_BAUD) && (result == HAL_OK) && (UartHandle.Init.BaudRate == 460800)) /* This shut not happen because default speed is 115200 => update module configuration */ { sprintf(TxBuffer,"AT%%B8\r"); /* set default baudrate */ CmdSize = strlen(TxBuffer);