Lpspi_Half_Duplex example code for S32K344/358

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

Lpspi_Half_Duplex example code for S32K344/358

19,702件の閲覧回数
abdul_rahman
Contributor IV

Hi team,

I'm very new to this controller and I need help in seeing the RxSlaveBuffer data in the Lpspi_Half_Duplex example code given in the IDE. The screenshots of the issues I'm facing are shown below,

abdul_rahman_0-1727330044246.jpeg

The RxSlaveBuffer array isn't receiving data from TxMasterBuffer but it is showing the exact hex, dec, bin values of the master.

abdul_rahman_1-1727330130162.png

I'm not understanding the errors in the Expressions tab of Debug mode. 

It would be really helpful in helping me with detailed explanation of the problems and solutions needed. 

S32DS-S32PLATFORM S32K344-WB #S32K358 #Lpspi_HalfDuplex

0 件の賞賛
返信
25 返答(返信)

17,800件の閲覧回数
abdul_rahman
Contributor IV

Hi @Julián_AragónM 

Can you help me in this also? The entire problem I've explained in the whole query thread. Let me know if you need anything more to understand the problem.

0 件の賞賛
返信

17,789件の閲覧回数
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman,

As my colleague @VaneB has shared in the previous replies, it seems this is a hardware issue related to your board, since we are unable to reproduce it. That specific header or pin may be damaged. It is very difficult to pinpoint a hardware issue through this support channel, so it may be best to contact your distributor or salesperson.

Unfortunately, the only general guidelines I can give you is to follow the Getting Started with the S32K3X4EVB-T172 Evaluation Board and check all the configured jumpers and to confirm if the correct supply voltage and current is being used. You may also try and configure another board or MCU to discard a faulty product.

If possible, it would be helpful to provide a picture where you show the full connections between the pins, so we can discard the connections as a probable cause.

Also, it seems that the S32K3X4EVB-T172-HW-UM is indeed wrong. J10 is not the VDD_HV_A jumper for the S32K344, it is jumper J427:

Julin_AragnM_0-1728510654175.png

I apologize for the inconveniences. 

Best regards,
Julián

 

0 件の賞賛
返信

18,412件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

Which version of RTD are you using? Did you make any changes to the example code? Are you using a custom board or an EVB?

 

BR, VaneB

0 件の賞賛
返信

18,399件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

Which version of RTD are you using? Version 4

Did you make any changes to the example code? No

Are you using a custom board or an EVB? I'm running the code in evaluation board S32K3X4EVB

Can we personal chat on this?

0 件の賞賛
返信

18,382件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

What is the maskset of the MCU? 0P55A pre-prodution or  1P55A production. There seems to be an issue with the PTB3 0P55A 172HDQFP pin.

0 件の賞賛
返信

18,378件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

How do I see this maskset in the S32DS IDE? What does a maskset mean? Why is it important in pin configuration?

0 件の賞賛
返信

18,375件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

The mask set is identified by a 5-character code consisting of a version number, a letter, two numerical digits, and a letter. This is printed in the MCU.

0 件の賞賛
返信

18,292件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

Please reply to this. I really need your help as no one around me knows about the controller, let alone operating it!!

P.S.- The master clock (PTB29) and CS (PTB25) pins are showing a continuous pulse of 3.3V when seen on the oscilloscope. Why is the clock pin not working?

0 件の賞賛
返信

18,276件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

I have tested the example code from my side and it works as expected, make sure you have connected the master and slave pins as mentioned in the description.txt file.

0 件の賞賛
返信

18,269件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

I have connected the pins according to the description.txt file as well as from the pins tool. What else could be the problem?? Is it because I'm observing the RxSlave array when I "suspend" the program??

I'm also observing constant DC voltage of 3.3V in the Master's CLK and CS pins. What could this mean??

0 件の賞賛
返信

18,254件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

Could you clarify where in the code you "suspend" the program?

0 件の賞賛
返信

18,183件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

Have you looked into the screen recording video? What could be the issue during debugging the code?

0 件の賞賛
返信

18,163件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

I do not see any issues while debugging, but as you mentioned, it seems that the slave is not receiving the information from the master. Please use a breakpoint at Exit_Example(Passed) to not let the program terminate and check the buffers. Also, could you share a picture of the three LPSPI signals? Lastly, make sure you have the jumper set correctly.

0 件の賞賛
返信

18,141件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

"Please use a breakpoint at Exit_Example(Passed) to not let the program terminate and check the buffers.": I have attached a video in a .zip file to show how I've run the program. The master data is still not seen in the slave buffer as shown in the video. What could be the problem now?

"Also, could you share a picture of the three LPSPI signals?": The CLK, CS and data pins are showing the same 3.3 V as shown in the below picture. 

abdul_rahman_0-1727945658481.jpeg

 

0 件の賞賛
返信

18,125件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

Sorry for the inconvenience, as I have not been able to reproduce your problem, I would like to confirm one thing.

PTB3 has output to two ARDUINO headers, J38.18 (DNP) and J37.14, did you connect a jumper from PTE0 (J37.9) to J37.14 or J38.18?

0 件の賞賛
返信

18,121件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

I am aware that PTB3 has 2 arduino ports. I've tried connecting both ports. But none of them give the SPI data.

タグ(3)
0 件の賞賛
返信

18,113件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

Could you create a simple example code where you configure all the pins used for the Lpspi_Half_Duplex example as GPIO and toggle their state from high to low? I want to check if there is any issue in the functionality of any of the pins that does not allow the example to work correctly.

0 件の賞賛
返信

18,049件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

I made a new code toggling the gpio pins, which I have attached below. The waveforms of the all the pins used in the Lpspi_Half_Duplex code are also attached below. PTB3 pin was showing 0V in the scope. Please look into the other pin results and let me know what could be the problem.

0 件の賞賛
返信

18,042件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @abdul_rahman 

I have run the code shared above and all signals change from high to low as expected.

VaneB_0-1728063656590.png

Since it is not a software issue, please check your hardware like connections or if you see anything strange on your board.

0 件の賞賛
返信

17,896件の閲覧回数
abdul_rahman
Contributor IV

Hi @VaneB 

As per the user manual of the S32K3X4EVB-T172 evaluation board, the J10 jumper is said as,abdul_rahman_0-1728208778149.png

But my evaluation board doesn't have the J10 jumper as shown in the below picture,

abdul_rahman_1-1728208833498.png

Is this strange according to you? I have operated the board throughout without this J10 jumper and I didn't face any problem. 

0 件の賞賛
返信