Peripherals Tool: FTM Prescale Value missing In CLOCK_SOURCE macro

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Peripherals Tool: FTM Prescale Value missing In CLOCK_SOURCE macro

1,310件の閲覧回数
steve_n
Contributor II

I was using the new Peripheral tools in MCUXpresso IDE v10.1.0 [Build 589] [2017-11-14] to set up a periodic interrupt using the FTM on a MK66F18 chip.

If I set the prescale value to anything other than 1, the periodic interrupt is incorrect, by exactly the ratio of the prescalar.

The generated code is apparently missing the division of the clock by the prescale value. In peripherals.h:

#define FTM_PERIPHERAL_NAME_CLOCK_SOURCE CLOCK_GetFreq(kCLOCK_BusClk)

I believe needs to be something like:

#define FTM_PERIPHERAL_NAME_CLOCK_SOURCE (CLOCK_GetFreq(kCLOCK_BusClk) /  PRESCALE_VAL)

0 件の賞賛
返信
1 返信

1,113件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Stephen Noonan,

Thanks for highlighting this , I will report it to MUXpressso config tool expert team.

And now the workaround is adding the prescale value by hand like :

pastedImage_1.png

Hope it helps

BR

Alice

0 件の賞賛
返信