This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf/samples/nrf9160/mqtt_simple: BUS FAULT

This is the output of application compiled with "west build -p -b circuitdojo_feather_nrf9160ns nrf/samples/nrf9160/mqtt_simple":

+CEREG: 2,"FFFE","FFFFFFFF",7,0,0,"11100000","11100000"                                                                               
+CEREG: 2,"D1F5","0219BA11",7,0,0,"11100000","11100000"                                                                               
+CSCON: 1                                                                                                                             
+CEREG: 5,"D1F5","0219BA11",7,,,"11100000","11100000"                                                                                 
[00:01:02.697,357] <inf> mqtt_simple: LTE Link Connected!                                                                             
[00:01:02.866,882] <inf> mqtt_simple: IPv4 Address found 137.135.83.217                                                               
[00:01:02.867,614] <dbg> mqtt_simple.client_id_get: client_id = nrf-352656107237110                                                   
[00:01:03.401,885] <inf> mqtt_simple: MQTT client connected                                                                           
[00:01:03.401,885] <inf> mqtt_simple: Subscribing to: my/subscribe/topic len 18                                                       
[00:01:03.809,875] <inf> mqtt_simple: SUBACK packet id: 1234                                                                          
[00:01:04.018,859] <inf> mqtt_simple: MQTT PUBLISH result=0 len=5                                                                     
[00:01:04.018,951] <inf> mqtt_simple: Received: 45664                                                                                 
[00:01:04.064,544] <inf> mqtt_simple: Publishing: 45664                                                                               
[00:01:04.064,544] <inf> mqtt_simple: to topic: my/publish/topic len: 16                                                              
[00:01:04.064,666] <err> os: Exception occurred in Secure State                                                                       
[00:01:04.064,666] <err> os: ***** HARD FAULT *****                                                                                   
[00:01:04.064,666] <err> os:   Fault escalation (see below)                                                                           
[00:01:04.064,666] <err> os: ***** BUS FAULT *****                                                                                    
[00:01:04.064,697] <err> os:   Precise data bus error                                                                                 
[00:01:04.064,697] <err> os:   BFAR Address: 0x50008158                                                                               
[00:01:04.064,697] <err> os: r0/a1:  0x00000000  r1/a2:  0xe000ed00  r2/a3:  0x200156a8                                               
[00:01:04.064,727] <err> os: r3/a4:  0x200148e0 r12/ip:  0x00021ead r14/lr:  0x0001d48d                                               
[00:01:04.064,727] <err> os:  xpsr:  0x60000000                                                                                       
[00:01:04.064,727] <err> os: Faulting instruction address (r15/pc): 0x00000000                                                        
[00:01:04.064,727] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0                                                         
[00:01:04.064,727] <err> os: Current thread: 0x200148e0 (unknown)

Bisect shows this as the first commit that results in failure (as everything is fine with 1.5.1):

26c6230e3bd5c29d77d183eb295aa7426b24a2d7 is the first bad commit
commit 26c6230e3bd5c29d77d183eb295aa7426b24a2d7
Author: Trond Einar Snekvik <[email protected]>
Date: Wed Apr 21 14:32:52 2021 +0200
manifest: Upmerge 21.04.2021

Regular upmerge.

Signed-off-by: Trond Einar Snekvik <[email protected]>

After bisecting nrfxlib project, the following commit seems to make a difference:

nrf_modem: Do not imply CONFIG_FPU

Removes the imply FPU kconfig entry in NRF_MODEM.

Previously, this would fail linking when TFM was enabled, as that forces
FP_SOFTABI, which there is no binary for. The intent of the original
encourage FPU usage when available, but with TFM, this is no longer
valid.

Signed-off-by: Trond Einar Snekvik <[email protected]>

After enabling CONFIG_FPU in master branch of nrf repository, it seem that issue is no longer reproducible. Same happens with downstream code with CoAP library, so it is not mqtt_simple specific. It seems that the problem is with libmodem.a library. Reproducible with 778fa293d74b7a4fb669516837fb2a392d57e26e.

Parents Reply Children
No Data
Related