FLEXPWM Dead Time Update Block [MPC574x Model Based Design Toobox]

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

FLEXPWM Dead Time Update Block [MPC574x Model Based Design Toobox]

Jump to solution
986 Views
abhishek_kumar1
Contributor IV

Hello 

I am trying to use DeadTime Update block. (picture below). I have also attached the model and the logged data from the Oscilloscope.

pastedImage_1.png

After every 1000 microseconds the Dead Time must switch between 1000ns and 5000ns (its just for tests).

For this I use PIT and Matlab block to get the change in state for 1000ns dead time block and 5000ns Dead time Block. (function below), Rising edge of the function takes it to 1000ns and falling edge takes it to 5000 ns dead time

function [count, switchToLongDeadTime] = fcn(countIn)

if countIn == 20
count = 1;
else
count = countIn +1;
end

if count <= 10
switchToLongDeadTime = 1;
else
switchToLongDeadTime = 0;
end
end

But the dead time remains 100 ns which was set in the 'FlexPWM_Config' block. (picture below)

pastedImage_4.png

pastedImage_5.png

Some how the dead time is not updated as I would wish to.

I hope we can have a solution for this. 

Tags (1)
1 Solution
906 Views
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

Well, I found the following issues in your model:

1. The input of the PWM block is 50 instead of 0.5

2. The PIT Channel priority is 0 which means that the interrupt is disabled... so please use a value grater than 1 the ISR priority mechanism is different on PowerPC than ARM: 31 is the most higher priority. 

3. I also changed the PIT Channel period for showing the signals on the scope. 

I also changed the PWM pins to avoid the level shifter.

Hope this helps you,

Marius

View solution in original post

2 Replies
907 Views
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

Well, I found the following issues in your model:

1. The input of the PWM block is 50 instead of 0.5

2. The PIT Channel priority is 0 which means that the interrupt is disabled... so please use a value grater than 1 the ISR priority mechanism is different on PowerPC than ARM: 31 is the most higher priority. 

3. I also changed the PIT Channel period for showing the signals on the scope. 

I also changed the PWM pins to avoid the level shifter.

Hope this helps you,

Marius

906 Views
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

It works perfectly