diff Discovery/Src/tComm.c @ 893:1b05a84f6d0f Evo_2_23 tip

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.
author Ideenmodellierer
date Wed, 11 Sep 2024 22:32:05 +0200
parents d398ecc7d103
children
line wrap: on
line diff
--- 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);