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?

  • 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]
        

  • Hi,

    Thank you for filling out an answer to these items

    PiKa PiKa said:
    I used nRF52840DK fot board target

    I suspect this is the issue. Are you using any overlay files to compensate for any changes in the 52840DK board file and your custom board?

    PiKa PiKa said:

    I have used peripheral_uart BLE sample, It didn't work at the beginning until I commented out configure_gpio()

    This is most likely due to your configuration being different on your custom board than it is on the 52840dk. This sample sets the LEDS up towards the GPIO's connected to the LEDs on the DK 

    PiKa PiKa said:
    I try to run the debugger, and found it stop on bootup,as the log below 

    I don't think this is the issue since you said the peripheral_uart sample worked for your custom board after commenting out the GPIO configuring function, but just as a sanity check: You have an oscillator on your custom board, right?

    Kind regards,
    Andreas

  • I don't think this is the issue since you said the peripheral_uart sample worked for your custom board after commenting out the GPIO configuring function, but just as a sanity check: You have an oscillator on your custom board, right?

    Yes, there is an oscillator on my custom board

  • Noted, then I would recommend if you look closer into where the Matter sample expects the Buttons and LEDs are connected w.r.t the differences in the pin configuration in your board and on for instance the nRF52840DK.

    A second thought is that there might be something that stops the boot procedure due to initialization failing (just speculating) during bootup. It could indicate that there's something to do with buttons and/or LEDs initialization so it might be worth investigating from your end as well.

    Kind regards,
    Andreas

Related