DMA request0 to start DMA for LP_FLEXCOMM

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

DMA request0 to start DMA for LP_FLEXCOMM

1,110件の閲覧回数
klausfetscher
Contributor I

I am working with the FRDMMCX947 and MCUXpresso IDE v24.9

The DMA request 0 of SCT0 timer should start a DMA with data for the SPI interface LP_FLEXCOMM1. The data for the DMA is in the structure "lpspi_transfer_t masterXfer;" filed.

I didn't know, how to start this DMA. In another project with the LPC54618 I used the following commands:

Send_Tx_DMA_Handle.base->CHANNEL[SEND_TX_DMA_CHANNEL].CFG |= DMA_CHANNEL_CFG_HWTRIGEN(1) | DMA_CHANNEL_CFG_TRIGPOL(1);
SPI_MasterTransferDMA(SPI6, &Send_SPI_DMA_Handle, &masterXfer))


In the MCUXpresso SDK API Reference Manual I didn't find any description about the LPSPI_Master.... functions.

What are the corresponding functions for the MCXN947 ?


A manual start of the DMA with the function "LPSPI_MasterTransferEDMALite(EIA_RS_TX_LPSPI_BASE, g_s_edma_TxHandle, &masterXfer);" works well. 

 

Thanks

Klaus

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

1,052件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @klausfetscher 

The DMA implementation differs between the LPC54618 and the MCXN947, so please do not refer to the demos designed for the LPC54618. Instead, there is an SPI + DMA demo available in the MCXN947 SDK. Please refer to this demo.

Alice_Yang_0-1733306815055.png

 

BR

Alice

 

0 件の賞賛
返信

1,045件の閲覧回数
klausfetscher
Contributor I

Thanks for your answer.

We know this example and this part works already in our implementation. But we want to control the start of the DMA with Timer SCT0 without Software overhead.

Our problem is: How to link the DMA request 0 from Timer SCT0 to start the DMA for LP_FLEXCOMM1.

Klaus

 

  

0 件の賞賛
返信

940件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @klausfetscher 

The configuration steps are as follows:

  1. Configure SCT_DMA as a DMA channel request.
  2. Configure the SCT DMA request through the DMA Request 0 register.

I recommend using the Peripheral Tool within the MCUXpresso IDE to configure these settings. This tool can automatically generate the necessary code for you. If you prefer to write the code manually, you can still refer to the generated code as a guide.

Alice_Yang_0-1733826066593.png

Alice_Yang_2-1733826136474.png

 

 

 

BR

Alice

 

 

0 件の賞賛
返信