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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
3,244 次查看
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,222 次查看
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,087 次查看
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,060 次查看
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,232 次查看
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,227 次查看
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,223 次查看
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 项奖励
回复