How to operate i.MX28 TIMROT timer in duty cycle mode?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to operate i.MX28 TIMROT timer in duty cycle mode?

859 次查看
sidebranch
Contributor II

Hello,

I would like to use the TIMROT v2 module TIMER3 in duty cycle measurement mode.

As a first test, I just want to measure the duty cycle of the 32 kHz crystal clock.

As the clock tick input, I select TICK_ALWAYS (0xF)

As the test input, I select the 32 kHz crystal clock (0xB)

root@imx28evk:~# devmem2 0x800680e0 w 0x000b02cf

However, the DUTY_VALID does not go high as I would expect (i.e. the test signal is an approx. 50/50 duty cycle signal).

IRQ goes high, and LOW_RUNNING_COUNT gets a value, but HIGH_RUNNING_COUNT does not.

Read at address  0x800680E0: 0x000B82CF

Read at address  0x800680F0: 0xF1F83AD9

Read at address  0x80068100: 0x00000000

- It is not documented how UPDATE and RELOAD bits must be set in duty cycle mode.

- It is not documented how IRQ is handled in duty cycle mode

- Must I preload the FIXED_COUNT register to 0xffffffff?

Thanks for any insights to get this working,

Leon.

标签 (1)
0 项奖励
2 回复数

621 次查看
alejandrolozan1
NXP Employee
NXP Employee

Please refer to the attached files. The code is using the TIMROT module but as an encoder.

I hope it helps.

Alejandro

0 项奖励

620 次查看
jamesbone
NXP TechSupport
NXP TechSupport

alejandrolozano

Can you please share your example ?

0 项奖励