Zephyr Project Startup Hardfault using the Matter LightBulb example.

I have been attempting to load a board we manufactured with the Matter Lightbulb example. The code loads and starts to function but I immediately get the following Hard fault.

Some background. This board is simply the nrf52840, with the same LEDs and two of the buttons form the nrf52840-DK board. 
We do not have the 32Khz crystal (which was a problem for me initially to get the code to start). Has anyone seen the code simply fail like this? Any thoughts on why the code would start up and then fault like this. I had single stepped through most of the init function for the main class, so I know it is executing code.

Are there specific hardware requirements when using matter? For example, is it 100% necessary that the design has the 32Khz crystal attached?  Does the device need to use the switching power supplies? 

Thanks for any advice. I realize this question is hard to answer. 

Parents
  • Hello,

    I had single stepped through most of the init function for the main class, so I know it is executing code.

    Does this hardfault trigger at a particular line of code during the initialization? If so, where?

    This board is simply the nrf52840, with the same LEDs and two of the buttons form the nrf52840-DK board. 
    We do not have the 32Khz crystal (which was a problem for me initially to get the code to start). Has anyone seen the code simply fail like this?

    Are you able to successfully run other examples from the SDK on your board, such as the hello_world from Zephyr (to verify that your toolchain and debugger is functioning as it should), or any of the BLE applications (to verify that the rest of your hardware is functioning as expected)?

    This board is simply the nrf52840, with the same LEDs and two of the buttons form the nrf52840-DK board. 

    Have you made your own board files for this board, and used this instead of the nRF52840 DK board files as the build target for the Matter lightbulb application?

    Best regards,
    Karl

  • I got the application running. I added the following to prj_no_dfu.conf (sanity modification)

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_LOW_SWING=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_FULL_SWING=n

    This fixed part of the problem.
    The other problem was due to a poorly attached 32Mhz crystal. Seems this causes a fault. Go figure.
    I found this out by walking all the way back to the esb_ptx project , just to see if our radio worked at all, and immediately the program locked up waiting for the high frequency clock to start.

    So, if you are having issues like mine, run a small test program to test your high frequency clock AND if you don't have crystal in your design remember to use an alternate low frequency source of K32SRC_RC. 

Reply
  • I got the application running. I added the following to prj_no_dfu.conf (sanity modification)

    CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_SYNTH=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_LOW_SWING=n
    CONFIG_CLOCK_CONTROL_NRF_K32SRC_EXT_FULL_SWING=n

    This fixed part of the problem.
    The other problem was due to a poorly attached 32Mhz crystal. Seems this causes a fault. Go figure.
    I found this out by walking all the way back to the esb_ptx project , just to see if our radio worked at all, and immediately the program locked up waiting for the high frequency clock to start.

    So, if you are having issues like mine, run a small test program to test your high frequency clock AND if you don't have crystal in your design remember to use an alternate low frequency source of K32SRC_RC. 

Children
No Data
Related