Hi,
On nRF52811 I use simple ESB radio for TX. Before TX I turn Clock for radio on like in the example:
int clocks_start(void) { int err; int res; struct onoff_manager *clk_mgr; struct onoff_client clk_cli; clk_mgr = z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF); if (!clk_mgr) { return -ENXIO; } sys_notify_init_spinwait(&clk_cli.notify); err = onoff_request(clk_mgr, &clk_cli); if (err < 0) { return err; } do { err = sys_notify_fetch_result(&clk_cli.notify, &res); if (!err && res) { return res; } } while (err); return 0; }
After TX is done, I want to turn this clock OFF. I assume at least that I have to do it - because after the TX I want to go to sleep mode with the lowest possible consumption. Now After TX is done, the CPU has nothing to do and the consumption is about 400 uA, when I do not turn the HF clock to ON the power consumption falls down about to 7 uA.
How to turn the clock off? Or something else I need to do?
P.S. Where I can find this kind of information? I am used to work with STM32 - Go to datasheet - find register and coresponding bit, then look in to HAL or LL lib and I am looking for the fuctions which works with this bit it - then I can easily find the function to be called. But in Nordic SDK I am lost.. How do you do that?
Thank you very much