** L8 ** prototype workable & stable

This commit is contained in:
Yunhorn 2024-10-14 16:34:15 +08:00
parent 903a5f823b
commit 18870b41f2
4 changed files with 9 additions and 7 deletions

View File

@ -94,12 +94,13 @@ int main(void)
/* Initialize all configured peripherals */
MX_I2C2_Init();
MX_GPIO_Init();
MX_USART2_UART_Init();
MX_LoRaWAN_Init();
/* USER CODE BEGIN 2 */
MX_TOF_Init();
MX_USART2_UART_Init();
/* USER CODE END 2 */
/* Infinite loop */
@ -109,7 +110,7 @@ int main(void)
{
/* USER CODE END WHILE */
MX_TOF_Process();
MX_TOF_Process();
MX_LoRaWAN_Process();
/* USER CODE BEGIN 3 */

View File

@ -120,7 +120,7 @@ void SystemApp_Init(void)
/*Initialize the Sensors */
EnvSensors_Init();
//MX_TOF_Init();
MX_TOF_Init();
#ifdef STS_WS
sts_weight_scale_init();
#endif

View File

@ -25,7 +25,7 @@
#include "stm32_seq.h"
/* USER CODE BEGIN Includes */
#include "app_tof.h"
/* USER CODE END Includes */
/* External variables ---------------------------------------------------------*/
@ -73,7 +73,7 @@ void MX_LoRaWAN_Init(void)
/* USER CODE END MX_LoRaWAN_Init_2 */
LoRaWAN_Init();
/* USER CODE BEGIN MX_LoRaWAN_Init_3 */
//MX_TOF_Init();
/* USER CODE END MX_LoRaWAN_Init_3 */
}

View File

@ -136,6 +136,7 @@ static void MX_53L8A1_ThresholdDetection_Init(void)
printf("VL53L8A1_RANGING_SENSOR_Init failed\n");
while (1);
}
printf("\r\nVL53L8A1_RANGING_SENSOR_Init Success\r\n");
}
static void MX_53L8A1_ThresholdDetection_Process(void)
@ -147,7 +148,7 @@ static void MX_53L8A1_ThresholdDetection_Process(void)
VL53L8A1_RANGING_SENSOR_ReadID(VL53L8A1_DEV_CENTER, &Id);
VL53L8A1_RANGING_SENSOR_GetCapabilities(VL53L8A1_DEV_CENTER, &Cap);
Profile.RangingProfile = RS_PROFILE_8x8_CONTINUOUS;
Profile.RangingProfile = RS_PROFILE_8x8_AUTONOMOUS;
Profile.TimingBudget = TIMING_BUDGET;
Profile.Frequency = RANGING_FREQUENCY; /* Ranging frequency Hz (shall be consistent with TimingBudget value) */
Profile.EnableAmbient = 0; /* Enable: 1, Disable: 0 */