1903519_en-US

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

1903519_en-US

1903519_en-US

s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue
I am testing SPI communication on S32K314.

It was confirmed that the correct data was output through Lpspi_Ip_SyncTransmit. 
 
    status = Lpspi_Ip_SyncTransmit(&SLAVE_EXTERNAL_DEVICE, pTxData, pRxData, length, 1000);
    if( LPSPI_IP_STATUS_SUCCESS == status ) {
        retval = true;
    }
However, even if Interrupt is set, the Finish interrupt does not occur.
        status = Lpspi_Ip_Init( &Lpspi_Ip_PhyUnitConfig_SpiPhyUnit_0_Instance_0 );
        if( status != LPSPI_IP_STATUS_SUCCESS ) {
        }

        IntCtrl_Ip_InstallHandler(LPSPI0_IRQn, Lpspi_Ip_LPSPI_0_IRQHandler, NULL_PTR);
        IntCtrl_Ip_EnableIrq(LPSPI0_IRQn);
 
    Lpspi_Ip_UpdateTransferMode(SLAVE_EXTERNAL_DEVICE.Instance, LPSPI_IP_INTERRUPT);
 
 
So, we are trying to communicate through Lpspi_Ip_AsyncTransmit.

However, correct data is not output through Lpspi_Ip_AsyncTransmit.

jwkang_0-1720503824948.png

Values ​​0x01, 0x02 ~ 0x20 are being transmitted as test values, but it appears that only the first 3 bytes are transmitted as correct values, and the rest are transmitted as garbage values.

jwkang_1-1720503953146.png

If there is anything you can help me with, please do so.

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue

Yes, I solved the problem by using RM.


In order to use DMA in SPI, dmamux must be used, but my project did not use mcal. Since there is no way to add dmamux in projects that do not use mcal in SDK components, I had no choice but to add mcal. I confirmed that it works well by registering dmamux in rm.

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue

Hi

Please refer to the Example S32K312 SPI Transmit & Receive Using DMA DS3.5 RTD300

Lpspi_Ip_AsyncTransmit is used in this project.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue

Thank you for the source code. I am referring to it.


Since our project doesn't use MCAL, we don't use Rm.


Is it necessary to use the Cache_Ip_InvalidateByAddr function?

Currently, I am transmitting using the Lpspi_Ip_AsyncTransmit function, but when I read it with Lpspi_Ip_GetStatus, LPSPI_IP_FIFO_ERROR occurs. Do you know how to resolve LPSPI_IP_FIFO_ERROR?

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue

I’m sorry for delayed response, we are heavily overloaded now.
Cache_Ip_InvalidateByAddr is for when DMA is used. If you don’t use DMA, then there is no need to call it.
If RTD 3.0.0 and DMA is used, then DMAMUX must be configured in Rm regardless of whether MCAL is used. (Rm->RmConfigSet->Dma Mux)
Would you please send me a simplified test project privately?

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issue

Install another C:\NXP\S32DS.3.5_RTD300 separately Then install RTD3.0.0.

Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issueBut I installed RTD4.0, and this routine was not foundRe: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issueIs there an SDK for RTD3.0 installed? Can it coexist with 4.0?Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issueCan you send me a sample code? I'm also working on a SPI project recently and have been having difficulties. I'd like to learn from it.
Re: s32k314 Lpspi_Ip_SyncTransmit and Lpspi_Ip_AsyncTransmit transmit issueCould you please send me the RTD3.0 file? I can't find it on the official website. Also, do you mean installing two S32DS software?
タグ(1)
評価なし
バージョン履歴
最終更新日:
‎01-06-2026 01:31 AM
更新者: