Thread CLI not working in BC840DK

Hi I am testing the Thread examples

I worked on SIMPLE_COAP_EXAMPLE in nrf52840 DK there it works fine while opening UART and enter to CLI commands and its working

but i have implement same code to the board BC840DK where the uart pins are P1.01,P1.02 (RX,TX)

I can doubt that due to uart pin change the cli doesn't work for bc840dk but i don't know where to config the cli uart lines

Parents
  • Hi,

    The UART pins are hardcoded in the OpenThread libraries. To change the UART pins, you need to rebuild the libraries according to the instructions in Building the latest OpenThread libraries.

    The pins must be configured in transport-config.h.

    Best regards,
    Jørgen

  • Hi,

    For nRF5 SDK for T&Z v4.0.0, the UART pin config is located in the file platform-config.h.

    The libraries needs to be recompiled for each board unfortunately, it is not possible to configure UART pins in the board headers in nRF5 SDK. For nRF Connect SDK, the OpenThread source files are (if configured) built for each project, which means that it can get the UART pin config directly from the build/configuration system.

    Best regards,
    Jørgen

  • I worked on DCDC

    int main(int argc, char *argv[])
    {
        log_init();
        scheduler_init();
        timer_init();
        /* LOW POWER SETUP */
        int err_code = sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
        APP_ERROR_CHECK(err_code);
    
        err_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
        APP_ERROR_CHECK(err_code);
    
        thread_instance_init();
        thread_coap_init();
        thread_bsp_init();
       
    
        while (true)
        {
            thread_process();
            app_sched_execute();
    
            if (NRF_LOG_PROCESS() == false)
            {
                thread_sleep();
            }
        }
    }

    got error

    Building ‘thread_mtd_coap_client_pca10056’ from solution ‘thread_mtd_coap_client_pca10056’ in configuration ‘Release’
      Compiling ‘main.c’
        implicit declaration of function 'sd_power_mode_set' [-Wimplicit-function-declaration]
        'NRF_POWER_MODE_LOWPWR' undeclared (first use in this function)
        each undeclared identifier is reported only once for each function it appears in
        implicit declaration of function 'sd_power_dcdc_mode_set' [-Wimplicit-function-declaration]
        'NRF_POWER_DCDC_ENABLE' undeclared (first use in this function); did you mean 'NRF_PWR_MGMT_ENABLED'?
    Build failed

  • By default, this example does not use a softdevice.

    Try writing directly to the register in start of main instead:

    NRF_POWER->DCDCEN = 1;

  • Hi Jorgen

    I tried

    NRF_POWER->DCDCEN = 1;
    NRF_POWER->DCDCEN0 = 1;

    in FTD Thread coAP example but

    power it still 11.67mA.

    I understand this ticket not cover this but this is my last query .

    1. How to access low power using register access

     /* LOW POWER SETUP */
        int err_code = sd_power_mode_set(NRF_POWER_MODE_LOWPWR);
        APP_ERROR_CHECK(err_code);

        err_code = sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
        APP_ERROR_CHECK(err_code);

    2. Is there any examples or documentation that how to use or build full project using registers Like (accessing clock, RTC, TWI,SPI,UART,LED Peripherals IO)

    3. I have gone through MTD CoAP example . my understand is it will work only as child . it will not be router or leader any more. and it will not do auto commissioning . if so how to commission the device to set it as child or leader or router.

    4. If device is leader or router then it will consume more power?

  • 1. the proposal from Jørgen is how to enable dcdc using registry access. can you try to read out the register value using a debugger to chek if it was set successfully? I assume you have the required components to enable dcdc?

    2. The nRF5 SDK has separate examples for each peripheral that you could merge with the thread examples.

    3. Please refere to the Thread commissioning documentation

    4. Yes, it will.

Reply Children
Related