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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
3,232件の閲覧回数
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 件の賞賛
返信
1 解決策
3,210件の閲覧回数
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 件の賞賛
返信
5 返答(返信)
2,075件の閲覧回数
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 件の賞賛
返信
2,048件の閲覧回数
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 件の賞賛
返信
3,220件の閲覧回数
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 件の賞賛
返信
3,215件の閲覧回数
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 件の賞賛
返信
3,211件の閲覧回数
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 件の賞賛
返信