Timer match toggle?

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

Timer match toggle?

1,670 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave3891 on Sat Jul 16 13:01:07 MST 2011
How does the toggle work on the 32bit timer match on the 1343?

Does it turn it on with one match then turn it off with the next? Or does it turn it on for a small period on each match?

I can't seem to see a waveform of it in the user manual.

Thanks
Dave
0 Kudos
Reply
7 Replies

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave3891 on Sun Jul 17 20:24:34 MST 2011
Thanks, thats what I was looking for.

And thanks for the tip on the keil software, it looks like it will help me a lot with the simulator.


Dave.
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Sun Jul 17 17:14:55 MST 2011
Hello Dave3891,

It toggles ... so External Match Control switches between 'on' and 'off' each time the match happens.

Can be simulated e.g. via Keil software by using the software from the codebundle. It is shown via the 'Peripherals' and '32-bit Timer'. The values and bits are visualized in the Simulation Mode ... can be set via 'target / debug'.

(...)
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave3891 on Sun Jul 17 10:24:28 MST 2011
I have read that chapter a few times and I understand how the match registers work and how to setup a PWM mode.

I was just looking for clarification on how the toggle setting worked

Quote:

[B][FONT=Arial][SIZE=1][COLOR=#005042][FONT=Arial][SIZE=1][COLOR=#005042][FONT=Arial][SIZE=1][COLOR=#005042][LEFT]Table 263. External match control[/LEFT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Arial][SIZE=1][FONT=Arial][SIZE=1][LEFT]EMR[11:10], EMR[9:8],
EMR[7:6], or EMR[5:4]
Function[/LEFT]
[/B][/SIZE][/FONT][/SIZE][/FONT][FONT=Arial][SIZE=1][FONT=Arial][SIZE=1][LEFT]00 Do Nothing.
01 Clear the corresponding External Match bit/output to 0 (CT32Bn_MATm pin is LOW if
pinned out).
10 Set the corresponding External Match bit/output to 1 (CT32Bn_MATm pin is HIGH if
pinned out).[/LEFT]
11 Toggle the corresponding External Match bit/output
[/SIZE][/FONT][/SIZE][/FONT]



Does it switch between on and off each time the match happens?
Or does it toggle on for a set period and then off again?
:confused:
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Sun Jul 17 06:16:25 MST 2011
Dave,

it might be worthwhile to read the user manual's chapter on the timers and check what is going on in the initTimer32 and setMatchTimer32PWM functions.

You might be surprised to see that the setMatch function enables the PWm mode of the timer and that the user manual states that this means that the output is set when the timer resets and clears on match.

The examples are meant to be used besides the user manual - not instead of...

Regards,

Rob
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun Jul 17 01:18:12 MST 2011
Don't know what you are trying to do, but this sample should show a simple frequency output with set and reset :)
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Dave3891 on Sat Jul 16 21:05:49 MST 2011
I am looking at the PWM sample, but I don't see anything about toggle?
Just
[SIZE=2][LEFT]init_timer32PWM(1, period, MATCH0);
setMatch_timer32PWM (1, 0, period/4);[/LEFT]
enable_timer32(1);
[/SIZE]
0 Kudos
Reply

1,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Jul 16 13:37:26 MST 2011
Perhaps it's a good idea to look for PWM samples in LPC11 sample folder :):confused:
0 Kudos
Reply