Hi Team
As stated in the subject , I'm trying to run the LPSPI sdk example code lpspi_transfer_s32k144
I have connected the pins perfectly
* B0-D3
* B2-B14
* E1-D2
* B4-D1
So once the run the program , i could able to see the adc value from potentiometer & same is been sent from slave to master perfectly
But next time , if i modify the potentiometer , adc value is getting modified , so slave is trying to send updated adc value to master
But master is not able to read the current value , it is storing the first adc value
Please let me know , If modifications has to be done
Best Regards
Karthik SV
已解决! 转到解答。
Hi Jim
Now I'm able to communicate continuously, earlier I had powered up EVB with 12V external supply
Later I connected only USB , It is able to communicate perfectly
Can you tell me , what may be reason for that , As LPSPI1 is connected to CAN transreceiver , external supply is turning on the transreceiver , so 2 SPI devices are connected to LPSPI1(LPSPI0 & CAN transreciver)
Adding to above , I found out that , after first byte gets transmitted successfully , Status register MBF bit is having "LPSPI is busy"
That is a reason why it is not able to recieve next byte
Please let me know , how to make "LPSPI idle again" , i tried clearing RDF bit
Still it was showing "LPSPI is busy"
Regards
KARTHIK SV
Hi@KARTHKSARODE
Is you debugger reading the RX FIFO?
you can close the register view window and then try again.
Read and w1c RDF ,for example:
if(LPSPI1->SR & LPSPI_SR_RDF_MASK)
{
LPSPI1->SR |= LPSPI_SR_RDF_MASK;
}
BR!
Jim,
Hi Jim
Now I'm able to communicate continuously, earlier I had powered up EVB with 12V external supply
Later I connected only USB , It is able to communicate perfectly
Can you tell me , what may be reason for that , As LPSPI1 is connected to CAN transreceiver , external supply is turning on the transreceiver , so 2 SPI devices are connected to LPSPI1(LPSPI0 & CAN transreciver)
Hi @KARTHKSARODE ,
Thanks for sharing the information.
if some chips were broken, we couldn't be normal communicate by using 12V or USB.
so may be we can measure the 12V external supply during the communicate.
and compare the result between 12V external supply and USB.
small idea for you reference, kindly help to share your comments, thanks.
Best regards.
Guofred