Mercurial > public > ostc4
changeset 879:fe955104901c Evo_2_23
new bluetooth work, bootloader work
author | heinrichsweikamp |
---|---|
date | Thu, 29 Aug 2024 12:03:10 +0200 |
parents | 6b06143cbfea |
children | f012fcd7f465 |
files | Discovery/Inc/tComm.h Discovery/Src/ostc.c Discovery/Src/tComm.c |
diffstat | 3 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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); }
--- 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; }