Skip to main content
Wassim Ben Chikha
Associate III
November 13, 2017
Question

Values of RTIMER_ARCH_SECOND for frequencies rather than 32MHz, such as; 24MHz, 16MHz and 12MHz

  • November 13, 2017
  • 3 replies
  • 793 views
Posted on November 13, 2017 at 15:04

Hello all,

Using

STM32L1XX_NUCLEO

with

F_CPU

equal to

32

MHz

,

the

RTIMER_ARCH_SECOND

is

defined as

32768 in the file platform-conf.h.

Please,

what are

the value

s

of

RTIMER_ARCH_SECOND

for frequenc

ies

rather than 32MHz,

such as;

24MHz, 16MHz and 12MHz?

M

any thanks for your time and look forward for your response.

B

est regards,

Wassim

    This topic has been closed for replies.

    3 replies

    Uwe Bonnes
    Chief
    November 13, 2017
    Posted on November 13, 2017 at 15:32

    32768

    seems related to the RTC quarz.
    Tesla DeLorean
    Guru
    November 13, 2017
    Posted on November 13, 2017 at 15:58

    It's really a Contiki OS thing, are you sure they are even directly related? Or just a fractional representation of another clock?

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Wassim Ben Chikha
    Associate III
    November 13, 2017
    Posted on November 13, 2017 at 16:18

    As seen in the following link, the RTIMER_ARCH_SECOND is given by F_CPU/RTIMER_ARCH_PRESCALER, where RTIMER_ARCH_PRESCALER is eqaul to 1024.

    http://contiki.sourceforge.net/docs/2.6/a00792_source.html

     

    However, in the file /Middlewares/ST/Contiki_STM32_Library/Incplatform-conf.h, RTIMER_ARCH_SECOND is defined as: #define RTIMER_ARCH_SECOND 32768 for STM32L1XX_NUCLEO using F_CPU=32MHz and defined as: #define RTIMER_ARCH_SECOND 96000 for STM32F4XX_NUCLEO using F_CPU=84MHz. Hence, I am not sure if they are  directly related or not.