S32K146 Master for triggered SENT protocol / Short PWM Code (SPC)

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

S32K146 Master for triggered SENT protocol / Short PWM Code (SPC)

Jump to solution
2,185 Views
carpenter
Contributor II

Hello,

I'm looking for some hints implementing the triggered SENT protocol. 

In the following document this is referred as SPC (Short PWM Code), which enhances the SENT protocol defined by SAE 2716. The receiver generates a trigger pulse on the communication line by pulling it low for a defined amount of time. This triggers the sensor to perform one SENT transmission. 

https://www.nxp.com/docs/en/application-note/AN4219.pdf 

 

There is this SENT receiver example for reference, which uses a FTM + DMA for receiving continues data. What would be a good approch to implement the synchronous mode instead?

Am I going to face problems when switching the FTM mode from output (Master trigger) to input capture (receive SENT transmission)? Using the DMA transaction for receiving data should be still possible, right?

I dont have a proper sensor to try it out yet. What are your thoughts about that SPC + S32K FTM.

Thank you in advance.

0 Kudos
1 Solution
2,163 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I see, thank you.

If you want to reconfigure the FTM, take a look at Section 47.8 Initialization Procedure in the RM.

I think there are other options to generate the trigger.

Other modules can generate the pulse, even GPIO can be used.

Or, for example, PTC1 can be changed between FTM0_CH1 and FTM1_CH7.

danielmartynek_0-1608125240377.png

 

Regards,

Daniel

 

View solution in original post

0 Kudos
5 Replies
1,028 Views
AVargh23
Contributor III

@carpenter Were you able to use the same FTM channel as output and input for sending trigger and receiveing SENT frames? 

0 Kudos
1,001 Views
carpenter
Contributor II

Hi @AVargh23 , no I decided to connect a separate GPIO to the SENT communication line. To generate the low-pulse trigger, I reconfigure this GPIO from INPUT to OUTPUT for a specific time.

0 Kudos
2,173 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I think you are looking for something like this:

https://community.nxp.com/t5/S32K-Knowledge-Base/Uart-to-SENT-protocol-transmitter/ta-p/1129291

 

I don't understand what you mean by 'switching the FTM mode'.

 

Regards,

Daniel

 

 

 

 

0 Kudos
2,168 Views
carpenter
Contributor II

Hi, 

thanks for your reply. I've already integrated the SENT transmitter, thanks for this example.

But for the 'triggered SENT' I'll have to modify these reference projects. The SENT receiver has to be transformed into a SENT master. While the SENT receiver is using the FTM with input capture function, the SENT master has to generate a short PWM on the communication line to trigger the sensor. After that, the master still has to use the input capture function, when receiving the message on the communication line.

Thats why my intention was to change the FTM mode: Generating a short PWM and receiving the nibbles via Input Capture has to be done with the same FTM channel in my opinion.

 

Kind regards

0 Kudos
2,164 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

I see, thank you.

If you want to reconfigure the FTM, take a look at Section 47.8 Initialization Procedure in the RM.

I think there are other options to generate the trigger.

Other modules can generate the pulse, even GPIO can be used.

Or, for example, PTC1 can be changed between FTM0_CH1 and FTM1_CH7.

danielmartynek_0-1608125240377.png

 

Regards,

Daniel

 

0 Kudos