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

PRESCALAR register in nRF52840 DK

A newbie here. I am studying the simple_timer application in the nRF5_SDK_17.0.0_9d13099 library.

The sample application sets the clock frequency to the timer at 16MHz. This is done by writing to the PRESCALAR register as can be seen in nrf_timer.h file. ( inline function nrf_timer_frequency_set at line 648). When I check the details of the PRESCALAR register in the production specifications ( nRF52840_PS_v1.1.pdf) file, page 465 gives no detials of the PRESCALAR register. 

The nRF52840_PS_v1.1.pdf document seems to be build upon some other document. If I am right, can someone point that to me.

Parents
  • A prescaler is usually a cascaded division by 2, where the prescaler value is the number of times the original clock frequency has been divided by 2. 

    Prescaled frequency = Original frequency / 2^PRESCALER

  • Dear Haakonsh,

    Thanks for your reply. However it is only the part reply to the information I am looking for.

    1) It seems that PRESCALAR registers also selects the frequency clock to the timer; Am I right in assuming this. If yes then where can I find this information in the product specification document.

    2) If PRESCALAR register only sets the prescalar and not the clock frequency, can you please tell me how is a clock source selected for a given timer.

    I get a feeling that nRF52840_PS_v1.1.pdf document is build upon another document. ( Just get a feeling there is more to it). Can you please dispel my doubts?

Reply
  • Dear Haakonsh,

    Thanks for your reply. However it is only the part reply to the information I am looking for.

    1) It seems that PRESCALAR registers also selects the frequency clock to the timer; Am I right in assuming this. If yes then where can I find this information in the product specification document.

    2) If PRESCALAR register only sets the prescalar and not the clock frequency, can you please tell me how is a clock source selected for a given timer.

    I get a feeling that nRF52840_PS_v1.1.pdf document is build upon another document. ( Just get a feeling there is more to it). Can you please dispel my doubts?

Children
Related