Matter application on nrf52840 custom board

hi 

board : nrf52840 custom board

sdk : nrf connect sdk v2.6.1

example: matter light bulb

problem:

After the code is burned in, the system not working, I have modified and added the following config in the prj.conf file

//added
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=n
CONFIG_BOARD_ENABLE_DCDC=n
//modify
CONFIG_DK_LIBRARY=n

What settings do I need to modify to run the matter blub sample on the custom board?

Parents
  • Hi,

    To be able to help you at all you need to provide more information about the issues you're having. For instance the following is helpful

    1. Have you had your custom board through a hardware review? Did you get any comments on the design?
    2. Is your custom board layout different than the nRF52840DK board files? See https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/ about custom board support.
      1. If so, have you made any modifications? 
    3. What board target are you building your firmware for? Is it the nRF52840DK or is it your custom board?
    4. Does any other firmware work on your custom board? Are you for instance able to run the hello_world sample in nRF Connect SDK or the peripheral_uart BLE sample?
    5. Do you have any device logs? If not, please look into providing them and see where your device crashes through https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/ 
      1. Where does your device? Is it before bootup, during boot, or within the application?

    Please comment on all of the above and I'll get back to you

    Kind regards,
    Andreas

  • Hi

    1. Have you had your custom board through a hardware review? Did you get any comments on the design?

      No

    2. Is your custom board layout different than the nRF52840DK board files? See https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/ about custom board support.
      1. If so, have you made any modifications? 

        my custom board layout is different from nRF52840DK, The difference is just to pull out a few GPIOs for control(p0.22,p0.23,p0.24,p0.25).

    3. What board target are you building your firmware for? Is it the nRF52840DK or is it your custom board?

      I used nRF52840DK fot board target

    4. Does any other firmware work on your custom board? Are you for instance able to run the hello_world sample in nRF Connect SDK or the peripheral_uart BLE sample?

      I have used peripheral_uart BLE sample, It didn't work at the beginning until I commented out configure_gpio()
      static void configure_gpio(void)
      {
      	int err;
      
      #ifdef CONFIG_BT_NUS_SECURITY_ENABLED
      	err = dk_buttons_init(button_changed);
      	if (err) {
      		LOG_ERR("Cannot init buttons (err: %d)", err);
      	}
      #endif /* CONFIG_BT_NUS_SECURITY_ENABLED */
      
      	err = dk_leds_init();
      	if (err) {
      		LOG_ERR("Cannot init LEDs (err: %d)", err);
      	}
      }


      so in matter light blub sample I try to modify the 
      CONFIG_DK_LIBRARY to n but it didn't work.
    5. Do you have any device logs? If not, please look into providing them and see where your device crashes through https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-2-debugging/ 
      1. Where does your device? Is it before bootup, during boot, or within the application?

        I try to run the debugger, and found it stop on bootup,as the log below 
        JLinkGDBServerCL: SEGGER J-Link GDB Server V7.94i Command Line Version
        JLinkGDBServerCL: 
        JLinkGDBServerCL: JLinkARM.dll V7.94i (DLL compiled Feb  7 2024 17:08:52)
        JLinkGDBServerCL: 
        JLinkGDBServerCL: -----GDB Server start settings-----
        JLinkGDBServerCL: GDBInit file:                  none
        JLinkGDBServerCL: GDB Server Listening port:     53144
        JLinkGDBServerCL: SWO raw output listening port: 2332
        JLinkGDBServerCL: Terminal I/O port:             2333
        JLinkGDBServerCL: Accept remote connection:      localhost only
        JLinkGDBServerCL: Generate logfile:              off
        JLinkGDBServerCL: Verify download:               off
        JLinkGDBServerCL: Init regs on start:            off
        JLinkGDBServerCL: Silent mode:                   on
        JLinkGDBServerCL: Single run mode:               on
        JLinkGDBServerCL: Target connection timeout:     0 ms
        JLinkGDBServerCL: ------J-Link related settings------
        JLinkGDBServerCL: J-Link Host interface:         USB
        JLinkGDBServerCL: J-Link script:                 none
        JLinkGDBServerCL: J-Link settings file:          none
        JLinkGDBServerCL: ------Target related settings------
        JLinkGDBServerCL: Target device:                 nRF52840_xxAA
        JLinkGDBServerCL: Target device parameters:      none
        JLinkGDBServerCL: Target interface:              SWD
        JLinkGDBServerCL: Target interface speed:        12000kHz
        JLinkGDBServerCL: Target endian:                 little
        JLinkGDBServerCL: 
        =thread-group-added,id="i1"
        =cmd-param-changed,param="pagination",value="off"
        context_boot_go (state=state@entry=0x200014ac <boot_data>, rsp=rsp@entry=0x200047d4 <z_main_stack-149292>) at C:/ncs/v2.6.1/bootloader/mcuboot/boot/bootutil/src/loader.c:2324
        2324	                FIH_PANIC;
        [New Thread 1409331537]
        

  • Good catch, yes I do believe it is an issue with initialization of the flash configuration or driver. I suspect this happens if you either don't power the external flash if the device is unknown for the bootloader. 

    Next steps I would suggest you look into is if you're able to access the external flash from a simpler sample than the Matter Light Bulb. If the issue persists with this, then we need to look into if your external flash device is properly set up in hardware and software

    Kind regards,
    Andreas

  • Hi
    Is external flash necessary to use the matter sample?
    if yes ,then I think the problem may be that my custom board does not have external flash.
    That is to say, there is no way to use matter-related examples without external flash, right?

  • Yes, unfortunately (for the device you're using) it is necessary. In Matter, dual bank DFU is a mandatory feature, and unfortunately both the nRF52840 and nRF5340 has too little flash available to do this without an external flash device.

    If you have either a device with enough internal flash you can away with not having an external flash device, but unfortunally all the supported as of now requires an external flash. Here's a link to the memory requirements for some standard Matter applications. Also have a look at the section regarding "External flash": https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/getting_started/hw_requirements.html 

    Kind regards,
    Andreas

  • Hi
    If the nrf52840 module we choose has built-in large-capacity flash,
    Is there any way to use matter application?

  • Hi,

    Unfortunately we don't have an overview over an third party modules based on the nRF52840 which might be suited. You would have to reach out to your regional sales manager and/or a your SoC/Module distributor for any input w.r.t any suited third party modules that might be useful. Make sure that you choose a nRF52840 module which meets the criteria w.r.t external flash in the link I sent in my previous contact and let me know if you need the contact information for your Nordic regional sales manager in your area and I'll forward it to you

    Kind regards,
    Andreas

Reply
  • Hi,

    Unfortunately we don't have an overview over an third party modules based on the nRF52840 which might be suited. You would have to reach out to your regional sales manager and/or a your SoC/Module distributor for any input w.r.t any suited third party modules that might be useful. Make sure that you choose a nRF52840 module which meets the criteria w.r.t external flash in the link I sent in my previous contact and let me know if you need the contact information for your Nordic regional sales manager in your area and I'll forward it to you

    Kind regards,
    Andreas

Children
No Data
Related