Mercurial > public > ostc4
comparison Discovery/Src/tComm.c @ 895:94535e672583 Evo_2_23
Zusammenf?hren
author | heinrichsweikamp |
---|---|
date | Wed, 18 Sep 2024 14:31:06 +0200 |
parents | 1b05a84f6d0f |
children |
comparison
equal
deleted
inserted
replaced
894:9e2f9b91e827 | 895:94535e672583 |
---|---|
2191 break; | 2191 break; |
2192 case BM_CONFIG_ESCAPE_DELAY: sprintf(TxBuffer,"ATS12=10\r"); | 2192 case BM_CONFIG_ESCAPE_DELAY: sprintf(TxBuffer,"ATS12=10\r"); |
2193 break; | 2193 break; |
2194 case BM_CONFIG_SIGNAL_POLL: sprintf(TxBuffer,"AT+BSTPOLL=100\r"); | 2194 case BM_CONFIG_SIGNAL_POLL: sprintf(TxBuffer,"AT+BSTPOLL=100\r"); |
2195 break; | 2195 break; |
2196 case BM_CONFIG_BAUD: sprintf(TxBuffer,"AT%%B22\r"); | 2196 case BM_CONFIG_BAUD: |
2197 #ifdef ENABLE_FAST_COMM | |
2198 sprintf(TxBuffer,"AT%%B22\r"); | |
2199 #else | |
2200 BmTmpConfig++; | |
2201 #endif | |
2197 break; | 2202 break; |
2198 case BM_CONFIG_RETRY: ConfigRetryCnt--; | 2203 case BM_CONFIG_RETRY: ConfigRetryCnt--; |
2199 HAL_Delay(1); | 2204 HAL_Delay(1); |
2200 if(ConfigRetryCnt == 0) | 2205 if(ConfigRetryCnt == 0) |
2201 { | 2206 { |
2258 HAL_UART_DeInit(&UartHandle); | 2263 HAL_UART_DeInit(&UartHandle); |
2259 HAL_Delay(1); | 2264 HAL_Delay(1); |
2260 UartHandle.Init.BaudRate = 460800; | 2265 UartHandle.Init.BaudRate = 460800; |
2261 HAL_UART_Init(&UartHandle); | 2266 HAL_UART_Init(&UartHandle); |
2262 } | 2267 } |
2263 if((BmTmpConfig == BM_CONFIG_BAUD) && (result == HAL_OK) && (UartHandle.Init.BaudRate == 460800)) /* This shut not happen because default speed is 115200 => update module configuration */ | 2268 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 */ |
2264 { | 2269 { |
2265 sprintf(TxBuffer,"AT%%B8\r"); /* set default baudrate */ | 2270 sprintf(TxBuffer,"AT%%B8\r"); /* set default baudrate */ |
2266 CmdSize = strlen(TxBuffer); | 2271 CmdSize = strlen(TxBuffer); |
2267 HAL_UART_Transmit(&UartHandle, (uint8_t*)TxBuffer,CmdSize, 2000); | 2272 HAL_UART_Transmit(&UartHandle, (uint8_t*)TxBuffer,CmdSize, 2000); |
2268 HAL_UART_DeInit(&UartHandle); | 2273 HAL_UART_DeInit(&UartHandle); |