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).
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.
解決済! 解決策の投稿を見る。
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.
Hi wuxianlong,
I just found a document AN4856 about the SPC driver, please help me to check.
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.
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.
hi NamLe:
Can you give me the project for SPC with RTD4.0?
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.
thanks
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.
Hi,@NamLee
I'm sorry for the late reply.There are no three modes for S32K3 to configure.
about CRC
I didn't make many changes to the configuration of NXP routines, just tested SPC.Flexio_Sent
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.
BRs,
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)
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
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:
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.
@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.
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.
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
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.
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