# HG changeset patch # User heinrichsweikamp # Date 1724925790 -7200 # Node ID fe955104901c35f94b9ca8df407c23e250de9c7a # Parent 6b06143cbfea3917a96496ae2feeb93725c1c2fb new bluetooth work, bootloader work diff -r 6b06143cbfea -r fe955104901c Discovery/Inc/tComm.h --- a/Discovery/Inc/tComm.h Sun Aug 25 18:55:43 2024 +0200 +++ b/Discovery/Inc/tComm.h Thu Aug 29 12:03:10 2024 +0200 @@ -46,6 +46,7 @@ #ifdef BOOTLOADER_STANDALONE BM_INIT_TRIGGER_ON = 100, BM_INIT_TRIGGER_OFF, + BM_INIT_ECHO, BM_INIT_FACTORY, BM_INIT_MODE, BM_INIT_BLE, diff -r 6b06143cbfea -r fe955104901c Discovery/Src/ostc.c --- a/Discovery/Src/ostc.c Sun Aug 25 18:55:43 2024 +0200 +++ b/Discovery/Src/ostc.c Thu Aug 29 12:03:10 2024 +0200 @@ -138,6 +138,7 @@ SMALLCPU_CSB_GPIO_ENABLE(); OSCILLOSCOPE_GPIO_ENABLE(); OSCILLOSCOPE2_GPIO_ENABLE(); + BLE_UBLOX_DSR_GPIO_ENABLE(); GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; @@ -230,6 +231,13 @@ GPIO_InitStruct.Pin = BLE_NENABLE_PIN; HAL_GPIO_Init(BLE_NENABLE_GPIO_PORT, &GPIO_InitStruct); HAL_GPIO_WritePin(BLE_NENABLE_GPIO_PORT,BLE_NENABLE_PIN,GPIO_PIN_RESET); + + GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; + GPIO_InitStruct.Speed = GPIO_SPEED_LOW; + GPIO_InitStruct.Pin = BLE_UBLOX_DSR_PIN; + HAL_GPIO_Init(BLE_UBLOX_DSR_GPIO_PORT, &GPIO_InitStruct); + HAL_GPIO_WritePin(BLE_UBLOX_DSR_GPIO_PORT,BLE_UBLOX_DSR_PIN,GPIO_PIN_RESET); } @@ -240,6 +248,7 @@ GPIO_InitStruct.Pin = BLE_NENABLE_PIN; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(BLE_NENABLE_GPIO_PORT, &GPIO_InitStruct); + HAL_GPIO_WritePin(BLE_UBLOX_DSR_GPIO_PORT,BLE_UBLOX_DSR_PIN,GPIO_PIN_RESET); } diff -r 6b06143cbfea -r fe955104901c Discovery/Src/tComm.c --- a/Discovery/Src/tComm.c Sun Aug 25 18:55:43 2024 +0200 +++ b/Discovery/Src/tComm.c Thu Aug 29 12:03:10 2024 +0200 @@ -2216,6 +2216,8 @@ HAL_Delay(2000); BmTmpConfig++; break; + case BM_INIT_ECHO: sprintf(TxBuffer,"ATE0\r"); + break; case BM_INIT_FACTORY: sprintf(TxBuffer,"AT+UFACTORY\r"); /*Set to factory defined configuration */ break; case BM_INIT_MODE: sprintf(TxBuffer,"AT+UMSM=1\r"); /* start in Data mode */ @@ -2273,8 +2275,9 @@ { BmTmpConfig++; } - if(BmTmpConfig == BM_CONFIG_DONE) + if(BmTmpConfig == BM_CONFIG_ECHO) { + BmTmpConfig = BM_CONFIG_DONE; ConfigRetryCnt = 0; RestartModule = 1; }