Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sl_wfx_get_signal_strength() crash (same as #8) #15

Open
youca04 opened this issue May 23, 2023 · 4 comments
Open

sl_wfx_get_signal_strength() crash (same as #8) #15

youca04 opened this issue May 23, 2023 · 4 comments

Comments

@youca04
Copy link

youca04 commented May 23, 2023

Hi,

I am revisiting this issue that my colleague reported a few years back. We are using newer firmware and someone tried to 'fix' the code to correctly read sl_wfx_get_signal_strength() rather than the spoof readings that were added to stop a crash.

This is on a WF200C connected by SPI. We see a firmware exception - reason 4 - from the SL_WFX_EXCEPTION_IND_ID event, with the following trace code.

I'm hoping some can advise us on what to look for. It feels like a concurrency locking issue to me as I only see it on some machines intermittently but see it more often now I have increased the calling frequency to about 4 calls per second.

Thanks,
Carl

[92.411] == SL_WFX_EXCEPTION_IND_ID Config register on crash: 02050200 ==
firmware exception 4
hif: 00000000: bc 04 e0 0e 04 00 00 00 76 17 00 00 00 00 00 00
hif: 00000010: 00 00 00 00 00 00 00 00 41 f5 d1 02 00 9e 08 00
hif: 00000020: 00 00 00 00 92 ad 0b 00 00 02 00 00 00 00 00 00
hif: 00000030: d5 23 2e 00 00 00 00 00 00 00 00 00 db 6f 38 00
hif: 00000040: 00 02 00 00 00 00 00 00 25 70 38 00 00 0a 00 00
hif: 00000050: 00 00 00 00 2d 70 38 00 00 06 00 00 00 00 00 00
hif: 00000060: 8b 7f 39 00 00 0e 00 00 00 00 00 00 3b f5 d1 02
hif: 00000070: 00 1e 0f 00 00 00 00 00 3d f5 d1 02 00 1e 0f 00
hif: 00000080: 00 00 00 00 3f f5 d1 02 00 1e 0f 00 00 00 00 00
hif: 00000090: d5 74 d0 02 02 16 00 00 08 00 01 00 d8 74 d0 02
hif: 000000a0: 02 00 00 00 00 00 00 00 50 86 d0 02 02 02 00 00
hif: 000000b0: 00 00 00 00 54 86 d0 02 02 9c 00 00 01 00 01 00
hif: 000000c0: b1 16 ca 02 02 12 00 00 08 00 01 00 b3 16 ca 02
hif: 000000d0: 02 1c 00 00 08 00 00 00 ba 16 ca 02 02 16 00 00
hif: 000000e0: 08 00 01 00 bd 16 ca 02 02 00 00 00 00 00 00 00
hif: 000000f0: 7d 1f ca 02 02 02 00 00 00 00 00 00 81 1f ca 02
hif: 00000100: 02 1c 00 00 01 00 01 00 b6 ae cb 02 02 12 00 00
hif: 00000110: 08 00 01 00 b8 ae cb 02 02 1c 00 00 08 00 00 00
hif: 00000120: bf ae cb 02 02 16 00 00 08 00 01 00 c2 ae cb 02
hif: 00000130: 02 00 00 00 00 00 00 00 7d b7 cb 02 02 02 00 00
hif: 00000140: 00 00 00 00 81 b7 cb 02 02 1c 00 00 01 00 01 00
hif: 00000150: bb 46 cd 02 02 12 00 00 08 00 01 00 bd 46 cd 02
hif: 00000160: 02 1c 00 00 08 00 00 00 c5 46 cd 02 02 16 00 00
hif: 00000170: 08 00 01 00 c7 46 cd 02 02 00 00 00 00 00 00 00
hif: 00000180: 78 50 cd 02 02 02 00 00 00 00 00 00 7c 50 cd 02
hif: 00000190: 02 1c 00 00 01 00 01 00 c0 de ce 02 02 12 00 00
hif: 000001a0: 08 00 01 00 c3 de ce 02 02 1c 00 00 08 00 00 00
hif: 000001b0: ca de ce 02 02 16 00 00 08 00 01 00 cc de ce 02
hif: 000001c0: 02 00 00 00 00 00 00 00 4d 24 cf 02 02 1c 00 00
hif: 000001d0: 01 00 01 00 51 24 cf 02 02 02 00 00 00 00 00 00
hif: 000001e0: cc 74 d0 02 02 12 00 00 08 00 01 00 ce 74 d0 02
hif: 000001f0: 02 1c 00 00 08 00 00 00 46 24 cf 02 03 20 aa fe
hif: 00000200: ff ff 00 00 5e 86 d0 02 03 04 00 00 00 00 00 00
hif: 00000210: 64 86 d0 02 03 06 00 00 00 00 00 00 70 86 d0 02
hif: 00000220: 03 a0 80 00 00 00 00 01 b8 87 c8 02 03 20 8f 00
hif: 00000230: 00 00 00 01 8b 1f ca 02 03 04 00 00 00 00 00 00
hif: 00000240: 91 1f ca 02 03 06 00 00 00 00 00 00 9d 1f ca 02
hif: 00000250: 03 20 94 00 00 00 00 01 8c b7 cb 02 03 04 00 00
hif: 00000260: 00 00 00 00 91 b7 cb 02 03 06 00 00 00 00 00 00
hif: 00000270: 9d b7 cb 02 03 20 99 00 00 00 00 01 87 50 cd 02
hif: 00000280: 03 04 00 00 00 00 00 00 8c 50 cd 02 03 06 00 00
hif: 00000290: 00 00 00 00 98 50 cd 02 03 20 9e 00 00 00 00 01
hif: 000002a0: 3f 24 cf 02 03 08 00 00 00 00 00 00 57 e9 d1 02
hif: 000002b0: 05 00 8f 39 44 01 00 00 56 f2 d1 02 05 80 8f 39
hif: 000002c0: 44 01 00 00 e8 17 d1 02 05 00 8f 39 44 01 00 00
hif: 000002d0: 9c 2b d1 02 05 00 8f 39 44 01 00 00 3c 35 d1 02
hif: 000002e0: 05 00 8f 39 44 01 00 00 64 5e d1 02 05 00 8f 39
hif: 000002f0: 44 01 00 00 e7 84 d1 02 05 00 8f 39 44 01 00 00
hif: 00000300: fd 8b d1 02 05 00 04 39 44 01 00 00 c2 99 d1 02
hif: 00000310: 05 00 02 39 44 01 00 00 8e c1 d1 02 05 00 8f 39
hif: 00000320: 44 01 00 00 f7 17 d1 02 07 00 80 00 00 00 00 00
hif: 00000330: fb 17 d1 02 07 04 00 00 00 00 00 00 ac 2b d1 02
hif: 00000340: 07 00 80 00 00 00 00 00 b0 2b d1 02 07 04 00 00
hif: 00000350: 00 00 00 00 4b 35 d1 02 07 00 80 00 00 00 00 00
hif: 00000360: 4f 35 d1 02 07 04 00 00 00 00 00 00 74 5e d1 02
hif: 00000370: 07 00 80 00 00 00 00 00 78 5e d1 02 07 04 00 00
hif: 00000380: 00 00 00 00 f6 84 d1 02 07 00 80 00 00 00 00 00
hif: 00000390: fa 84 d1 02 07 04 00 00 00 00 00 00 9d c1 d1 02
hif: 000003a0: 07 00 80 00 00 00 00 00 a1 c1 d1 02 07 04 00 00
hif: 000003b0: 00 00 00 00 65 e9 d1 02 07 00 80 00 00 00 00 00
hif: 000003c0: 69 e9 d1 02 07 04 00 00 00 00 00 00 65 f2 d1 02
hif: 000003d0: 07 00 80 00 00 00 00 00 6a f2 d1 02 07 84 00 00
hif: 000003e0: 00 00 00 00 fb fa d0 02 07 00 80 00 00 00 00 00
hif: 000003f0: 00 fb d0 02 07 04 00 00 00 00 00 00 22 04 d1 02
hif: 00000400: 07 00 80 00 00 00 00 00 26 04 d1 02 07 04 00 00
hif: 00000410: 00 00 00 00 59 39 83 00 08 14 00 00 00 00 00 00
hif: 00000420: 34 7a 84 00 08 12 00 00 0f 00 00 00 3a 81 84 00
hif: 00000430: 08 14 00 00 00 00 00 00 5f 4c 87 00 08 12 00 00
hif: 00000440: 0f 00 00 00 b3 4d 87 00 08 14 00 00 00 00 00 00
hif: 00000450: f9 60 8b 00 08 12 00 00 0f 00 00 00 2c 98 8b 00
hif: 00000460: 08 14 00 00 00 00 00 00 40 a6 8f 00 08 12 00 00
hif: 00000470: 0f 00 00 00 cb a7 8f 00 08 14 00 00 00 00 00 00
hif: 00000480: b8 b3 93 00 08 12 00 00 0f 00 00 00 95 0e 94 00
hif: 00000490: 08 14 00 00 00 00 00 00 13 ed a2 00 08 12 00 00
hif: 000004a0: 0f 00 00 00 60 ff a2 00 08 94 00 00 00 00 00 00
hif: 000004b0: 00 00 00 00 0b 00 00 00 00 00 00 00

@silabs-JulienT
Copy link
Collaborator

Hi,

Could you share the wfx driver and firmware version used?
It would also be helpful to know more about the ecosystem the driver is running in (RTOS, IP stack...).

@youca04
Copy link
Author

youca04 commented May 24, 2023

Hi,

Thanks for responding so quickly. Here is a summary of the details to the best of my knowledge (I'm not totally up to date with the WFX architecture or this product - just been asked to assist to find a fix to this issue).

WFX firmware image: 3.14.0
Driver? FMAC_DRIVER_VERSION_XXX: 3.2.2
LWIP: 2.1.3
FreeRTOS tskKERNEL_VERSION_NUMBER "V10.2.0"

The WF200C is being driven by SPI at 500K. The host processor is an NXP i.MXRT1062. All other Wi-Fi functionality appears to be fine - only querying for signal strength causes intermittent faults. There is plenty of free heap space, and the related tasks all have significant free stack space.

I left my dev device running yesterday - querying for status twice a second, from about 15:13 to 18:00 - and there 26 crashes recorded in the log files over that time frame. Not a huge amount in the time frame, but enough.

Some of our production devices are faulting every 30 - 60 seconds or so,

Thanks,

Carl

@silabs-dzungN
Copy link

silabs-dzungN commented May 31, 2023

Hi,

I was querying for the RSSI value as you did. The tests were run for around 90 mins at each 2Hz and 4Hz querying rate, and the firmware replied without faults. The measured RSSI is around -45~-50 dBm

My settings are as below:
FreeRTOS v9.0.0
WFx Firmware v3.13.0
WFx driver v3.4.0
LWIP 2.1.1

Can you tell us what other activities does your wf200 module had to do at the same time? Things like ping, sending files, etc.; and does the problem persist if other activities are disabled, which means that only sl_wfx_get_signal_strength() is called at the mentioned frequency?

Best regards,
Dzung.

@youca04
Copy link
Author

youca04 commented Jun 1, 2023

Hi Dzung,

Thank you for your tests. The module was not doing anything in particular when the crash occurred, but I haven't added any detailed logging yet to check exactly what may be happening.

I will try a test where I add mutual exclusion for all tasks with this API to see if it helps. I will also add some additional profiling code to trace the task states.

Regards,
Carl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants