diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index 4becf6d..73a3c55 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -172,7 +172,7 @@ void MX_GPIO_Init(void) GPIO_InitStruct.Pin = MEMS_POWER_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; - GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Pull = GPIO_PULLDOWN; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; HAL_GPIO_Init(MEMS_POWER_GPIO_Port, &GPIO_InitStruct); diff --git a/Core/Src/main.c b/Core/Src/main.c index 8be6462..690c939 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -116,9 +116,9 @@ int main(void) MX_LoRaWAN_Init(); /* USER CODE BEGIN 2 */ - HAL_UART_DeInit(&huart2); + //HAL_UART_DeInit(&huart2); - vcom_DeInit(); + //vcom_DeInit(); //HAL_Delay(3000); diff --git a/Core/Src/usart.c b/Core/Src/usart.c index 1c8bcf9..4281422 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -120,7 +120,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) //GPIO_InitStruct.Alternate = GPIO_AF7_USART2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - +#if 0 /* USART2 DMA Init */ /* USART2_TX Init */ hdma_usart2_tx.Instance = DMA1_Channel7; @@ -136,7 +136,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) { Error_Handler(); } - +#endif #ifdef STM32WL55xx if (HAL_DMA_ConfigChannelAttributes(&hdma_usart2_tx, DMA_CHANNEL_NPRIV) != HAL_OK) { diff --git a/LoRaWAN/App/lora_app.c b/LoRaWAN/App/lora_app.c index 26614da..9cc1643 100644 --- a/LoRaWAN/App/lora_app.c +++ b/LoRaWAN/App/lora_app.c @@ -1459,7 +1459,7 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) } else if ((char)tlv_buf[CFG_CMD3] == 'S') { // Self Function Testing "YZS" i=0; - memset(outbuf,sizeof(outbuf),0x30); + memset(outbuf,0x0, sizeof(outbuf)); STS_SENSOR_Function_Test_Process(); @@ -1488,7 +1488,7 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) STS_SENSOR_Distance_Test_Process(); i=0; - memset(outbuf,sizeof(outbuf),0x30); + memset(outbuf,0x0, sizeof(outbuf)); outbuf[i++] = (uint8_t)'D'; outbuf[i++] = (uint8_t)sts_mtmcode1; outbuf[i++] = (uint8_t)sts_mtmcode2; @@ -1562,7 +1562,7 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) uint8_t cfg_in_nvm[YUNHORN_STS_MAX_NVM_CFG_SIZE]=""; OnRestoreSTSCFGContextRequest((uint8_t *)cfg_in_nvm); i=0; - memset(outbuf,sizeof(outbuf),0x30); + memset(outbuf,0x0, sizeof(outbuf)); outbuf[i++] = (uint8_t) 'C'; outbuf[i++] = (uint8_t) cfg_in_nvm[NVM_MTM1]; //MTM Code @@ -1641,7 +1641,7 @@ void USER_APP_AUTO_RESPONDER_Parse(char *tlv_buf, size_t tlv_buf_size) periodicity_length *= 3600; } TxPeriodicity = periodicity_length*1000; //translate to 1000ms=1s - HeartBeatPeriodicity = TxPeriodicity; + //HeartBeatPeriodicity = TxPeriodicity; OnTxPeriodicityChanged(TxPeriodicity); i = 0; @@ -2172,7 +2172,7 @@ void STS_SENSOR_Function_Test_Process(void) #endif } - memset((void*)outbuf,sizeof(outbuf),0x30); + memset((void*)outbuf, 0x0, sizeof(outbuf)); memcpy((void*)outbuf, tstbuf, i); STS_SENSOR_Upload_Message(LORAWAN_USER_APP_CTRL_REPLY_PORT, i, outbuf); diff --git a/STM32CubeIDE/.settings/language.settings.xml b/STM32CubeIDE/.settings/language.settings.xml index 801f38f..7418597 100644 --- a/STM32CubeIDE/.settings/language.settings.xml +++ b/STM32CubeIDE/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/TOF/App/app_tof.c b/TOF/App/app_tof.c index 40a75c3..3a51667 100644 --- a/TOF/App/app_tof.c +++ b/TOF/App/app_tof.c @@ -129,8 +129,8 @@ void STS_R0_SENSOR_Read(STS_R0_SensorDataTypeDef *r0_data) { r0_data->distance_mm = sts_tof_distance_data[0]; - r0_data->distance1_mm = sts_tof_distance_data[1]; - r0_data->distance2_mm = sts_tof_distance_data[2]; + //r0_data->distance1_mm = sts_tof_distance_data[1]; + //r0_data->distance2_mm = sts_tof_distance_data[2]; #ifdef ROCTEC_R5 r0_data->distance1_mm = sts_tof_distance_data[0]+sts_tof_distance_data[1]+sts_tof_distance_data[2]; #endif