Modify the PWEKEY and RESET_N pins of EC801E

This commit is contained in:
songyanguang 2025-06-18 11:21:23 +08:00
parent 2c647495af
commit 4eb5f245cb
4 changed files with 14 additions and 6 deletions

View File

@ -232,7 +232,7 @@ int AtCmdConfigAndCheck(ATAgentType agent, char *cmd, char *check)
#endif
if (!strstr(result, check))
{
printf("%s %d check[%s] reply[%s] failed.\n", __func__, __LINE__, check, result);
printf("%s %d cmd[%s] check[%s] reply[%s] failed.\n", __func__, __LINE__, cmd, check, result);
ret = -1;
goto __exit;
}

View File

@ -215,7 +215,8 @@ void InitBoardHardware() {
#ifdef BSP_USING_UART
InitHwUart();
InstallConsole("uart1", SERIAL_DRV_NAME_1, SERIAL_1_DEVICE_NAME_0);
KPrintf("console init completed.\n");
KPrintf("\nconsole init completed.\n");
KPrintf("compiled on: %s at %s\n", __DATE__, __TIME__);
#endif
readRomConfiguration(); // 读取配置信息到外部变量CFG中

View File

@ -315,12 +315,19 @@ int InitHwLte(void) {
USART_Cmd(USART2, ENABLE);
/* Enable module pin */
GPIO_InitStructure_Lte.GPIO_Pin = GPIO_Pin_7;
GPIO_InitStructure_Lte.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure_Lte.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure_Lte);
GPIO_SetBits(GPIOA, GPIO_Pin_7);
Delay_Ms(500); // >= 300ms
GPIO_ResetBits(GPIOA, GPIO_Pin_7);
GPIO_InitStructure_Lte.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure_Lte.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure_Lte.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOA, &GPIO_InitStructure_Lte);
GPIO_SetBits(GPIOA, GPIO_Pin_6);
Delay_Ms(2000);
Delay_Ms(1000); // >= 500ms
GPIO_ResetBits(GPIOA, GPIO_Pin_6);
return ret;

View File

@ -993,9 +993,6 @@ reconnect:
mcuboot.op_reset();
}
#endif
KPrintf("------Start the firmware file transfer!------\r\n");
KPrintf("---------------------------------------------\r\n");
if(platform_ota.size > APP_FLASH_SIZE)
{
KPrintf("File size is larger than partition size,the partition size is %dk.\n",APP_FLASH_SIZE/1024);
@ -1006,6 +1003,7 @@ reconnect:
UpdateOTAFlag(p_ota_info);
break;
}
KPrintf("Start erase download partition\n");
if(mcuboot.op_flash_erase(DOWN_FLAH_ADDRESS,platform_ota.size) != kStatus_Success)
{
KPrintf("Failed to erase download partition!\n");
@ -1016,6 +1014,8 @@ reconnect:
UpdateOTAFlag(p_ota_info);
break;
}
KPrintf("------Start the firmware file transfer!------\r\n");
KPrintf("---------------------------------------------\r\n");
platform_ota.counter = (platform_ota.size%FRAME_LEN != 0)? (platform_ota.size/FRAME_LEN + 1):(platform_ota.size/FRAME_LEN);
platform_ota.num = 1; //下载次数,初始值为1
platform_ota.downlen = FRAME_LEN; //记录本次下载量