MPU FAULT, Data access violation

Hello,

I am working with the NRF 52 DK, communicating with a sensor through I2C. The communication is working and I can read the values from the sensor. I record the data in a vector for 15 seconds with a sample rate of 25sps, after this, I want to do some processing of the data at this point appears the following error

[00:00:13.764,984] <err> os: ***** BUS FAULT *****
[00:00:13.765,014] <err> os: ***** HARD FAULT *****
[00:00:13.766,357] <err> os: Fault escalation (see below)
[00:00:13.767,669] <err> os: ***** MPU FAULT *****
[00:00:13.773,345] <err> os: Data Access Violation
[00:00:13.779,144] <err> os: MMFAR Address: 0x1ffffb94
[00:00:13.785,644] <err> os: r0/a1: 0x00018963 r1/a2: 0x200007f1 r2/a3: 0x00000008
[00:00:13.791,351] <err> os: r3/a4: 0x00018963 r12/ip: 0x00000069 r14/lr: 0x0000783f
[00:00:13.797,241] <err> os: xpsr: 0x21000005
[00:00:13.803,527] <err> os: Faulting instruction address (r15/pc): 0x0000a8a8
[00:00:13.812,622] <err> os: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0

When debugging the code it starts the processing without any problem until a point where variables start changing for strange values so It seems to be a memory-related problem. I have tried fixing it by increasing CONFIG_MAIN_STACK_SIZE. 

Also, I have looked for the faulting instruction address using addr2line but the result is a function inside Zephyr drivers, it changes every time I run it

Does anyone know what could be the problem here?

Parents Reply Children
No Data
Related