From ea8abf9a089fcc25a6729352c270e811159a4c0d Mon Sep 17 00:00:00 2001 From: weicheng Date: Mon, 25 Sep 2023 13:23:16 +0800 Subject: [PATCH] [ASR] Bump asr582x sdk to v1.9.0 --- examples/platform/asr/init_asrPlatform.cpp | 8 ++++++++ third_party/asr/asr582x/BUILD.gn | 10 +++++++++- third_party/asr/asr582x/asr_sdk | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/platform/asr/init_asrPlatform.cpp b/examples/platform/asr/init_asrPlatform.cpp index 2992015c1abd97..d54cdd2a3530a9 100755 --- a/examples/platform/asr/init_asrPlatform.cpp +++ b/examples/platform/asr/init_asrPlatform.cpp @@ -140,6 +140,9 @@ void init_asrPlatform(void) // ota roll back,just for flash_remapping ota_roll_back_pro(); + // disable wdg + ota_wdg_disable(); + // register uart for printf log, the used uart should be init before. printf_uart_register(LEGA_UART1_INDEX); // register uart for at log, the used uart should be init before. @@ -161,6 +164,11 @@ void init_asrPlatform(void) #if defined CFG_PLF_RV32 || defined CFG_PLF_DUET lega_wlan_efuse_read(); +#ifdef CFG_PLF_DUET + // set certifacation type before rf init, param 0x00 is old srrc, 0x10 is new srrc + lega_wlan_set_cert_type(0x00); +#endif + lega_sram_rf_pta_init(); lega_recovery_phy_fsm_config(); diff --git a/third_party/asr/asr582x/BUILD.gn b/third_party/asr/asr582x/BUILD.gn index 9f4cc9fd6c468e..69b730218b87fa 100755 --- a/third_party/asr/asr582x/BUILD.gn +++ b/third_party/asr/asr582x/BUILD.gn @@ -19,6 +19,9 @@ import("${chip_root}/src/platform/ASR/args.gni") declare_args() { # Build target to use for asr SDK. Use this to set global SDK defines. asr_target_project = "" + + # Must be "4M" or "2M". For matter, ASR582X use 4M flash default. + asr_flash_max_size = "4M" } assert(asr_target_project != "", "asr_target_project must be specified") @@ -121,7 +124,6 @@ config("asr_sdk_config") { "CONFIG_IEEE80211W", "WFA_CERTIFICATE_N", "CFG_DUET_5822S", - "CFG_DUET_5822T", "MBEDTLS_HW", "MBEDTLS_HW_RSA", "MBEDTLS_HW_ECC", @@ -133,6 +135,12 @@ config("asr_sdk_config") { "CFG_EASY_LOG_MODULE_EN=1", ] + if (asr_flash_max_size == "2M") { + defines += [ "_OTA_CMP_VENDOR_" ] + } else { + defines += [ "CFG_DUET_5822T" ] + } + cflags_c = [ "-mcpu=cortex-m4", "-Os", diff --git a/third_party/asr/asr582x/asr_sdk b/third_party/asr/asr582x/asr_sdk index 667c66a2f69eb6..d8cec59dc2a2ca 160000 --- a/third_party/asr/asr582x/asr_sdk +++ b/third_party/asr/asr582x/asr_sdk @@ -1 +1 @@ -Subproject commit 667c66a2f69eb6f4adf2e9bede0b6b88cd4378ce +Subproject commit d8cec59dc2a2ca04e44e575d8963ce31d542b2ba