How to set Tick to 1ms in FreeRTOS

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
10 posts / 0 new
Last post
xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
How to set Tick to 1ms in FreeRTOS

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?

Device: 
PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi xuguodong,

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

xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
Hi Dialog,

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?

xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
Hi Dialog,

Hi Dialog,

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

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi xuguodong,

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

xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
Hi Dialog,

Hi Dialog,

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

Pls help me.

xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
Hi Dialog,

Hi Dialog,

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

Pls help me.

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi xuguodong,

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

xuguodong
Offline
Last seen: 3 months 4 weeks ago
Joined: 2020-06-04 13:34
Hi Dialog,

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.

PM_Dialog
Offline
Last seen: 2 months 2 weeks ago
Staff
Joined: 2018-02-08 11:03
Hi xuguodong,

Hi xuguodong,

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

Thanks, PM_Dialog