How to send continous audio data in I2S using Flexio in NXP S32K142/144.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to send continous audio data in I2S using Flexio in NXP S32K142/144.

跳至解决方案
822 次查看
Prerna_Nibe
Contributor I

Hello,

For my application, I want continous audio data transmitted to my amplifier to get continous sound. I am using S32K142/144 board. I am using Flexio for I2S communication. Please suggest which method should I follow to transfer data i.e., Polling, DMA or Interrupts. 

Currently I am using DMA method, data is getting transmitted but after each iteration of data transmission again clocks are reinitialize, due to this my amplifier is taking time to generate PWM signals. Please suggest proper method so that I can transfer continous data without any reinitialization.

0 项奖励
回复
1 解答
792 次查看
IsaulO
NXP Employee
NXP Employee

Hi @Prerna_Nibe ,


These methods are used for data transfer depending on the application, and each has its advantages and limitations.


For example:
• DMA is highly efficient for large data transfers, significantly reducing CPU workload, data transfer is constant and faster but setting up and debugging can be complex.
• Polling is simple to implement, but it is inefficient for high-speed tasks. It consumes more CPU time and power resources because the CPU must repeatedly check the status of the data transfer, even when no data is ready.
• Interrupts are great for time-sensitive tasks, they allows the CPU to perform other task between interruptions, but they add complexity and require careful handling to avoid overhead.

For continuous audio data transmission, DMA is typically the most suitable option it is scalable to high frequencies and large buffers and ensure that data transfer is constant and without interruption.


It is helpful to examine the data frame and clock signals to check for any gaps or timing inconsistencies during the process. If you can share the data frame or clock signals, I can help visualize and analyze any potential issues in the transfer process.


BR,
IsaulO. 

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
793 次查看
IsaulO
NXP Employee
NXP Employee

Hi @Prerna_Nibe ,


These methods are used for data transfer depending on the application, and each has its advantages and limitations.


For example:
• DMA is highly efficient for large data transfers, significantly reducing CPU workload, data transfer is constant and faster but setting up and debugging can be complex.
• Polling is simple to implement, but it is inefficient for high-speed tasks. It consumes more CPU time and power resources because the CPU must repeatedly check the status of the data transfer, even when no data is ready.
• Interrupts are great for time-sensitive tasks, they allows the CPU to perform other task between interruptions, but they add complexity and require careful handling to avoid overhead.

For continuous audio data transmission, DMA is typically the most suitable option it is scalable to high frequencies and large buffers and ensure that data transfer is constant and without interruption.


It is helpful to examine the data frame and clock signals to check for any gaps or timing inconsistencies during the process. If you can share the data frame or clock signals, I can help visualize and analyze any potential issues in the transfer process.


BR,
IsaulO. 

 

0 项奖励
回复
645 次查看
Prerna_Nibe
Contributor I

Thank you for your response.

Please find the attached image of time difference of gap.

 

In below image A and E are clock initialization gaps and B, C, D are call back gaps.

Time gap.png

0 项奖励
回复