Using Programmable Interrupt Timers (PIT)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Programmable Interrupt Timers (PIT)

3,931 Views
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 Kudos
Reply
7 Replies

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply

1,794 Views
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 Kudos
Reply