Send data with flexI2S via continious DMA. (S32K116)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Send data with flexI2S via continious DMA. (S32K116)

Jump to solution
1,092 Views
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 Kudos
Reply
1 Solution
1,038 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
1,039 Views
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 Kudos
Reply
978 Views
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 Kudos
Reply