Skip to main content

How to set Tick to 1ms in FreeRTOS

6 months ago

How to set Tick to 1ms in FreeRTOS

Posted byxuguodong0 points 9 replies
0 upvotes

Hi Dialog,

1.

We didn't find out how to set the value of SystemCoreClock.
Eg. extern uint32_t SystemCoreClock;

I want to set Tick to 1ms in FreeRTOS. Please help me ?

2.

Our external oscillators are 32.768MHz and 16MHz. the maximum frequency of DA14683 is 96MHz.

But What is the actual frequency of system?

6 months ago

PM_Dialog

Hi xuguodong,

Why do you need to change the OS tick?

The chip is running with the 16MHz in active mode and with the 32.768MHz ins sleep mode, which is the Low Power Clock.

Thanks, PM_Dialog

6 months ago

xuguodong 0 points

Hi Dialog,

I know that 6MHz and 32.768MHz are external active oscillators.

My issue is as follow:

What is the actual working clock frequency of DA14683 in software code?

6 months ago

xuguodong 0 points

Hi Dialog,

Our external oscillators are 32.768MHz and 16MHz. How to enable the maximum frequency(96MHz) of DA14683?

6 months ago

PM_Dialog

Hi xuguodong,

The cm_sys_clk_init() should be used in order to initialize clocks after power-up. It takes as an input parameter the clock source to be used as the system clock.

Thanks, PM_Dialog

6 months ago

xuguodong 0 points

Hi Dialog,

Only the declaration of this function was found, no implementation.

请帮助我。

6 months ago

xuguodong 0 points

Hi Dialog,

Only the declaration of this function was found, no implementation.

请帮助我。

6 months ago

PM_Dialog

Hi xuguodong,

It can be found in sys_clock_mgr.c of the SDK. I’d recommend just using the cm_sys_clk_init() and prevent modifying the source code.

Thanks, PM_Dialog

6 months ago

xuguodong 0 points

Hi Dialog,

How to use cm_sys_clk_init? can you give me example code?

I only set working frequency of cpu to 96MHz.

Thanks.

5 months ago

PM_Dialog

Hi xuguodong,

Please take a look at any of the SDK1 examples : in the system_init() there is the clock initialization.

Thanks, PM_Dialog