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

Problem in using both clock source (High frequency and low frequency).

Hello ,

I am having nrf52832 custom board. 

In my project i need to use both CLOCK source ( Low frequency clock and High frequency clock source ).

Timer running on high frequency but when i call below function then it's reflect fatal error. 

so, their is any problem if i use both clock source in application?

static void lfclk_config(void)

{
ret_code_t err_code = nrf_drv_clock_init();
APP_ERROR_CHECK(err_code);

nrf_drv_clock_lfclk_request(NULL);
}

Thank you,

vivek machchhar

Parents
  • Hello Vivek Machchhar,

    Timer running on high frequency but when i call below function then it's reflect fatal error. 

    Could you verify that you have DEBUG defined in your preprocessor defines?
    It should look like the included image:

    Having DEBUG defined will provide a more complete error message, and which function that caused it.
    Please run the program again with this defined, and let me know which error was generated and from what function it was returned.

    Best regards,
    Karl

  • Hello karl,

    In debugging  i find ERROR code 133 that is  NRF_ERROR_MODULE_ALREADY_INITIALIZED from function nrf_drv_clock_init();.

    but in previews don't use low frequency clock. so, why i facing this error.

    Thank you,

    vivek machchhar 

  • Hello again Vivek Machchhar,

    vivek machchhar said:
    In debugging  i find ERROR code 133 that is  NRF_ERROR_MODULE_ALREADY_INITIALIZED from function nrf_drv_clock_init();.

    This tells us that the clock module is already initialized. 
    Alternatively you can use the nrf_drv_clock_init_check function to check whether the module is already initialized. 

    vivek machchhar said:
    but in previews don't use low frequency clock. so, why i facing this error.

    What do you mean by "in previews dont use low frequency clock"?
    This error comes from the clock module already being initialized. I am guessing that you are already doing this elsewhere in your project.

    Best regards,
    Karl

Reply
  • Hello again Vivek Machchhar,

    vivek machchhar said:
    In debugging  i find ERROR code 133 that is  NRF_ERROR_MODULE_ALREADY_INITIALIZED from function nrf_drv_clock_init();.

    This tells us that the clock module is already initialized. 
    Alternatively you can use the nrf_drv_clock_init_check function to check whether the module is already initialized. 

    vivek machchhar said:
    but in previews don't use low frequency clock. so, why i facing this error.

    What do you mean by "in previews dont use low frequency clock"?
    This error comes from the clock module already being initialized. I am guessing that you are already doing this elsewhere in your project.

    Best regards,
    Karl

Children
Related