Using Programmable Interrupt Timers (PIT)

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

Using Programmable Interrupt Timers (PIT)

3,351 次查看
MQXuser
Contributor III

I need to use a Timer to generate an ISR but I am not sure which MQX modules are already using the timers. The question is where can I find the following information?

 

1.-Which modules are using the PIT's?

2.-How can I use a PIT if it is already being used?

 

Thanks

 

 

0 项奖励
7 回复数

1,214 次查看
Jairo
Contributor III

Is there any problem using GPT for interrupts? Because in my application i need a 20MHz frequency, i already tried with the timer functions in MQX, but it seems that th code is too large (just using the ioctl function). Another doubt is how to modify the registers from MQX or can i include a Processor Expert code?

Best Regards.

0 项奖励

1,214 次查看
MQXuser
Contributor III

I dont see a problem if you use GPT for interrupts (I needed a different source of timer interrupt).

 

Registers are modified into the BSP, check the manual to learn how to open and compile the BSP. In this code you will find plenty of examples to learn how to write into registers.

I am not sure if this is the best way but its a start point.

0 项奖励

1,214 次查看
NeuroSolutions
Contributor I

Can anybody tell me how I use the TPM for generate a PWM signal in MQX with MCF51CN128

Thanks a lot!

0 项奖励

1,214 次查看
marek_vinkler
NXP Employee
NXP Employee

Processor Expert is integrated with MQX since MQX 3.7. You can use and configure PE components in MQX BSP project.

0 项奖励

1,214 次查看
NoeSerres
Contributor II

MQX 3.7 seems to be the magic answer to all our issues!

I wish we could download it! Release 3.7 should be available by now but we are still waiting...

Please keep us informed on WHEN we are going to be able to use it! :smileysad:

0 项奖励

1,214 次查看
JuroV
NXP Employee
NXP Employee

PIT0 is used by MQX kernel as a tick reference. Don't modify anything in PIT0 registers.

PIT1 is used by ADC driver to schedule A/D conversion(s). If ADC is not used, you can use PIT1.

 

MQX kernel exports time functions and it gets time information from PIT0.

0 项奖励

1,214 次查看
bla5029
Contributor I

Are there any other peripherals that are forced to these PIT channels?  I just learned this lesson the hardware.  I have been programming interrupts for the UART and was using the PIT1, then put that into an ADC sample project, and lo and behold it didn't work.  Is there a way to multiplex and use more than one peripheral on the PIT1?  Or are the GPTt's the only solution at that point?

 

I am using the TWR-MCF 52259.

0 项奖励