LmacRxBlk:1

zaxl
Posts: 29
Joined: Mon Jun 08, 2015 6:34 pm
Contact:

LmacRxBlk:1

Postby zaxl » Wed Aug 03, 2016 7:16 pm

Hi,

My code triggers LmacRxBlk:1 which results in hung device - I suspect that the cause is a long pooling in my code.
(tried with sdk 1.5.2, sdk 1.5.4.1, sdk 2.0 - all get in that state)
But the question is - how to detect this error from user code and how to recover (reset mac or restart)?

Suggestions:
- add general sdk error callback kind of
sdk_set_error_callback(void (*user_cb)(int reason))

reason can be:
OOM - user firmware can try to free some RAM and the SDK retry
macRxBlk - whatever that means

The other is not directly related but - add free_caches or something when called sdk free as much memory as possible - use case is SSL.

Regards,
zaxl

Edit: Some logging
LmacRxBlk:1
state: 5 -> 2 (fa0)
rm 0
WIFI:WCB: 1
ip:cb00a8c0
mask:00ffffff
gw:0100a8c0
WIFI:4
WIFI: offline
state: 2 -> 0 (0)
f r-40, WIFI:WCB: 1
....
LmacRxBlk:1
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt
chg_B1:-40
Regards,
zaxl

Anki
Posts: 25
Joined: Thu Apr 09, 2015 3:00 am

Re: LmacRxBlk:1

Postby Anki » Tue Aug 23, 2016 1:15 am

Are you using any custom interrupt handlers in your code? Very often the Lmac error results from interrupt handlers running longer than the 10µs allowed.

zaxl
Posts: 29
Joined: Mon Jun 08, 2015 6:34 pm
Contact:

Re: LmacRxBlk:1

Postby zaxl » Mon Aug 29, 2016 2:14 am

Hi,

nope no interrupts. it happens during ssl handshake calculations - a bit of traffic and a bit of cpu load. i've reorganized the code a bit and it went away - but don't know when it will bite again.
Regards,
zaxl

Who is online

Users browsing this forum: No registered users and 14 guests