Hello
I am trying to use DeadTime Update block. (picture below). I have also attached the model and the logged data from the Oscilloscope.
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)
Some how the dead time is not updated as I would wish to.
I hope we can have a solution for this.
Solved! Go to Solution.
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
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
Dear mariuslucianandrei
It works perfectly