MPU FAULT

I'm working with nRF Connect SDK (Zephyr). In that I am using 255 byte array to get response from nrf52832 through BLE. my code is getting crash in response back. when I decrease size of array to 50 byte it's working.

but when I compile same in nrf5 sdk code it's working properly with 255 bytes array. Can you provide any solution or workaround to get it work?

Error Log:

*** Booting nRF Connect SDK d96769faceca ***
GPIO pins initialized correctly
[00:00:00.002,777] <inf> adc_module: gpio_init: pin reset low: 0

I2C device ready
ADC device ready
Device MCP7940N is ready.
Device 1 is ready.
[00:00:06.940,979] <inf> bt_sdc_hci_driver: hci_driver_open: SoftDevice Controller build revision:
                                            36 f0 e5 0e 87 68 48 fb  02 fd 9f 82 cc 32 e5 7b |6....hH. .....2.{
                                            91 b1 5c ed                                      |..\.             
[00:00:06.943,237] <inf> bt_hci_core: hci_vs_init: HW Platform: Nordic Semiconductor (0x0002)
[00:00:06.943,267] <inf> bt_hci_core: hci_vs_init: HW Variant: nRF52x (0x0002)
[00:00:06.943,298] <inf> bt_hci_core: hci_vs_init: Firmware: Standard Bluetooth controller (0x00) Version 54.58864 Build 1214809870
[00:00:06.944,122] <inf> bt_hci_core: bt_dev_show_info: Identity: E4:FA:82:90:32:AC (random)
[00:00:06.944,152] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.4 (0x0d) revision 0x118f, manufacturer 0x0059
[00:00:06.944,183] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.4 (0x0d) subver 0x118f
Bluetooth initialized
Advertising started
[00:00:06.946,380] <err> MCP7940N: read_time: RC = 0

localtime_buff = Thu 2024-08-29 19:27:49
[00:00:07.946,685] <err> MCP7940N: read_time: RC = -5

[00:00:07.946,685] <err> adc_module: sec_timer_handler: Failed to read time, error: 251

[00:00:08.000,549] <err> os: mem_manage_fault: ***** MPU FAULT *****
[00:00:08.000,549] <err> os: mem_manage_fault:   Data Access Violation
[00:00:08.000,579] <err> os: mem_manage_fault:   MMFAR Address: 0x0
[00:00:08.000,579] <err> os: esf_dump: r0/a1:  0x20002bb0  r1/a2:  0x00000000  r2/a3:  0x00000000
[00:00:08.000,610] <err> os: esf_dump: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x0002130b
[00:00:08.000,610] <err> os: esf_dump:  xpsr:  0x21000221
[00:00:08.000,640] <err> os: esf_dump: Faulting instruction address (r15/pc): 0x000211a2
[00:00:08.000,671] <err> os: z_fatal_error: >>> ZEPHYR FATAL ERROR 19: Unknown error on CPU 0
[00:00:08.000,671] <err> os: z_fatal_error: Fault during interrupt handling

[00:00:08.000,732] <err> os: z_fatal_error: Current thread: 0x20001a78 (unknown)
[00:00:08.439,880] <err> fatal_error: k_sys_fatal_error_handler: Resetting system


 

Related