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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,853 次查看
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. 

标记 (1)
1 解答
1,773 次查看
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

在原帖中查看解决方案

2 回复数
1,774 次查看
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

1,773 次查看
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

It works perfectly