Hi,I use US159-DA16200MEVZ with AT Command.When I tried acceess to AWS s3 use on AT+NWHTC(with presigned URL), DA16200 put "Hard Fault Exception".Presigned URL is long(over 1500 character) URL Data.
AT Command
AT+NWHTC=https://xxxxxxxx....xxxxxxx,get
Debug Message
And, I confirmed same issue with dummy long URL.AT Command
AT+NWHTC=https://aaaaaaa...aaaaaaa,get
When I used dummy short long URL, Hard Fault is not occured.
AT+NWHTC=https://aaaaa,get OK +NWHTCSTATUS:3
Read CA(length = 0) Read Cert(length = 0) Read Privkey(length = 0) [httpc_cb_result_fn:674]httpc_result: 3, received: 0 byte, err: -16
so, I think maybe over DA16200's URL limit size.I want to solve this problem.I would greatly appreciate any feedback, guidance, or suggestions that the Renesas community can provide.
My SDK Information is...
Wakeup source is 0x4 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3 * - Serial Flash : 4 MB * - SDK Version : V3.2.3.0 GEN-ATCMD * - F/W Version : FRTOS-GEN01-01-56c232799-004158 * - F/W Build Time : Jun 3 2022 16:56:46 * - Boot Index : 0 * ****************************************************** System Mode : Station Only (0)
Best Regarts.
Hi There,Thank you for posting your question online.From the logs you have shared I can see that you are using a quite old SDK version (v3.2.3). Is there a reason you are not using the latest SDK version?We highly recommend to use the latest SDK version v3.2.6 which you can find here:https://www.renesas.com/eu/en/document/sws/da16200-da16600-freertos-sdk-v3260?r=1600096You can find the pre-compiled images here: https://www.renesas.com/eu/en/document/sws/da16200-da16600-freertos-sdk-image-v3260?r=1600096Regarding the issue you are facing with AT+NWHTC:The maximum url string length is 256 bytes. That is why you were facing a Hard Fault Exception.
You should search on the user_http_client.h file and change:
#define HTTPC_MAX_PATH_LEN 256
#define HTTPC_MAX_PATH_LEN (1024 * 2)
// Max size of HTTP Client's request data #define HTTPC_MAX_REQ_DATA (1024 * 4)
// Stack size of HTTP Client #define HTTPC_STACK_SZ (1024 * 6) // Max 10KB
#define TX_PAYLOAD_MAX_SIZE (1024 * 8) // Max 8KB
Hi OV_Renesas,
Thanks for your answer.
I want to try this suggestions but now I'm facing bellow same problem and I can not build SDK version v3.2.6 on windows.
https://community.renesas.com/wireles-connectivity/f/wi-fi/29990/da16200-sdk-3-2-6-unable-to-build
for now, I wait this issue is solved.
Hi There,Apologies for the delay.Regarding the Error: -682The root cause of this error was that MCU sent the AT+NWHTC command before it had received the +NWHTCSTATUS:0 response.
The normal sequence is like below:1. MCU will send "AT+NWHTC=">">https://xxxxx,put,Message1" command.2. MCU will receive "OK" response.(Then, the MCU can send another command (for instance: AT+VER) except "AT+NWHTC" to DA16200. You cannot send again the AT+NWHTC command because it is still working)3.Finally, if the MCU receives "+NWHTCSTATUS:0" response, then the MCU can send next AT+NWHTC command.Please test after changing the sequence on the MCU side.Regarding the Hard Fault Error:We were not able to reproduce this error after trying multiple times. Can you please clarify if you faced the error -682 and the hard fault error with the official (pre-compiled) binary (DA16200_IMG_FreeRTOS_ATCMD_QFN_v3.2.6.0_4MB) or if it happened with your own custom binary? If it happened with your own custom binary, could you please provide a map file so we can investigate it?Can you also kindly share how many times (how often) are you able to reproduce the hard fault error?Finally, could you please test again after changing the sequence of the MCU? (MCU send the next AT+NWHTC command only after it has received the +NWHTCSTATUS response)Best Regards,OV_Renesas
Thanks your answer!!
I will try your suggestions "Changing the sequence of the MCU".
HI There,Thank you for the reply.Please share any feedback if you faced the Error: -682 and the Hard Fault error after changing the sequence of the MCU.Kind Regards,OV_Renesas
Sorry I mistake log file.I put again.
Thanks your support.
I tried to change sequence (Wait +NWHTCSTATUS Response).
so, Error: -682 was gone. Thanks a lot!!!
But... I faced Hard Fault too.I insert log (with masked private information)
- DEBUG LOG
Wakeup source is 0x4 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3 * - Serial Flash : 4 MB * - SDK Version : V3.2.6.0 GEN-ATCMD * - F/W Version : FRTOS-GEN01-01-df31adb8a-006190 * - F/W Build Time : Feb 9 2023 13:58:04 * - Boot Index : 0 * ****************************************************** System Mode : Station Only (0) >>> Start DA16X Supplicant ... >>> DA16x Supp Ver2.7 - 2022_03 >>> MAC address (sta0) : XXXXXXXXXXXXXXXXXXXXXXXXXX >>> sta0 interface add OK >>> Start STA mode... >>> UART1 : Clock=80000000, BaudRate=115200 >>> UART1 : DMA Enabled ... >>> Network Interface (wlan0) : UP >>> Associated with XXXXXXXXXXXXXXXXXXXXXXXXXX Connection COMPLETE to XXXXXXXXXXXXXXXXXXXXXXXXXX -- DHCP Client WLAN0: SEL(6) -- DHCP Client WLAN0: REQ(1) ### User Call-back : Success to connect Wi-Fi ... -- DHCP Client WLAN0: CHK(8) -- DHCP Client WLAN0: BOUND(10) Assigned addr : XXXXXXXXXXXXXXXXXXXXXXXXXX netmask : XXXXXXXXXXXXXXXXXXXXXXXXXX gateway : XXXXXXXXXXXXXXXXXXXXXXXXXX DNS addr : XXXXXXXXXXXXXXXXXXXXXXXXXX DHCP Server IP : XXXXXXXXXXXXXXXXXXXXXXXXXX Lease Time : XXXXXXXXXXXXXXXXXXXXXXXXXX Renewal Time : XXXXXXXXXXXXXXXXXXXXXXXXXX all Delete success. Read CA(length = 1469) Read Cert(length = 0) Read Privkey(length = 0) HTTP-Client request to https://XXXXXXXXXXXXXXXXXXXXXXXXXX hdr_len : 318, content_len : 0 httpc_result: 0, received: 0 byte, err: 0 Read CA(length = 1469) Read Cert(length = 0) Read Privkey(length = 0) HTTP-Client request to https://XXXXXXXXXXXXXXXXXXXXXXXXXX hdr_len : 422, content_len : 14 httpc_result: 0, received: 14 b Fault_count:1 Fault_PC:0x8ba62 [Hard Fault Exception] Register-Dump R0 :20086746, R1 :00000100, R2 :000adaa8, R3 :000ada88 R4 :00000001, R5 :000992fd, R6 :a5a5a5a5, R7 :a5a5a5a5 R8 :a5a5a5a5, R9 :a5a5a5a5, R10 :a5a5a5a5, R11 :a5a5a5a5 R12 :a5a5a5a5, SP :00080ddc, LR :0008ba55, PC :0008ba62 PSR :2100000e, EXC :fffffff1, Fault Status SHCSR :00000400, CFSR :01000000, HFSR :40000000 DFSR :00000000, MMFAR :e000ed34, BFAR :e000ed38 AFSR :00000000, SysInfo SICS[0] = 04300000 SICS[1] = 00000000 SICS[2] = 00000000 SICS[3] = 00000000 SICS[4] = 00000000 SICS[5] = 015f4571 Stack-Dump (48) [0x00080ddc] : 00000001 00F00000 00000007 C0000018 00093654 0015C2F9 0015C198 41000000 [0x00080dfc] : 5B594B7D 4F4F5053 01405A3F ECE96B58 797DFD7C 20086746 00000100 000ADAA8 [0x00080e1c] : 000ADA88 00000001 000992FD A5A5A5A5 A5A5A5A5 A5A5A5A5 A5A5A5A5 A5A5A5A5 [0x00080e3c] : A5A5A5A5 A5A5A5A5 00080DDC 0008BA55 0008BA62 2100000E FFFFFFF1 A5A5A5A5 [0x00080e5c] : 00000001 00F00000 00000007 C0000018 00093654 0015C2F9 0015C198 41000000 [0x00080e7c] : 5B594B7D 4F4F5053 01405A3F ECE96B58 797DFD7C 20086746 00000100 000ADAA8 Current Thread Thread: stack ptr : 20086746 stack base: 68004808 stack end : 81f0e8bd stack high: 20086746 max usage : 61e88178 suspend : 00000159 Thread Stack (0) Wakeup source is 0x1 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3 * - Serial Flash : 4 MB * - SDK Version : V3.2.6.0 GEN-ATCMD * - F/W Version : FRTOS-GEN01-01-df31adb8a-006190 * - F/W Build Time : Feb 9 2023 13:58:04 * - Boot Index : 0 * ****************************************************** ....
-AT COMMNAD LOG (with Time Stamp)
[2023-03-31T10:45:08.762382] AT+NWMQCL=0 [2023-03-31T10:45:10.766886] OK [2023-03-31T10:45:10.766886] AT+NWDCRT [2023-03-31T10:45:12.769099] OK [2023-03-31T10:45:12.769099] C3, [2023-03-31T10:45:12.882107] -----BEGIN CERTIFICATE----- XXXXXXXXXXXXXXXXXXXXXXXXXX -----END CERTIFICATE----- [2023-03-31T10:45:14.893011] OK [2023-03-31T10:45:14.893011] AT+NWCCRT [2023-03-31T10:45:16.897208] +NWCCRT:32 OK [2023-03-31T10:45:16.902978] AT+NWHTC=https://XXXXXXXXXXXXXXXXXXXXXXXXXX,put,Hello World !! [2023-03-31T10:45:18.906398] OK HTTP/1.1 200 OK XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Date: Fri, 31 Mar 2023 01:45:14 GMT XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Server: XXXXXXXXXXXXXXXXXXXXXXXXXX Content-Length: 0 Connection: close [2023-03-31T10:45:20.908293] +NWHTCSTATUS:0 [2023-03-31T10:45:20.909552] AT+NWHTC=https://XXXXXXXXXXXXXXXXXXXXXXXXXX,get [2023-03-31T10:45:22.916644] OK HTTP/1.1 200 OK XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Date: Fri, 31 Mar 2023 01:45:18 GMT Last-Modified: Fri, 31 Mar 2023 01:45:14 GMT XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Accept-Ranges: bytes Content-Type: binary/octet-stream Server: XXXXXXXXXXXXXXXXXXXXXXXXXX Content-Length: 14 Connection: close Hello World !! [2023-03-31T10:45:24.918005] +NWHTCSTATUS:0 +INIT:DONE,0 .... +WFJAP:1,XXXXXXXXXXXXXXXXXXXXXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXX
And I faced another pattern ASSERT vPortFree 405/406.This Pattern is not Hard Fault, but debug log put ASSERT vPortFree 405/406.I insert log too.- DEBUG LOG
Wakeup source is 0x4 [dpm_init_retmemory] DPM INIT CONFIGURATION(1) ****************************************************** * DA16200 SDK Information * --------------------------------------------------- * * - CPU Type : Cortex-M4 (120MHz) * - OS Type : FreeRTOS 10.4.3 * - Serial Flash : 4 MB * - SDK Version : V3.2.6.0 GEN-ATCMD * - F/W Version : FRTOS-GEN01-01-df31adb8a-006190 * - F/W Build Time : Feb 9 2023 13:58:04 * - Boot Index : 0 * ****************************************************** System Mode : Station Only (0) >>> Start DA16X Supplicant ... >>> DA16x Supp Ver2.7 - 2022_03 >>> MAC address (sta0) : XXXXXXXXXXXXXXXXXXXXXXXXXX >>> sta0 interface add OK >>> Start STA mode... >>> UART1 : Clock=80000000, BaudRate=115200 >>> UART1 : DMA Enabled ... >>> Network Interface (wlan0) : UP >>> Associated with XXXXXXXXXXXXXXXXXXXXXXXXXX Connection COMPLETE to XXXXXXXXXXXXXXXXXXXXXXXXXX -- DHCP Client WLAN0: SEL(6) -- DHCP Client WLAN0: REQ(1) ### User Call-back : Success to connect Wi-Fi ... -- DHCP Client WLAN0: CHK(8) -- DHCP Client WLAN0: BOUND(10) Assigned addr : XXXXXXXXXXXXXXXXXXXXXXXXXX netmask : XXXXXXXXXXXXXXXXXXXXXXXXXX gateway : XXXXXXXXXXXXXXXXXXXXXXXXXX DNS addr : XXXXXXXXXXXXXXXXXXXXXXXXXX DHCP Server IP : XXXXXXXXXXXXXXXXXXXXXXXXXX Lease Time : XXXXXXXXXXXXXXXXXXXXXXXXXX Renewal Time : XXXXXXXXXXXXXXXXXXXXXXXXXX all Delete success. Read CA(length = 1469) Read Cert(length = 0) Read Privkey(length = 0) HTTP-Client request to https://XXXXXXXXXXXXXXXXXXXXXXXXXX hdr_len : 350, content_len : 0 httpc_result: 0, received: 0 byte, err: 0 Read CA(length = 1469) Read Cert(length = 0) Read Privkey(length = 0) HTTP-Client request to https://XXXXXXXXXXXXXXXXXXXXXXXXXX hdr_len : 318, content_len : 0 httpc_result: 0, received: 0 byte, err: 0 Read CA(length = 1469) Read Cert(length = 0) Read Privkey(length = 0) HTTP-Client request to https://XXXXXXXXXXXXXXXXXXXXXXXXXX hdr_len : 422, content_len : 14 httpc_result: 0, received: 14 b>> ASSERT vPortFree 405 !!! >> ASSERT vPortFree 406 !!! yte, err: 0
[2023-03-31T11:02:26.741221] AT+NWMQCL=0 [2023-03-31T11:02:28.748969] OK [2023-03-31T11:02:28.748969] AT+NWDCRT [2023-03-31T11:02:30.754103] OK [2023-03-31T11:02:30.756124] C3, [2023-03-31T11:02:30.865919] -----BEGIN CERTIFICATE----- XXXXXXXXXXXXXXXXXXXXXXXXXX -----END CERTIFICATE----- [2023-03-31T11:02:32.881220] OK [2023-03-31T11:02:32.883737] AT+NWCCRT [2023-03-31T11:02:34.886191] +NWCCRT:32 OK [2023-03-31T11:02:34.886191] AT+NWHTC=https://XXXXXXXXXXXXXXXXXXXXXXXXXX,put,Hello World !! [2023-03-31T11:02:36.901782] OK HTTP/1.1 200 OK XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Date: Fri, 31 Mar 2023 02:02:33 GMT XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Server: XXXXXXXXXXXXXXXXXXXXXXXXXX Content-Length: 0 Connection: close [2023-03-31T11:02:38.905763] +NWHTCSTATUS:0 [2023-03-31T11:02:38.907780] AT+NWHTC=https://XXXXXXXXXXXXXXXXXXXXXXXXXX,put,Hello World !! [2023-03-31T11:02:40.916666] OK HTTP/1.1 200 OK XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Date: Fri, 31 Mar 2023 02:02:36 GMT XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Server: XXXXXXXXXXXXXXXXXXXXXXXXXX Content-Length: 0 Connection: close [2023-03-31T11:02:42.920276] +NWHTCSTATUS:0 [2023-03-31T11:02:42.920276] AT+NWHTC=https://XXXXXXXXXXXXXXXXXXXXXXXXXX,get [2023-03-31T11:02:44.932326] OK HTTP/1.1 200 OK XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Date: Fri, 31 Mar 2023 02:02:40 GMT Last-Modified: Fri, 31 Mar 2023 02:02:36 GMT XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXX Accept-Ranges: bytes Content-Type: binary/octet-stream Server: XXXXXXXXXXXXXXXXXXXXXXXXXX Content-Length: 14 Connection: close Hello World !! [2023-03-31T11:02:46.936357] +NWHTCSTATUS:0
I would greatly appreciate any feedback/suggestions.
Finally, I will answer the following.
> official (pre-compiled) binary (DA16200_IMG_FreeRTOS_ATCMD_QFN_v3.2.6.0_4MB) or if it happened with your own custom binary?
I use official (pre-compiled) binary (DA16200_IMG_FreeRTOS_ATCMD_QFN_v3.2.6.0_4MB).And I changed MQTT TLS buffer size on debug window refer to the bellow.
Da16200 connecting to AWS
[/DA16200/NVRAM] # nvram Command-List is changed, "NVRAM" [/DA16200/NVRAM] # setenv MQTT_TLS_INCOMING 16384 [/DA16200/NVRAM] # [/DA16200/NVRAM] # setenv MQTT_TLS_OUTGOING 16384 [/DA16200/NVRAM] # reboot
> how many times (how often) are you able to reproduce the hard fault error?
When I send Https PUT -> Https GET, Hard Fault or ASSERT vPortFree one or the other always occurs.
Hi There,Thank you for the reply and the feedback.I shared the response with our Wi-Fi Team and I will get back to you as soon as possible.Best Regards,OV_Renesas
Hi There,Our Team was able to reproduce the "ASSERT vPortFree 405/406" error (with the DA16200 EVK + Python HTTPS server on Test PC) and are currently looking for the root of cause. We will update you as soon as possible.
Regarding the Hard-Fault error, our team was not able to reproduce it yet. From the logs you have shared, the URL and header information were blocked with "xxxxxx".Could you please provide the test URL and test cert information (temporarily ROOT CA) of yours. We would like to run the exact same test as you did. If the information is confidential, you could raise a private ticket.In order to do that:Go on our Renesas Website and click on the following: A new window should pop-up:Click on Submit a Ticket and fill the forms.Please make sure that on Inquiry Product Category you have inserted the option Wireless Connectivity.Please also add the link of this forum thread on your private ticket so we can track it down. Everything is confidential there and 1on1.If you do not want to share these information at all, we could provide a debug log enabled test binary to narrow down the issue.The best way for us would be to run the same test as you did.Kind Regards,OV_Renesas
I'm looking forward to solve "ASSERT vPortFree 405/406" .
About Hard-Fault error,
It will take time to prepare Test URL.
Becasae I access Cloud Storage use on Presigned URL with limited time, and I change URL every test.
Sorry Please wait.
Hi There,Thank you for the reply and the feedback.We will be waiting for the Test URL and we will update you regarding the Assert Error as soon as possible.Kind Regards,OV_Renesas
Hi There,Apologies for the delay.Please find the attached zip with a patch we created for SDK v3.2.6 in order to fix the ASSERT vPortFree 405 Error , and hopefully the Hard Fault error as well.You will need to replace the file inside the folder path of SDK v3.2.6 as shown in the zip file.Please test it from your side and share any feedback.20230411_assert_and_hardfault_patch.zipKind Regards,OV_Renesas
Thanks your support!
I will try, and share any feedback.
Please wait.