Skip to content

NXP I2S using DMA never completes  #87239

Open
@JoeyFreeland-DojoFive

Description

@JoeyFreeland-DojoFive

Describe the bug
I am trying to get the i2s output example working on a board I created, based off of the frdm_rw612 board. During execution I see that the request is going out on DMA1. It never completes and the program hangs. I set breakpoints in the I2S driver (i2s_mcux_flexcomm.c) and also the DMA driver (dma_mcux_lpc) and I never see any DMA callbacks being called. I am thinking there could a secure/non-secure mode issue here? Not sure.

To Reproduce
Build and run the samples/i2s/output example for frdm_rw612, with an I2S interface on flexcomm0 (I also tested flexcomm1 and got the same results.

Expected Behavior
No I2S output appears on the output pins, and observe the serial log and see that <err> i2s_mcux_flexcomm: k_msgq_put failed -11 is printed, indicating that no I2S data is being written and the queue is full.

Impact
I2S driver fails to operate.

Logs and console output

[00:01:09.381,875] <dbg> dma_mcux_lpc: dma_mcux_lpc_configure: channel is 1
[00:01:09.391,459] <dbg> dma_mcux_lpc: dma_mcux_lpc_configure: INSTALL call back on channel 1
[00:01:09.402,580] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: dma_slot is 0
[00:01:09.413,050] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: channel_direction is 1
[00:01:09.424,312] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: complete_callback_en is 0
[00:01:09.435,839] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: error_callback_dis is 0
[00:01:09.447,189] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: source_handshake is 0
[00:01:09.458,367] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: dest_handshake is 0
[00:01:09.469,363] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: channel_priority is 0
[00:01:09.480,540] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: source_chaining_en is 0
[00:01:09.491,892] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: dest_chaining_en is 0
[00:01:09.503,069] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: linked_channel is 0
[00:01:09.514,069] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: source_data_size is 4
[00:01:09.525,245] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: dest_data_size is 4
[00:01:09.536,245] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: source_burst_length is 0
[00:01:09.547,683] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: dest_burst_length is 0
[00:01:09.558,946] <dbg> i2s_mcux_flexcomm: i2s_mcux_config_dma_blocks: block_count is 1
[00:01:09.569,694] <dbg> dma_mcux_lpc: dma_mcux_lpc_start: START TRANSFER
[00:01:09.579,100] <dbg> dma_mcux_lpc: dma_mcux_lpc_start: DMA CTRL 0x1
[00:01:11.588,406] <err> i2s_mcux_flexcomm: k_msgq_put failed -11

If able to view specific registers, you can verify that the proper channel is active, but not busy. And no interrupts pending.

Environment
Zephyr v4.1.0, built on macOS

Metadata

Metadata

Labels

bugThe issue is a bug, or the PR is fixing a bugplatform: NXPNXPpriority: lowLow impact/importance bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions