S32DS generates SPI code for S32K142, but there is no signal on MISO and MOSI

cancel
Showing results for 
Search instead for 
Did you mean: 

S32DS generates SPI code for S32K142, but there is no signal on MISO and MOSI

483 Views
563451665
Contributor I

Hello, everyone.

      I have a problem that has troubled me for a long time. I used S32DS to generate SPI code. But I found that MISO and MOSI have no signals, but SCK and CS have signals, I think my SPI configuration should be no problem, maybe there is a problem with data assignment. So I went to the TDR register but...   I found that there was no value in the register, but I was clearly calling the assignment statement. In addition, when debugging step by step, you can see that the TDR registers have been assigned.

pastedImage_1.png

just like that..i just want to send 0x55..

pastedImage_2.png

Below is my project, I hope you can help me.

Tags (1)
0 Kudos
4 Replies

320 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello,

The Transmit Data Register is a write-only register. 

pastedImage_1.png

Do you want to use Continuous Transfer?

pastedImage_1.png

Please check the PCR[MUX] of the ports with the debugger.

Thanks,

Daniel

0 Kudos

320 Views
563451665
Contributor I

Hi~ o(* ̄▽ ̄*)ブ

Thank you for your answer. Actually, I don't quite understand what "Continuous Transfer" is, but if I assign this value to false, MISO and MOSI still have no signal. Then I checked the corresponding pin of S32DS and found that he was wrong, so I changed the pin again and finally saw the waveform on the corresponding pin of S32DS.

I still have a few questions that I hope you can answer.

1. Why is the pin corresponding to LPSPI0 routed to LPSPI1 in the S32DS (this is where my program had problems before)

2. PCR [MUX], we can only know two of these functions, but there are five other chip-specific. What does that mean?

pastedImage_1.png

0 Kudos

320 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

During a continuous transfer the CS is kept asserted between frames.

Which LPSPI0 pin do you mean?

The alternative functions of the ports are listed in the S32K142_IO_Signal_Description_Input_Multiplexing.xlsx

that is attached to the RM.

pastedImage_1.png

Regards,

Daniel

320 Views
563451665
Contributor I

Hello, thank you for your help.
         Now I can operate on the SPI. I found that the generated code of the IDE may be initialized to other interfaces caused by LPSPI0. Thank you again for your answer.You are such a good person.(*^_^*)

0 Kudos