Hi, We are trying to work with nrfxlib directly baremetal without Zephyr. Were able to do advertising with it. On nRF52832 the SDC crashes when we tried to set new advertising data by calling
On the nRF52840, everything works smoothly.
We saw the debug symbols that the libsoftdevice_controller_multirole.a was compiled for S140. Could this be the issue. Can Nordic provide a version for the S132 ?
I aslo suspect other issue. it could be that some how when compiling for the nRF52832 it cause some global variable inside the lib to be unaligned causing the crash (hardfault).
Please review the library code to make sure proper variable alignment or enable unaligned access for the gcc compiler when compiling the lib.
crash location : sym_OC5GPSERLPE7TKXSCU3QAZ62H3OM4MWFYV7WX2I() at 0x2f5f8
UPDATE : Sorry I was talking to fast about the the nRF52840. It also crashes but I can confirm this. The crash was cause by unaligned access within either the mpsl or the sec lib.
Compile my code by disabling all optimization works but not when optimization is enable. The different is that when no optimization all global vars are word aligned while optimization will pack all global on a byte align.