修改30ms喂狗,解决初始化超时问题
This commit is contained in:
@@ -184,7 +184,6 @@ int main(void)
|
||||
|
||||
sdrv_gpio_set_pin_output_level(GPIO_B9, 1); //<2F><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
|
||||
External_wdt_refresh();
|
||||
|
||||
// Timer<65><72>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṩLWIP sys_now<6F>ӿڻ<D3BF>ȡ<EFBFBD><C8A1>ǰʱ<C7B0><CAB1>
|
||||
btm_init();
|
||||
@@ -224,20 +223,20 @@ int main(void)
|
||||
sdrv_gpio_set_pin_output_level(GPIO_Y1, 0); //E2дʹ<D0B4><CAB9>
|
||||
|
||||
External_wdt_refresh();
|
||||
printf("feed 1! \r\n");
|
||||
|
||||
board_norflash_init();//flash <20><>ʼ<EFBFBD><CABC>
|
||||
External_wdt_refresh();
|
||||
|
||||
initSpi();
|
||||
// ETH<54><48>ʼ<EFBFBD><CABC>
|
||||
board_eth_init();
|
||||
External_wdt_refresh();
|
||||
// wdt_init(WDT_OUTms);
|
||||
// wrbyte_24c02(0x00,1);
|
||||
|
||||
UDP_Echo_Init(UDPCB_1, udp_Callback_1, DOWNLOAR_PORT);
|
||||
|
||||
ethernetInterfaceInit();
|
||||
External_wdt_refresh();
|
||||
// External_wdt_refresh();
|
||||
e2_boot_arr[0] = rdbyte_24c02(APP_VERSION_E2adr);
|
||||
e2_boot_arr[1] = rdbyte_24c02(APP_VERSION_E2adr+1);
|
||||
e2_boot_arr[2] = rdbyte_24c02(APP_VERSION_E2adr+2);
|
||||
@@ -255,7 +254,7 @@ int main(void)
|
||||
des_ipaddr[1] = rdbyte_24c02(BOOT_DES_IP+1);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ص<EFBFBD>IP
|
||||
des_ipaddr[2] = rdbyte_24c02(BOOT_DES_IP+2);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ص<EFBFBD>IP
|
||||
des_ipaddr[3] = rdbyte_24c02(BOOT_DES_IP+3);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>ص<EFBFBD>IP
|
||||
External_wdt_refresh();
|
||||
// External_wdt_refresh();
|
||||
|
||||
if(g_systemDataRecord.canBootloaderUpgrade == NORMAL_ON)//0<><30><EFBFBD>ǽ<EFBFBD><C7BD><EFBFBD>APP<50><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD><EFBFBD>1<EFBFBD><31><EFBFBD><EFBFBD>BOOT<4F><54><EFBFBD><EFBFBD>
|
||||
{
|
||||
@@ -267,7 +266,7 @@ int main(void)
|
||||
UdpSendToData(UDPCB_1, BOOT_Arr, 2, des_ipaddr, BOOT_TX_PORT);
|
||||
}
|
||||
|
||||
ssdk_printf(SSDK_INFO, "SSDK E3 boot! verison V1.24 \r\n");
|
||||
ssdk_printf(SSDK_INFO, "SSDK E3 boot! verison V1.28 \r\n");
|
||||
|
||||
for(;;)
|
||||
{
|
||||
@@ -289,7 +288,7 @@ int main(void)
|
||||
RgWDT500msflg = 0;
|
||||
External_wdt_refresh();
|
||||
|
||||
printf("RUN24! \r\n");
|
||||
printf("RUN2F! \r\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ void External_wdt_refresh(void)
|
||||
// sdrv_wdt_refresh(wdt_type);//ι<><CEB9>
|
||||
|
||||
sdrv_gpio_toggle_pin_output_level(WDTGPIO);
|
||||
// printf("wdtfeed! \r\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "sdrv_eth.h"
|
||||
#include "phy/phy.h"
|
||||
|
||||
#include <wdt_refresh.h>
|
||||
|
||||
/* Eth frame header and crc length. */
|
||||
#define ETH_FRAME_HEADER_LEN (6 + 6 + 2)
|
||||
#define ETH_FRAME_OVERHEAD_LEN (ETH_FRAME_HEADER_LEN + 4)
|
||||
@@ -182,6 +184,7 @@ static void eth_mac_init(dwc_eth_config_t *cfg, struct eqos_priv *eqos)
|
||||
phy_speed_t speed = (cfg->phy[0].phy_addr == ~0) ?
|
||||
PHY_SPEED_1000 : cfg->phy[0].speed;
|
||||
dwmac_core_init(cfg->base, cfg->mtu, speed, cfg->mac_addr);
|
||||
|
||||
dwmac_mac_rx_queue_mcbc_routing(cfg->base, 0);
|
||||
}
|
||||
|
||||
@@ -283,7 +286,6 @@ static err_t dwc_eth_init(struct net_driver_s *dev)
|
||||
ASSERT(eqos->rx_dma_buf);
|
||||
memset(eqos->rx_dma_buf, 0, EQOS_RX_BUFFER_SIZE);
|
||||
#endif
|
||||
|
||||
//init phy
|
||||
phy_init(ð_dev->phy_bus);
|
||||
|
||||
@@ -777,6 +779,7 @@ int dwc_eth_probe(struct net_driver_s *dev, dwc_eth_config_t *cfg)
|
||||
int ret = netdev_register(dev, NET_LL_ETHERNET);
|
||||
|
||||
irq_attach(cfg->irq_num, dwc_eth_irq_handler, dev);
|
||||
|
||||
irq_enable(cfg->irq_num);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "regs_base.h"
|
||||
#include "phy/phy.h"
|
||||
#include "sdrv_mac_lld.h"
|
||||
#include <wdt_refresh.h>
|
||||
|
||||
static uint8_t deafult_mac_addr[6] = {0x00, 0x1f, 0x29, 0x00, 0x12, 0x15};
|
||||
|
||||
@@ -657,7 +658,7 @@ int32_t dwmac_dma_reset(uint32_t regbase)
|
||||
if (!(readl(regbase + DMA_BUS_MODE) & DMA_BUS_MODE_SFT_RESET))
|
||||
break;
|
||||
|
||||
mdelay(10);
|
||||
mdelay(1); //20251106 <20><EFBFBD>Ϊ1<CEAA><31>10ʵ<30><CAB5><EFBFBD><EFBFBD>ʱΪ140ms
|
||||
}
|
||||
|
||||
if (limit <= 0) {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <lwip/def.h>
|
||||
#include <lwip/tcpip.h>
|
||||
#include <lwip/etharp.h>
|
||||
#include <wdt_refresh.h>
|
||||
|
||||
static err_t netdev_linkoutput_fn(struct netif *netif, struct pbuf *p)
|
||||
{
|
||||
@@ -40,6 +41,7 @@ static err_t netdev_init_fn(struct netif *netif)
|
||||
|
||||
if (dev->d_init) {
|
||||
dev->d_init(dev);
|
||||
|
||||
}
|
||||
|
||||
return ERR_OK;
|
||||
@@ -56,7 +58,6 @@ err_t netdev_register(struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
ip_2_ip4(&dev->d_netmask),
|
||||
ip_2_ip4(&dev->d_gateway),
|
||||
dev, netdev_init_fn, netif_input);
|
||||
|
||||
netif_set_default(&dev->d_netif);
|
||||
netif_set_up(&dev->d_netif);
|
||||
|
||||
|
||||
BIN
tools/sdtools/temp/2025110901boot.bin
Normal file
BIN
tools/sdtools/temp/2025110901boot.bin
Normal file
Binary file not shown.
BIN
tools/sdtools/temp/2025111601boot.bin
Normal file
BIN
tools/sdtools/temp/2025111601boot.bin
Normal file
Binary file not shown.
Binary file not shown.
1
tools/sdtools/打包命令.txt
Normal file
1
tools/sdtools/打包命令.txt
Normal file
@@ -0,0 +1 @@
|
||||
sign_tool\windows\atb_signer.exe sign --v 2 --sec_ver 0 --dgst sha256 --rcp key=sign_tool\keys\TestRSA2048_ossl.pem --iib core=0 type=0x0 image=temp\sf.bin dlp=0x8 to=0x504000 entry=0x504000 --psn 0x10D --of temp\2025111601boot.bin
|
||||
Reference in New Issue
Block a user