AUTOSAR OS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
5,495件の閲覧回数
liuruowen
Contributor I

I use the sample project under this path(C:\NXP\AUTOSAR\S32K_AUTOSAR_OS_4_0_98_RTM_1_0_0\sample),so i have one question:

A SYSTEMTIMER counter is used in OsCounter in AUTOSAR OS,how to calculate the time of one tick?(This counter uses FTM0,what is the clock source of FTM0?)

What does the OsCounterTicksPerBase parameter do?

 

0 件の賞賛
返信
1 解決策
5,472件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello,

FTM ticks can be calculated as below:

FTM ticks = Prescaler / Input Frequency.

While Prescaler can be chosen in EB tresos:

FTM1.JPG

Prescaler = 2^(OsValue), e.g. OsValue= 2 => Prescaler = 2^2 = 4.

FTM input Frequency is pretty much depended on SystemInit, in the sample application, FTM input Frequency is FIRC: 48MHz.

OsCounterTicksPerBase is implementation specific and as I know, not used in this package.

Best Regards,

Nam

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
5,473件の閲覧回数
namnguyenviet
NXP Employee
NXP Employee

Hello,

FTM ticks can be calculated as below:

FTM ticks = Prescaler / Input Frequency.

While Prescaler can be chosen in EB tresos:

FTM1.JPG

Prescaler = 2^(OsValue), e.g. OsValue= 2 => Prescaler = 2^2 = 4.

FTM input Frequency is pretty much depended on SystemInit, in the sample application, FTM input Frequency is FIRC: 48MHz.

OsCounterTicksPerBase is implementation specific and as I know, not used in this package.

Best Regards,

Nam

0 件の賞賛
返信
5,071件の閲覧回数
icypistol
Contributor I

Thanks for your information.

Regarding your description of "FTM input Frequency is pretty much depended on SystemInit...", do you mean that, in this example, FTM0 input Frequency depends on the configuration for FTM0 in MCU Peripheral Clock Frequency?

By the way, it seems only FTM can be used as SystemTimer in HWCOUNTER. Does it means, the System Tick can not serve as the SystemTimer source in NXP Autosar OS? Thanks!

0 件の賞賛
返信
5,060件の閲覧回数
nxf31947
NXP Employee
NXP Employee

Regarding your description of "FTM input Frequency is pretty much depended on SystemInit...", do you mean that, in this example, FTM0 input Frequency depends on the configuration for FTM0 in MCU Peripheral Clock Frequency?

-> Yes, it will depends on SDK configuration

By the way, it seems only FTM can be used as SystemTimer in HWCOUNTER. Does it means, the System Tick can not serve as the SystemTimer source in NXP Autosar OS? Thanks!
-> choose System timer as SWCOUNTER and System Tick can serve as the SystemTimer 
Because SysTick doesn't support as Hardware counter

 
 
 
 
0 件の賞賛
返信
5,290件の閲覧回数
nxf31947
NXP Employee
NXP Employee

Actually, you can config tick duration( in nanoseconds ) like the picture below:

nxf31947_0-1611818696866.png

Sysgen will help you calculate clock divider value automatically
Check the generated output folder and you can see the define OSTICKDURATION 

0 件の賞賛
返信