|
|
@@ -202,7 +202,7 @@ int main(void)
|
|
|
|
|
|
// 将GPIO引脚拉高
|
|
|
HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_SET);
|
|
|
-
|
|
|
+ HAL_GPIO_WritePin(POWER_ON_GPIO_Port, CTL_LORA_POWER_Pin, GPIO_PIN_RESET);
|
|
|
MX_DMA_Init();
|
|
|
MX_USART1_UART_Init();
|
|
|
MX_USART2_UART_Init();
|
|
|
@@ -257,6 +257,7 @@ int main(void)
|
|
|
/* Infinite loop */
|
|
|
/* USER CODE BEGIN WHILE */
|
|
|
printf("Device is ready\r\n");
|
|
|
+ printf("设备地址:0x%02X%02X\n", deviceInfo.loraDeviceAddress_H, deviceInfo.loraDeviceAddress_L);
|
|
|
uint8_t i = 0;
|
|
|
while (1)
|
|
|
{
|
|
|
@@ -673,6 +674,9 @@ static void MX_GPIO_Init(void)
|
|
|
/*Configure GPIO pin Output Level */
|
|
|
HAL_GPIO_WritePin(POWER_ON_GPIO_Port, POWER_ON_Pin, GPIO_PIN_SET);
|
|
|
|
|
|
+ /*Configure GPIO pin Output Level */
|
|
|
+ HAL_GPIO_WritePin(CTL_LORA_POWER_GPIO_Port, CTL_LORA_POWER_Pin, GPIO_PIN_RESET);
|
|
|
+
|
|
|
/*Configure GPIO pin : JUGE_PIN_Pin */
|
|
|
GPIO_InitStruct.Pin = JUGE_PIN_Pin;
|
|
|
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
|
|
@@ -686,6 +690,13 @@ static void MX_GPIO_Init(void)
|
|
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
|
HAL_GPIO_Init(POWER_ON_GPIO_Port, &GPIO_InitStruct);
|
|
|
|
|
|
+ /*Configure GPIO pin : CTL_LORA_POWER_Pin */
|
|
|
+ GPIO_InitStruct.Pin = CTL_LORA_POWER_Pin;
|
|
|
+ GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
|
|
+ GPIO_InitStruct.Pull = GPIO_PULLDOWN;
|
|
|
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
|
|
+ HAL_GPIO_Init(CTL_LORA_POWER_GPIO_Port, &GPIO_InitStruct);
|
|
|
+
|
|
|
/* USER CODE BEGIN MX_GPIO_Init_2 */
|
|
|
|
|
|
/* USER CODE END MX_GPIO_Init_2 */
|