POFCON configuration causing hard fault in SDK 17.1.0 with nrf52832

Hi! 

I'm migrating some code from an 14.2.0 SDK to the 17.1.0 SDK and cleaning up a big mess. 

Whenever I call nrf_power_pofcon_set(true, NRF_POWER_POFTHR_V27) with either true or false, I get a hard fault. 
I read the docs, and I see HFCLK needs to be on. I enable it like this at wake up 

    nrf_drv_clock_init();
    nrf_drv_clock_hfclk_request(NULL);
    while (!nrf_drv_clock_hfclk_is_running())
    {
    } 

I confirm HFHCLK is running with SRC RC and STATE = 1 (running)
However when I try to call nrf_power_pofcon_set I am getting a hard fault. 

I also printed these to RTT for a sanity check

<info> app: NRFX_CLOCK_ENABLED: 1
<info> app: NRFX_POWER_CLOCK_ENABLED: 1
<info> app: NRF_POWER_HAS_POFCON: 1
<info> app: NRF_POWER_HAS_VDDH: 0
<info> app: POWER_POFCON_THRESHOLD_Msk: 30

I have burned quite a few hours on this so any tips are appreciated. Thanks!

Parents Reply Children
No Data
Related