Hello
I am generating a pulse signal with a GPO (PF14) and trying to feed the pulse signal to PJ8.
Use eTimer to detect the rising and falling edge from the pulse (PJ8 is connected to PF14)
Use the EVENT for detection of edges to run a subsystem (where I add a counter every time a edge is detected)
I expect the "CaptureCount" Value to be growing with every edge detection but in freemaster, the Counter stays at zero.
I think somehow the Rising and Falling edge events can not be captured, when I look on Scope PF14 values, it shows a pulse with 100 Hz frequency (which is intended). My best guess is that eTimer Configuration is wrong but I can't find where.
I have attached the Matlab file and freemaster file for you.
I am using
1. Matlab 2018 b
2. Model Based Design Toolbox for MPC574x (V3.0)
Best Regards
Abhishek
Solved! Go to Solution.
Hello abhishek.kumar@chassisbrakes.com,
I am sorry for the delay. Thank you very much for writing on the community about this issue.
Looking inside your model, I found the following:
Firstly, in the model I've found that the Secondary source was selected the Counter 0 input pin, but in the pin configuration I've found that the PTJ8 was selected as the forth Counter pin. So, in order to use it please select the secondary Count source the "Counter 4 input pin" option. They must be linked together.
Secondly, I've found that on our side the pin initialization for the eTimer was not performed right, so please replace the attached p code script in the src\mbdtbx_mpc574x\mbdtbx_mpc574x\mscripts\etimer location.
Thank you very much for your model sent!
I am waiting for your reply to confirm or not that the patch worked.
Best Regards,
Marius
Hello abhishek.kumar@chassisbrakes.com,
I am sorry for the delay. Thank you very much for writing on the community about this issue.
Looking inside your model, I found the following:
Firstly, in the model I've found that the Secondary source was selected the Counter 0 input pin, but in the pin configuration I've found that the PTJ8 was selected as the forth Counter pin. So, in order to use it please select the secondary Count source the "Counter 4 input pin" option. They must be linked together.
Secondly, I've found that on our side the pin initialization for the eTimer was not performed right, so please replace the attached p code script in the src\mbdtbx_mpc574x\mbdtbx_mpc574x\mscripts\etimer location.
Thank you very much for your model sent!
I am waiting for your reply to confirm or not that the patch worked.
Best Regards,
Marius
Dear mariuslucianandrei
It works, Thank you for the input.
Hello abhishek.kumar@chassisbrakes.com,
I will investigate your issue and give a reply soon.
Best Regards,
Marius