s32k144 FTM_SignalMeasurement_Example can not work

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

s32k144 FTM_SignalMeasurement_Example can not work

1,928 Views
jiangbolwj
Contributor II

i use this example to test the singnal mesaurement but i can not capture the singal , alwy is one point,i find this program can not into the interrupt,can you help me  

0 Kudos
9 Replies

1,441 Views
raresvasile
NXP Employee
NXP Employee

Hi,

I modified the project and it is working. Please find it attached.

I updated the following:  

 - FTM clock source to System Clock in it's PEx component. In the original project it was using External Clock, which should be provided from an external source.

 - Removed interrupt installation from main and assigned FTM1_ch3_Input_Capture_isr as a callback for the FTM IC channel 0. FTM driver uses hardware interrupts to process measurements and calls user callbacks which are configurable for each channel.

Best regards,

Rares

0 Kudos

1,441 Views
jiangbolwj
Contributor II

hi

i try but not succeess

i read the register ,the register of capture flag have bit 1, the flag of interrupt have bit of 1,but it could not into the interrutpt

if the board  i am used is break, i ues board is FRDM-s32k144 QQ截图20170712110709.pngQQ截图20170712110805.png

QQ截图20170712111716.png

0 Kudos

1,441 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

The latest S32DS and SDKs supports the latest MCU revisions. These are mounted on S32K144EVB-Q100. The FRDM board has MCU with first revision (mask 0N77P) mounted. There are differences in vector table, that’s why the example is not working on your board.

The S32 sdk ear 0.8.1 supports cut1 MCU (mask 0N77P) and its demo example FTM_SignalMeasurement_Example works well on the FRDM board.

 

I guess this earlier SDK versions are not maintained anymore and it is advisable to use the S32K144EVB-Q100 with latest S32DS and SDKs versions.

 

It could be also possible to assign correct ISR vector in the driver, but this is not recommended way.

BR, Petr

0 Kudos

1,441 Views
raresvasile
NXP Employee
NXP Employee

Hi,

It seems that there is a typo in the documentation of the example.

Instead of J3-11 you need to connect to J4-11. So the connection would be PTC0(J4-11) -> PTB2(J2-11).

I tried the example on RTM and it worked.

Best regards,

Rares

0 Kudos

1,441 Views
jiangbolwj
Contributor II

hi rares

could you give me you use example ,i could not use also

0 Kudos

1,441 Views
jiangbolwj
Contributor II

i try but not ok

i write one to look if it  can into the interrupt ,it can not into the intterrupt ,can you help me have a look  

thank you 

0 Kudos

1,441 Views
raresvasile
NXP Employee
NXP Employee

Hi,

Was the connection between the FTM0 PWM pin and FTM1 IC pin done correctly?(Please consult the example documentation for the information about the connection).

What version of the SDK are you using?

Best regards,

Rares

0 Kudos

1,441 Views
jiangbolwj
Contributor II

FTM0 is PTC0 FTM1 is PTCB2 the point is right , 

I use SDK is 1.3  using the example is SDK v1.0

0 Kudos

1,441 Views
jiangbolwj
Contributor II

QQ截图20170707141140.png

By using data obtained from a serial port tool as shown

0 Kudos