How to run PWM on RT1064 EVK ?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to run PWM on RT1064 EVK ?

Jump to solution
134 Views
Maciek
Contributor V

Hi,

I've attached simple project that should run PWM2 and PWM4 on RT1064 EVK. Most of the clocks are inactive. Core clock 100MHz. 

PWM2, submodule 3, signal A is connected to the USER_LED on RT1064 EVK and is set to 4 Hz with 50% duty cycle.

The other PWM4, submodule 0, signal A is connected to pin4 on J22 header on EVK and set to 4 kHz with 50% duty cycle - and it is watched on oscilloscope.

With this configuration (as in the project) I'm not able to run any of these PWMs (the diode doesn't blink and there is no waveform on oscilloscope). The timers are started at initialization. 

Can anyone check and tell me what is wrong with this project ? What am I missing from the API ?

Thanks for help

Maciek

0 Kudos
1 Solution
87 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Maciek,

1. Correct.

2. Correct.

Regarding your other question, as you mentioned we do not have a specific space to say how faults are internally connected. Maybe what I can recommend to you is to check our SDK examples to see the PWM initialization and steps needed.

Best regards,

Felipe

View solution in original post

0 Kudos
3 Replies
114 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Maciek,

It seems you are missing fault assignation with XBAR. Please add the lines below before calling BOARD_InitBootPeripherals in your code, you will see LED will start working after that.

XBARA_Init(XBARA1);

XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm2Fault0);

Hope it helps!

Have a great day,

Felipe

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored. Please open a new thread and refer to the closed one, if you have a related question at a later point in time. 

------------------------------------------------------------------------------ 

0 Kudos
107 Views
Maciek
Contributor V

Hi @FelipeGarcia 

thanks for the clarification. 

Please confirm if my understanding is correct:

1. I assume that PWM_FAULT pins are internal input pins to the PWM peripheral and they are directly connected only to the outputs of the Crossbar Switch (XBAR) peripheral. This way we can only set these pins using XBAR.

2. The line:

XBARA_SetSignalsConnection(XBARA1, kXBARA1_InputLogicHigh, kXBARA1_OutputFlexpwm2Fault0);

actually does not connect the PWM_FAULT pin to any other peripheral signal in RT1064. It simply sets the XBAR output connected to the PWM_FAULT pin to logic HIGH.

 

I have also one question:

1. I didn't find this info (that PWM Fault is connected (only) to output of XBAR) in the PWM section of the User Guide. In the future, in case of other peripherals: what is the best way of finding out how they are internally connected ? For example I'm still not sure if XBAR output is the only sourse for driving PWM_FAULT input signal (maybe there are other 'switches' that connect this input somewhere else...)

Thanks for help

Maciek

0 Kudos
88 Views
FelipeGarcia
NXP TechSupport
NXP TechSupport

Hi Maciek,

1. Correct.

2. Correct.

Regarding your other question, as you mentioned we do not have a specific space to say how faults are internally connected. Maybe what I can recommend to you is to check our SDK examples to see the PWM initialization and steps needed.

Best regards,

Felipe

View solution in original post

0 Kudos