deepsleep_ping example issues (not pinging)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
NiMc_1688136
Level 5
Level 5
10 sign-ins 50 questions asked 10 solutions authored

I am trying to run the snip\ping_deepsleep example with FreeRTOS and LWIP. The application is crashing (hitting assert) right after getting the DHCP address.

In LwIP, pbuf.c, pbuf_free function, the application stops at LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0) where p->ref == 0.

The issue occurs in SDK 6.1 (lwIP 2.0.2) and 6.2 (lwIP 2.0.3).

Device: CYW43907

Console out

Application started: cur_rtos_time=0 cur_slow_time=92403407 rtos_time_since_deep_sleep_enter=2800103 wakeup_count=1

Cold boot.

Initialising LwIP v2.0.2

DHCP CLIENT hostname WICED IP

WLAN MAC Address : B8:D7:AF:28:B6:72

WLAN Firmware    : wl0: Feb 12 2018 23:35:27 version 7.15.168.108 (r683813) FWID 01-81fd72af

WLAN CLM         : API: 12.2 Data: 9.10.74 Compiler: 1.31.3 ClmImport: 1.36.3 Creation: 2018-02-12 23:30:46

WICED inited: rtos_time_since_deep_sleep_enter=2800787

Networking is about to bring up

Setting IPv6 link-local address

Obtaining IPv4 address via DHCP

IPv6 Network ready IP: FE80::BAD7:AFFF:FE28:B672

IPv4 Network ready IP: 192.168.1.100

Call tree (using lwip v2.0.2)

tcpip_thread, msg->msg.inp.input_fn(msg->msg.inp.p, msg->msg.inp.netif);     ( line 134)

    ethernet_input, etharp_input(p, netif);    (line 199)

         etharp_input,  pbuf_free(p);     (line 739)

I tried the same example with ThreadX and NetX Duo (my application needs FreeRTOS btw). If i run the application I get the stats message repeating:

stats: up_num=94 up_time=13165 max_up_time=0 wait_up_time=696 cpu_timer(cold=115601560 warm=0) pmu_timer(cold=112578747 warm=0)

wiced_network_save_dhcp_state_for_deep_sleep

If i debug the application then I hit an assert statement in wiced_network_resume_layers: wiced_assert("WICED can't resume DHCP client", 0 != 0 );

I have verified that pings do not work through wireshark monitoring and monitoring current consumption on a scope.

0 Likes
6 Replies