Send data with flexI2S via continious DMA. (S32K116)

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

Send data with flexI2S via continious DMA. (S32K116)

ソリューションへジャンプ
940件の閲覧回数
Furkan07
Contributor II

Hi, I trying data send with dma as a scatter/gather. My purpose is to send data(for example a 120-byte array) with flexI2S. 
I want dma to send the same array again when 120 bytes are finished automatically without any triggering in the loop while.

I reviewed the "edma_transfer_s32k146" project on S32DS. The project was not configured to send data from the flex module.
I cannot do what I am trying to do by setting the scatterGatherEnable variable to true and giving the scatterGatherNextDescAddr the address of the directory.

What do you think is missing in this program for what I want to do? (Does S32K116 processor have any restrictions to do this? Do you have a sample project that does this? It doesn't matter if it's FlexI2C, FlexSPI or something.)

In addition, I added configuration to flex module, like this: 

const flexio_i2s_master_user_config_t flexio_i2s1_MasterConfig0 = {
  .driverType = FLEXIO_DRIVER_TYPE_DMA,
  .baudRate = 725000UL,
  .bitsWidth = 8U,
  .txPin = 4U, //PTD2
  .rxPin = 5U, //PTD3
  .sckPin = 0U, //PTD0
  .wsPin = 1U, //PTD1
  .callback = NULL,
  .callbackParam = NULL,
  .rxDMAChannel = 1U,
  .txDMAChannel = 0U
};

 

Also, if I send the data with the "FLEXIO_I2S_DRV_MasterSendData" function after checking via FLEXIO_I2S_DRV_MasterGetStatus() in the while loop, the flex module sends the data successfully. But what I need is to create a seamless I2S clock signal.

0 件の賞賛
返信
1 解決策
886件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Furkan07,

Although the FlexIO SDK driver does not support it, the DMA channel can be triggered again at the end of the Major loop.

TCDn_CSR[MAJORLINKCH] can be set the n channel.

danielmartynek_0-1680185221412.png

 

 

Regards,

Daniel

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
887件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @Furkan07,

Although the FlexIO SDK driver does not support it, the DMA channel can be triggered again at the end of the Major loop.

TCDn_CSR[MAJORLINKCH] can be set the n channel.

danielmartynek_0-1680185221412.png

 

 

Regards,

Daniel

0 件の賞賛
返信
826件の閲覧回数
Furkan07
Contributor II

Yes, you are right. I was able re-trigger the DMA channel when the DMA data send finished for creating a continuous DMA transmission. Result; (blue: clk, yellow: data)

FurkanYildirim_0-1680877774027.png

But it took some time to figure out how to do it. Even the simple process of sending a string continuously requires reading quite a few resources on the minor loop and the major loop. The fact that NXP doesn't do it as simply as in CUBE MX is challenging for NXP beginners.

CubeMX_circular_DMA.png

@danielmartynek, Thank you for the reply.

0 件の賞賛
返信