eTimer ISR (MBD for MPC574x) does not generate Event

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

eTimer ISR (MBD for MPC574x) does not generate Event

Jump to solution
1,828 Views
abhishek_kumar1
Contributor IV

Hello

I am generating a pulse signal with a GPO (PF14) and trying to feed the pulse signal to PJ8.

pastedImage_1.png

Use eTimer to detect the rising and falling edge from the pulse (PJ8 is connected to PF14)

pastedImage_2.png

Use the EVENT for detection of edges to run a subsystem (where I add a counter every time a edge is detected)

pastedImage_3.png

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. 

pastedImage_4.png

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

1 Solution
1,684 Views
mariuslucianand
NXP Employee
NXP Employee

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. 

pastedImage_1.png 

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

View solution in original post

3 Replies
1,685 Views
mariuslucianand
NXP Employee
NXP Employee

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. 

pastedImage_1.png 

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

1,684 Views
abhishek_kumar1
Contributor IV

Dear mariuslucianandrei

It works, Thank you for the input.

1,684 Views
mariuslucianand
NXP Employee
NXP Employee

Hello abhishek.kumar@chassisbrakes.com‌,

I will investigate your issue and give a reply soon. 

Best Regards, 
Marius

0 Kudos
Reply