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

FreeRTOS with NRFX: clock

Dear all:

I want to implement FreeRTOS using NRFX, I checked the example and discovered that it uses the nrf_drv_clock... and thus it becomes a spaghetti with this legacy and new libraries... 

My question is the following:

would you recommend keeping old nrf drv clock or should i try to migrate all to nrfx... ? 

are there any available FreeRTOS examples that dont use this clock files? 

What would you suggest?

Regards

Parents
  • Hi,

    would you recommend keeping old nrf drv clock or should i try to migrate all to nrfx... ? 

    I recommend keeping nrf_drv_clock. In most cases the nrf_drv API just uses the nrfx drivers via preprocessor defines, so you end up with exactly the same code. This is not the case with nrf_drv_clock though, as it handles the SoftDevice, which controls the clock when it is in use. So you should think of nrf_drv_clock as a higher level than nrfx_clock. If you will be using the SoftDevice, then using nrf_drv_clock is the way to go. (Alternatively you will quickly just end up re-implementing it yourself which is probably not time well spent).

    are there any available FreeRTOS examples that dont use this clock files? 

    No (for the reason explained above).

    Einar

     

Reply
  • Hi,

    would you recommend keeping old nrf drv clock or should i try to migrate all to nrfx... ? 

    I recommend keeping nrf_drv_clock. In most cases the nrf_drv API just uses the nrfx drivers via preprocessor defines, so you end up with exactly the same code. This is not the case with nrf_drv_clock though, as it handles the SoftDevice, which controls the clock when it is in use. So you should think of nrf_drv_clock as a higher level than nrfx_clock. If you will be using the SoftDevice, then using nrf_drv_clock is the way to go. (Alternatively you will quickly just end up re-implementing it yourself which is probably not time well spent).

    are there any available FreeRTOS examples that dont use this clock files? 

    No (for the reason explained above).

    Einar

     

Children
Related