sample_udp_client app Repeated reboot
webrtcccccc opened this issue · 10 comments
Dear newracom
I use [NRC7292 Standalone SDK v1.4] to build the sample_udp_client APP, and download the firmware(out\nrc7292\standalone_xip\sample_udp_client\nrc7292_standalone_xip_sample_udp_client.bin) to NRC7292 by FirmwareFlashTool.exe through UART. After powering on, it keeps rebooting, below is the UART output, is there any idea about this issue? The output seems that do not run to user_init(void).
I build another APP hello_world, it can boot successfully, and can show "Hello, NEWRACOM IEEE802.11ah~!!".
===start===
Newracom Boot Loader
FW is OK.
Jump to 0x10000
Boot Reason: @@@@@ [WDT] @@@@@
boot_reason:2, check_sig:0, ps_mode:0
retention info size (1007 Byte)
stainfo(20) apinfo(47) s1ginfo(16) keyinfo(137) userinfo(4) chinfo(5) wakeupinfo(3) acinfo(44) tidinfo(76) ipinfo(12) lbtinfo(10) rfinfo(375) ucode_info(66) drv_info(7)
ps_schedule_info(65)
RTC FREERUN Mode initialized
lmac_get_country_code_index Not supported Country()
lmac_get_country_code_index Not supported Country()
No 1. Task Name(LMAC Task) Handle(272867444) Added to Stack Trace
Before Calibration PRF_GPIO_DATA : 0x210004 , PRF_GPIO_DIR : 0x280001 , PRF_GPIO_ALT0 : 0x17fffe
Before Calibration PRF_GPIO_DATA : 0x210004 , PRF_GPIO_DIR : 0x280001 , PRF_GPIO_ALT0 : 0x17fffe
No 2. Task Name(FAST Task) Handle(272849096) Added to Stack Trace
[fast_task_init, 479] task creation succeed!(0x104358c8)
No 3. Task Name(SYSTEM Task) Handle(272859044) Added to Stack Trace
No 4. Task Name(Background Task) Handle(272840624) Added to Stack Trace
[background_task_init, 224] task creation succeed!(0x104337b0)
===end===
Repeated reboot
When project .config enable CONFIG_NVS_FLASH = y, system will stuck and reboot.
Use toolchain, gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 that is available from below link please.
https://developer.arm.com/downloads/-/gnu-rm
Can confirm updating gcc toolchain resolved the issue for me. Example projects execute OK now.
I use gcc-arm-none-eabi-10.3-2021.10 toolchain but still have this error.
#which arm-none-eabi-g++
/home/my_user/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++
Do we need to wire Flash separately? Or does the NRC7292 include Flash?
Do we need to wire Flash separately? Or does the NRC7292 include Flash?
I'm not sure what you mean by "wire flash separately".
Can you give me more clue on the error that you're getting?
Dear puffie,
When the example project .config file sets the CONFIG_NVS_FLASH = y,
the system will block on "[background_task_init, 224] task creation succeed!(0x104337b0)",
then trigger the watchdog to reboot.
Is the flash controlled by CONFIG_NVS_FLASH the same as the flash that stores the firmware? Or do I need to connect another flash externally?
I enable the NVS Debug(DEFINE += -DNVS_DEBUG), below is the output.
Newracom Boot Loader
FW is OK.
Jump to 0x10000
Boot Reason: @@@@@ [WDT] @@@@@
boot_reason:2, check_sig:0, ps_mode:0
retention info size (1007 Byte)
stainfo(20) apinfo(47) s1ginfo(16) keyinfo(137) userinfo(4) chinfo(5) wakeupinfo(3) acinfo(44) tidinfo(76) ipinfo(12) lbtinfo(10) rfinfo(375) ucode_info(66) drv_info(7)
ps_schedule_info(65)
RTC FREERUN Mode initialized
lmac_get_country_code_index Not supported Country()
lmac_get_country_code_index Not supported Country()
No 1. Task Name(LMAC Task) Handle(272888100) Added to Stack Trace
Before Calibration PRF_GPIO_DATA : 0x210004 , PRF_GPIO_DIR : 0x280001 , PRF_GPIO_ALT0 : 0x17fffe
Before Calibration PRF_GPIO_DATA : 0x210004 , PRF_GPIO_DIR : 0x280001 , PRF_GPIO_ALT0 : 0x17fffe
No 2. Task Name(FAST Task) Handle(272869752) Added to Stack Trace
[fast_task_init, 479] task creation succeed!(0x1043a978)
No 3. Task Name(SYSTEM Task) Handle(272879700) Added to Stack Trace
No 4. Task Name(Background Task) Handle(272861280) Added to Stack Trace
[background_task_init, 224] task creation succeed!(0x10438860)
standalone_main()
nvs[nvs_flash_init_partition] lock_result = 0
nvs[nvs_flash_init_partition] lock acquired.
PartitionManager[init_partition] calling lookup_storage_from_name with USER_CONFIG_1
PartitionManager[lookup_storage_from_name] name : USER_CONFIG_1
PartitionManager[lookup_storage_from_name] Storage name not found in nvs_storage_list...
PartitionManager[init_partition] calling lookup_nvs_partition with USER_CONFIG_1
PartitionLookUp[lookup_nvs_partition] label USER_CONFIG_1, address = 0xfa000...
PartitionManager[init_partition] calling init_custom...
PartitionManager[lookup_storage_from_name] name : USER_CONFIG_1
PartitionManager[lookup_storage_from_name] Storage name not found in nvs_storage_list...
PartitionManager[init_custom] Allocating new Storage...
PartitionManager[init_custom] Initialize storage by calling storage->init(0, 4)...
Storage[init] mPageManager.load(0x200b8038, 0, 4)
PageManager[load] mBaseSector = 0, mPageCount = 4
PageManager[load] mPages[0] loading...
Partition[read] nrc_sf_read reading addr = 0xfa000, size = 32...
Partition[read] nrc_sf_read returns = 32...
Page[load] PageState::UNINITIALIZED...
Page[load] partition read addr 0x0, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfa000, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 0, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0x200, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfa200, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 512, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0x400, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfa400, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 1024, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0x600, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfa600, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 1536, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0x800, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfa800, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 2048, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0xa00, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfaa00, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 2560, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0xc00, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfac00, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 3072, SPI_FLASH_SEC_SIZE
Page[load] partition read addr 0xe00, block size * 4 = 512...
Partition[read] nrc_sf_read reading addr = 0xfae00, size = 512...
Partition[read] nrc_sf_read returns = 512...
Page[load] i = 3584, SPI_FLASH_SEC_SIZE
Page[load] delete block...
==block and reboot by Watchdog
I followed below steps, but couldn't reproduce the issue.
- Download SDK from https://codeload.github.com/newracom/nrc7292_sdk/tar.gz/refs/tags/v1.4
- cd nrc7292_sdk-1.4/package/standalone
- make select target=nrc7292.sdk.release APP_NAME=sample_udp_client
- which arm-none-eabi-g++
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ - flash output
nrc7292_sdk-1.4/package/standalone/out/nrc7292/standalone_xip/sample_udp_client/nrc7292_standalone_xip_sample_udp_client.bin
Not sure what's gone wrong. The watchdog issue I found was the old gcc toolchain was not handling some of C++ code correctly and I had to use gcc-arm-none-eabi-10.3-2021.10 toolchain.
Can you try again following above steps? I'm thinking that there may be erroneous condition left over from previous attempt.
Dear puffie,
I found the reason. When compiling with sudo, this problem will occur in the compiled bin. I changed it to compile without sudo and it can boot normally. Thank you for your help.
===block and reboot by Watchdog===
sudo make select target=nrc7292.sdk.release APP_NAME=sample_udp_client
sudo make
===OK===
make select target=nrc7292.sdk.release APP_NAME=sample_udp_client
make