S32K3_SPC Test problem _RTD4.0.0.

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

S32K3_SPC Test problem _RTD4.0.0.

Jump to solution
2,125 Views
wuxianlong
Contributor III

Hi ,all

Happily, RTD4.0.0 implements the SPC function. Can you provide some guidance on testing?

I found some errors when I tested with Valeo's sensor. 1. The waveform of SPC is inconsistent with that in the manual. 2. There is an error in the CRC check of SPC. 3. The trigger segment will be identified as an error. The following is a detailed description:
1. The waveform of SPC is not consistent with that in the manual. In the manual, I see that the length of the ECU trigger segment, that is, the ID segment, will be affected by the length of the low level (the two falling edge events will change). The waveform I tested is that the length of different low levels only affects the duty cycle (the two falling time edges are fixed).

wuxianlong_0-1705540969086.png


2. Error in CRC check of SPC.
The standard CRC check cannot verify the SPC data and needs to modify the CRC. There is no problem with the default CRC algorithm for verifying SENT data.

3. The trigger segment will be identified as an error.
When I test, the trigger segment is captured by SENT and a STATUS_FLEXIO_SENT_IP_ERROR_CALIBRATION_LENGTH error is reported.

0 Kudos
Reply
1 Solution
1,979 Views
NamLee
NXP Employee
NXP Employee

Hi wuxianlong,

So the total trigger time is about 90UT which match with 260us total of trigger pulse.

So i think the trigger pulse will work here, when you low the pulse as 10.5UT which around 30us, please help me to try it.

About the 3 modes that i mentioned, i believe that it's upto the hardware setup from your sensors. Your sensors mode in select ID which match with the 3rd mode (i will ask my collegue about these modes later on)

It is recommended that when selecting CRC check, you can choose a user-defined CRC algorithm.

> If so, the CRC check will work with both SENT algorithm and user-defined one. But i think the check issue here come from the fact that the low pulse time isn't correct then the sensor does not get triggered and the CRC check issue happened.

Thank you,

Nam.

View solution in original post

0 Kudos
Reply
12 Replies
2,065 Views
NamLee
NXP Employee
NXP Employee

Hi wuxianlong,

I just found a document AN4856 about the SPC driver, please help me to check.

Namm_0-1706241549552.png

1> In chapter 2.2, the SPC protocol said that we have three pre-programmed for the Hall sensor TLC4998C, please check your sensor about the modes supported by the sensor. Mode 3 can be the pulse-width that you want, but for mode 1 and 2 it's not.

Namm_1-1706242807552.png

2> Can you tell me how you modify CRC algorithm for verifying SPC data?

3> Please also share some capture about this error flag you observed.

I will ask one experienced developer for this function in K3.

Please check this above document and share your details.

Thank you,

Nam.

 

0 Kudos
Reply
1,739 Views
steven_zhang
Contributor V

hi NamLe

 Can you give me the project for SPC with RTD4.0?

0 Kudos
Reply
1,732 Views
NamLee
NXP Employee
NXP Employee

Hi steven_zhang,

The existed examples from RTD already contains enabled SPC function.

You can try to read the sequence of it in chaper 3.6.2 of UM doc.

I'm also searching for example, or some codes that i can share to you, please give me a bit time for it.

Thank you,

Nam.

0 Kudos
Reply
1,722 Views
NamLee
NXP Employee
NXP Employee

Hi steven_zhang,

Please check this attachment with password NXP.

Thank you,

Nam.

0 Kudos
Reply
1,717 Views
steven_zhang
Contributor V

thanks

0 Kudos
Reply
2,057 Views
NamLee
NXP Employee
NXP Employee

Hi wuxianlong,

I have updates from my team.

- Please share your SPC implementation, the code where the Sent_SpcRequest functions is called.

- Please send some pictures regarding the waveform of the signal. What you expects the trigger to be and what is the result. Please share the the values of the trigger that he sends and what he sees actually with the analyzer.

- About your setup, how many sensors did he connect to one SENT channel? What mode does he use-synchronous mode, synchronous mode with range or ID mode?

Thank you,

Nam.

0 Kudos
Reply
2,029 Views
wuxianlong
Contributor III

 Hi,@NamLee
     I'm sorry for the late reply.There are no three modes for S32K3 to configure.

about CRC

wuxianlong_2-1706582323773.png

     I didn't make many changes to the configuration of NXP routines, just tested SPC.Flexio_Sent 

wuxianlong_0-1706580020469.png 

In my tests, I modified the TimeTriggerPulse parameter of Flexio_Sent_Ip_SpcRequest (), and the resulting waveform only changed the low-level duration  (260us) .   The waveform I mentioned earlier, TimeTriggerPulse is 60. I think this fixed period may be the reason for the sensor.

wuxianlong_1-1706580166609.png

wuxianlong_3-1706582390805.png

BRs,

 

 

0 Kudos
Reply
2,005 Views
NamLee
NXP Employee
NXP Employee

Hi wuxianlong,

The Trigger time from master should be the low level signal here, i saw your measurement and i think it's work because i guess the low time pulse here will be around 160us (out of 260us in the deltaX that i saw in the signal capture)

Namm_0-1706689245692.png

Namm_1-1706689704927.png

The defined TimeTriggerPulse is the time period in microseconds (us) to keep the pulse low.

Your signal quite the same with this example, for 3 nibbles data

Namm_2-1706691459847.png

As about the ID, please describe your hardware setup, like how many sensors did you connect into one channel SENT?

If one sensor be connected to one channel SENT with the defined TriggerTime so it'll work in mode 1 properly.

One comment from my collegue, that you should call function Sent_SpcRequest, shall be called periodicaly at an interval of 1 milisecond.

The call of the Sent_SpcRequest shall be done after:

  • Sent_StartChannelReceiving in interrupt mode
  • Sent_GetFastMsgData in polling mode

As i saw that you call Sent_Ip_SpcRequest directly, and you already called Flexio_Sent_Ip_StartChannelReceiving (you're configuring SENT interrupt mode, aren't you?)

Could you please share your project so i can check your config and your implement code.

Thank you,

Nam.

 

0 Kudos
Reply
1,986 Views
wuxianlong
Contributor III

@NamLee Hi,

      Thank you for your help.
      I may have made a mistake. The screenshot of the SPC ID mode in the previous manual may be a concept map.

wuxianlong_0-1706859652935.png


      I carefully read the chip manual, the actual waveform T (mtr) should be fixed, consistent with my test, 260us is about 90 UT. The sensor determines the ID through the duration of the low level.

wuxianlong_1-1706859712914.png

wuxianlong_2-1706859750580.png

 

      By the way, I didn't find the SPC different mode of S32K3 that you mentioned. It is recommended that when selecting CRC check, you can choose a user-defined CRC algorithm.

BRs,
xianlong

0 Kudos
Reply
1,980 Views
NamLee
NXP Employee
NXP Employee

Hi wuxianlong,

So the total trigger time is about 90UT which match with 260us total of trigger pulse.

So i think the trigger pulse will work here, when you low the pulse as 10.5UT which around 30us, please help me to try it.

About the 3 modes that i mentioned, i believe that it's upto the hardware setup from your sensors. Your sensors mode in select ID which match with the 3rd mode (i will ask my collegue about these modes later on)

It is recommended that when selecting CRC check, you can choose a user-defined CRC algorithm.

> If so, the CRC check will work with both SENT algorithm and user-defined one. But i think the check issue here come from the fact that the low pulse time isn't correct then the sensor does not get triggered and the CRC check issue happened.

Thank you,

Nam.

0 Kudos
Reply
1,953 Views
wuxianlong
Contributor III

Hi,Namn

I think the low-level pulse will be effective. The beginning of my test for this topic is that the 20UT duration is 60us.

S32K3 calculates CRC using software

BRs,
xianlong

0 Kudos
Reply
1,985 Views
wuxianlong
Contributor III
 
0 Kudos
Reply