Hello,
I am trying use SPI 0 for communication purpose, but whenever i try to init SPI 0 channel, controller resetting itself continuously.
But SPI 1 and SPI 2 are working fine, without any issue.
Are you using a custom board or the S32K31XEVB-Q100? Could you please share your configurations?
BR, VaneB
Hello @VaneB ,
Below images are my SPI 0 configuration.
I am using Custom board.
Note: we have external SBC, which resetting our controller whenever i try to INIT SPI - 0. Issue is only with SPI 0.
If possible, could you try changing the configured pins to ones that are not connected to the SBC and verify if the behavior changes? This is to determine whether the issue persists within the MCU or if it is caused by some interference with the SBC.
Hi @VaneB ,
After analyzing, SBC and Pressure sensor connected in LPSPI0.
SBC -> PTB5 (PCS0)
Pressure sensor - > PTA7 (PCS1).
Whenever I configure both CS pins, SBC resetting MCU continuously.
Is there any restriction to use both pin as SPI at same time? Because if i configure PTA7 as GPIO, there is no issue.
There should be no restriction to both PCS. If you configure PTB5 as GPIO, does the issue happen as well? Also, if you try to configure PCS1 as another pin, does it keep resetting?
If you have an EVB available, it would be helpful to test your code in it to see if the issue persists. Just to discard a HW issue.
Best regards,
Julián
Hi @Julián_AragónM ,
No we don't have S32K311 eval board with us.
I tried 2 suggestions.
If i configure different pin as PCS1 ( PTC6 OR PTD5 ), no issue. Working fine. Issue is only with PTA7 pin as SPI 0 PCS1.
Even if i configure PTB5 pin as GPIO and PTA7 as SPI 0 PCS2, same issue. SBC resetting MCU.
I have tested the behavior of SPI instance 0 with PSC1 using PTA7 on an S32K31XEVB-Q100 from my side and have not been able to reproduce your issue. I am attaching a simple example code. Could you please test it on your side and let me know if you observe any changes in your device's behavior?
Please note that the example was developed using S32 Design Studio (S32DS) version 3.6 and Real-Time Drivers (RTD) version 5.0.0.
Your project configurations seem correct. I have one observation: according to the data you are transmitting, you need to change the SpiDataWidth parameter in ConfigTools from 1 to 8.
As I am unable to reproduce your issue, the most likely root cause might be related to hardware. Unfortunately, it is complex to determine the specific cause since you are working on a custom board, while I am working on an S32K31XEVB-Q100.
For hardware recommendations that might be useful, you can refer to the Hardware Design Guidelines for S32K3xx Microcontrollers and the S32K31XEVB-Q100 schematic.
Regarding your request to review the schematic, I wanted to let you know that, unfortunately, I am not an FS23 expert. To ensure you get the best assistance, could you please create a new post or submit a support ticket for this review? Please note that submitting a support ticket might be the best option if your schematic contains confidential information.
As previously mentioned, the references I can provide are the Hardware Design Guidelines for S32K3xx Microcontrollers and the S32K31XEVB-Q100 schematic.
Thanks a lot for your understanding.