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

Need help to Initialize the below mentioned API

I need to call the API: clock_control_on( const struct device *dev, clock_control_subsys_t sys)
located at the SDK path ncs\v1.6.1\zephyr\drivers\clock_control.
Can you kindly help me on how i need to initialize the API arguments *dev and sys..?
How can i call this particular API so that my LFCLK/HFCLK is turned ON..?
Parents Reply
  • Hi,

    The following code can be used to retreive the device struct for clock:

    	const struct device *clock;
    	
    	clock = device_get_binding("CLOCK");
    	if (clock == NULL) {
    		printk("Clock device not found\n\r");
    	}

    But like mentioned earlier, the clock control driver is already being invoked by the system on startup, and I'm honestly not sure if it it supports multiple users - that is something I need to look into. Could you let me know what you are trying achieve with this?

Children
No Data
Related