S32K SPI Transfer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
849件の閲覧回数
PhilVgt
Contributor II

Good Afternoon Community,

 

I'm trying to read Pressure/Temperature Data of a Bosch SMP581 Sensor using a S32K118 and S32 Design Studio (with Processor Expert).

The Sensor requires 16 Bits of data and exact 16 clock cycles while CS is set low.

After Power on, the sensor transmits (regardless the Master Comand) a fixed 16 Bit Word in first Transfer. This is working and the received data are as expected.

AFter this first transfer, the master must send 1 of 4 possible comands, for example 0b0101000000000000 to get Temperature data. 

If i send this comand, i don't get an answer. If i set LSB to 1 (0b0101000000000001) i get "invalid Comand) as answer (as expected). Even if i send 0b0101001, i get the same answer. 

But i get only an answer, when i set the "1" as LSB. Otherwise no response.

I tried dozens of different settings and delays, but everything leads to no answer (even for start up). Seems alle the settings are fine.

 

PhilVgt_0-1707926774753.png

 

 

Could anyone support me in this case to solve this issue?

 

Thanks in advance!

タグ(2)
0 件の賞賛
返信
1 解決策
791件の閲覧回数
PhilVgt
Contributor II
0 件の賞賛
返信
3 返答(返信)
792件の閲覧回数
PhilVgt
Contributor II

Problem solved.

0 件の賞賛
返信
833件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @PhilVgt 

According to the information provided, it seems that the SPI behavior is as expected, but communication with the sensor is not being achieved properly. Please make sure that the module configuration matches the specifications of your sensor.

Also, if you observe with an oscilloscope the SPI signals, did you see any irregularity? 

 

B.R.

VaneB

0 件の賞賛
返信
830件の閲覧回数
PhilVgt
Contributor II

Hi VaneB,

 

Thanks for your fast reply. I did not have the chance to check the signals with an oscilloscope yet and it will be quite hard to do that (only possible connection would be the small test points of the ECU). But it seems to be necessary.

Nevertheless, I attached the datasheet of the sensor. I'm using the 16 Bit "out of frame" device (I'm not sure what it actually means). Do you see any special required settings?

 

Thank you for your support.

Note: The attached file was removed due to IP concerns, our apologies for the inconvenience.

0 件の賞賛
返信