Use Simulink to configure IOC and PWM

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

Use Simulink to configure IOC and PWM

1,269 Views
jacobtang
Contributor I

1. My customer wants to use SIMULINK configure IOC to capture PWM input signal of sensor, To calculate width of PWM, Anyone has the example project that can be provided? Thanks!

2. My customer want to use SIMULINK configure PWM as 2 complementary channels, But only one complemetary channel can ouput, However, It can successfully configured when based on EVB Board.

Anyone has the DEMO code or example code?

3 Replies

905 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi jacobtang‌,

What is the processor/board the customer is targeting?

FYI, we have a similar example here: https://community.nxp.com/thread/455511 

Hope this helps!

Daniel

0 Kudos
Reply

905 Views
jacobtang
Contributor I

Hi dumitru-daniel.popa‌,

The processor is S912ZVMC12F1MKH.

0 Kudos
Reply

905 Views
Daniel_Popa
NXP Employee
NXP Employee

Hi jacobtang‌,

For this processor/family there is an example of using the Complementary 2 channel PWM here: Example Model: S12ZVM Trapezoidal Motor Control within the S12ZVM_Trap_Ctrl - just change the processor type from the configuration block:

pastedImage_2.png

For the second aspect - CAPTURE PWM signal we do not have such example but a simple model can be implemented via the Hall_Sensor_Port Simulink Block. If the PWM signal i routed in such way to be feed to the appropriate digital input then the block will give the option to trigger any subsystem and/or get the time stamp associated with the input signal transitions. 

pastedImage_3.png

Hope this helps!

Daniel