--- a few changes to try low power yet not good
This commit is contained in:
parent
1ee92d584d
commit
b000d09455
|
@ -111,8 +111,15 @@ int main(void)
|
|||
HAL_UART_DeInit(&huart2);
|
||||
MX_DMA_Init();
|
||||
MX_I2C2_Init();
|
||||
#if 0
|
||||
if ((__HAL_PWR_GET_FLAG(PWR_FLAG_SB) == SET) || (__HAL_PWR_GET_FLAG(PWR_FLAG_STOP2)==SET))
|
||||
{
|
||||
HAL_Delay(3000);
|
||||
}
|
||||
#endif
|
||||
MX_LoRaWAN_Init();
|
||||
|
||||
|
||||
/* USER CODE BEGIN 2 */
|
||||
|
||||
/* USER CODE END 2 */
|
||||
|
|
|
@ -114,10 +114,10 @@ void SystemApp_Init(void)
|
|||
UTIL_ADV_TRACE_SetVerboseLevel(VERBOSE_LEVEL);
|
||||
|
||||
/*Initialize the temperature and Battery measurement services */
|
||||
SYS_InitMeasurement();
|
||||
//SYS_InitMeasurement();
|
||||
|
||||
/*Initialize the Sensors */
|
||||
EnvSensors_Init();
|
||||
//EnvSensors_Init();
|
||||
//MX_TOF_Init();
|
||||
/*Init low power manager*/
|
||||
UTIL_LPM_Init();
|
||||
|
|
|
@ -809,11 +809,9 @@ static void SendTxData(void)
|
|||
#if defined(YUNHORN_STS_R0_ENABLED)||defined(YUNHORN_STS_R5_ENABLED)
|
||||
PME_ON;
|
||||
|
||||
HAL_Delay(500);
|
||||
HAL_Delay(5000);
|
||||
|
||||
MX_TOF_Init();
|
||||
|
||||
|
||||
HAL_Delay(500);
|
||||
|
||||
LED_ON;
|
||||
|
|
|
@ -82,13 +82,13 @@ extern "C" {
|
|||
* LoRaWAN Adaptive Data Rate
|
||||
* @note Please note that when ADR is enabled the end-device should be static
|
||||
*/
|
||||
#define LORAWAN_ADR_STATE LORAMAC_HANDLER_ADR_ON
|
||||
#define LORAWAN_ADR_STATE LORAMAC_HANDLER_ADR_OFF
|
||||
|
||||
/*!
|
||||
* LoRaWAN Default Data Rate
|
||||
* @note Please note that LORAWAN_DEFAULT_DATA_RATE is used only when LORAWAN_ADR_STATE is disabled
|
||||
*/
|
||||
#define LORAWAN_DEFAULT_DATA_RATE DR_0
|
||||
#define LORAWAN_DEFAULT_DATA_RATE DR_2
|
||||
|
||||
/*!
|
||||
* LoRaWAN Default Tx output power
|
||||
|
|
|
@ -167,7 +167,7 @@ extern "C" {
|
|||
* @warning This limitation may have consequences for the proper functioning of the device,
|
||||
* if the LoRaMac ever generates MAC commands that require a response.
|
||||
*/
|
||||
#define DISABLE_LORAWAN_RX_WINDOW 0
|
||||
#define DISABLE_LORAWAN_RX_WINDOW 1
|
||||
|
||||
/* USER CODE BEGIN EC */
|
||||
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue