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

[SoftDevice] Is there any limitation to call sd_clock_hfclk_release, when ADC

Hi,

I run ADC mudule together with SD, but go into hardfault eatch when I release the HF-clock.

Chip: 51822 SDK : 10.0-alpha IDE : Keil-472

image description

I use this function to request the high frequence clock for ADC, befer the convertation

__INLINE void request_HFCLK_4_ADC ( void ) {
    uint32_t p_is_running = 0;
    
    sd_clock_hfclk_request();
    while(! p_is_running) {  							//wait for the hfclk to be available
        sd_clock_hfclk_is_running((&p_is_running));
    }
}

Then call

__INLINE void release_HFCLK_4_ADC ( void ) {
    //sd_clock_hfclk_release();
}

when ADC complete.

But the release funcion will always cause an hardfaul.

I wonder is there some limitition to use this API?

Thanks,

Parents Reply Children
No Data
Related