MPC574XG eMIOS Channel Type G and Counters

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

MPC574XG eMIOS Channel Type G and Counters

841 Views
cholland
Contributor V

A couple of questions about counters.

1. Ch Type X and G have internal counters, but can they use Counter Bus A or Counter Bus F?

2. Ch Type G internal counter seems to be slower than Ch Type X internal counter. 

    I tried using Ch Type G internal counter, but used counter E0UC_22_X and counter Bus F.

    I believe Ch Type X internal counter is different than Ch Type G internal counter.

pastedImage_1.png

Labels (1)
Tags (2)
4 Replies

690 Views
cholland
Contributor V

Thanks a lot Petr!

0 Kudos

690 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

  1. All channels can select global counter buses A and F, of course if the selected counting mode allows that.
  2. There should be no difference between internal counters. Can you specify the setting you have that shows different behavior?

BR, Petr

690 Views
cholland
Contributor V

Hi Petr,

>> Can you specify the setting you have that shows different behavior?

I just changed the Bus Select to use a different counter.

         eMIOS_UC_0.UC[2].C.B.BSL = 0x2;    /* Bus Select : Use Bus F */

I was trying to setup PWM Buffered for the following channels

(E0UC_0_X), (E0UC_26_Y), (E0UC_10_H), (E0UC_11_H), (E0UC_2_G), (E0UC_4_G).

  1. I couldn't use (E0UC_0_X) as a counter for the G channels, since I am using it as a seperate PWM signal.
  2. I tried selecting counter bus[A] for all the eMIOS channels, but the G channels didn't work.
  3. When I tried to setup the G channels to use their internal counters, they seemed to be a lot slower than (E0UC_23_X) counter.
  4. I finally setup (E0UC_22_X) (F Bus) and used that counter for both (E0UC_2_G) and (E0UC_4_G).

  1. All channels can select global counter buses A and F, of course if the selected counting mode allows that.

How do I know which counting mode allows me to use which counter busses?

Thank you

0 Kudos

690 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Christopher,

The requirement for the counter bus is mentioned in the counting mode description, chapters 35.6.1.1.1-.12

For the OPWMB mode the external counter driven in MCB Up mode must be selected from one of the counter buses.

So either global counter bus is selected (A or F) or local counter bus (B, C, D, E) depending of used channel.

Regarding your questions…

1. I couldn't use (E0UC_0_X) as a counter for the G channels, since I am using it as a seperate PWM signal.

Yes, if you want to operate ch0 in OPWMB mode, then it cannot serve counter bus B for channels 1-7.

2. I tried selecting counter bus[A] for all the eMIOS channels, but the G channels didn't work.

Channels working in OPWMB mode can run with counter bus A (channel 23) without issue. Channel 23 must be set for MCB mode and determines the PWM period for OPWMB channels.

3. When I tried to setup the G channels to use their internal counters, they seemed to be a lot slower than (E0UC_23_X) counter.

If you set channels to OPWMB mode, internal counter cannot be selected, period is not configurable, so internal counter, if enabled, overflows. If you want to use internal counter then OPWFMB can be used on channel types X and G.

4. I finally setup (E0UC_22_X) (F Bus) and used that counter for both (E0UC_2_G) and (E0UC_4_G).

Yes, this is a possibility, but counter bus A is functional too.

BR, Petr