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

App Timer tutorial, nrf_drv_clock_lfclk_request

I am debugging a small program for the nRF52, which uses the App Timer and communicates over UART. I am trying to keep up with bug fixes, and so I'm using SDK 11.0.

The UART works fine, my program prints a greeting in the first few lines of main(). But I don't seem to be setting up timer interrupts correctly, since the printing that is supposed to occur at each timer tick (every 5 seconds), in my timer handler function, is not taking place.

In order to get my program to compile at all, I had to write the LFCLK request in my timer configuration function as follows:

nrf_drv_clock_lfclk_request(false);

I copied that from an example somewhere, I'm not sure exactly where.

However, the App Timer tutorial shows that nrf_drv_clock_lfclk_request takes NO arguments. The function definition that I'm seeing wants a pointer to a nrf_drv_clock_handler_item_t.

I have to wonder why this discrepancy exists. It might be because the tutorial isn't written for SDK 11.0, but I don't know for sure. I also wonder whether my code in fact fails to start the LFCLK.

I will post my complete program if it helps. I thought that I would start with the first discrepancy I found before dumping 100 lines of code to the forums. Thanks for your help.

Parents Reply Children
Related