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?
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
Hi dumitru-daniel.popa,
The processor is S912ZVMC12F1MKH.
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:
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.
Hope this helps!
Daniel