This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

icm42605 example has an error.

Hi, 

I'm trying to use examples.
The ICM42605 example does not work.


 I get the following errors.

[00:00:00.257,354] <err> os: ***** MPU FAULT *****

[00:00:00.257,446] <err> os:   Data Access Violation

[00:00:00.257,446] <err> os:   MMFAR Address: 0xd28

[00:00:00.257,476] <err> os: r0/a1:  0x2000190c  r1/a2:  0x00000d20  r2/a3:  0xf01369f7

[00:00:00.257,507] <err> os: r3/a4:  0x00000d20 r12/ip:  0x00000000 r14/lr:  0x00012b39

[00:00:00.257,507] <err> os:  xpsr:  0xa1000000

[00:00:00.257,537] <err> os: Faulting instruction address (r15/pc): 0x00012b56

[00:00:00.257,537] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0

[00:00:00.257,568] <err> os: Current thread: 0x20000ee0 (unknown)

[00:00:01.295,135] <err> os: Halting system

There seems to be an error in the code below.

It was tested with nRF52832.

Thanks in advance.

Parents Reply Children
  • noseed said:
    ICM42605-EVM board.

    Unfortunately, I don't have a ICM42605, so I can't reproduce it here.

     You can use arm-none-eabi-addr2line -e build/zephyr/zephyr.elf 0xFAULTING_ADDR to see if it gives a hint on where in your src the fault occurred.

    addr2line -e zephyr.elf 0x00012b56

    Since this sample is a upstream Zephyr sample, have you tried asking in the zephyr discord?

    https://docs.zephyrproject.org/latest/getting_started/index.html#asking-for-help

  • Hi, 

    $ arm-none-eabi-addr2line -e build_nrf52dk_nrf52832/zephyr/zephyr.elf 0xd00
    C:/work/ncs/v1.9.1/zephyr/include/drivers/sensor.h:661

    /**
     * @brief Helper function for converting struct sensor_value to double.
     *
     * @param val A pointer to a sensor_value struct.
     * @return The converted value.
     */
    static inline double sensor_value_to_double(const struct sensor_value *val)
    {
    	return (double)val->val1 + (double)val->val2 / 1000000;
    }

    I gave up using the sensor driver.
    I'll implement it with SPI.


    Thank you for your advice.

Related