This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

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 Reply Children
  • Thank you Jorgen,

      I will workout on this MTD CoAP client .

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

Related