Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev add i2s stm32h5 #72990

Merged
merged 8 commits into from
May 28, 2024
Merged

Conversation

marwaiehm-st
Copy link
Collaborator

@marwaiehm-st marwaiehm-st commented May 19, 2024

Add the STM32H5 family support for the test I2s_speed.
The driver is updated to handle correctly the commands TRIGGER_DRAIN.

@erwango
Copy link
Member

erwango commented May 20, 2024

@jeppenodgaard ^^

drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
dts/arm/st/h5/stm32h5.dtsi Outdated Show resolved Hide resolved
dts/arm/st/h5/stm32h5.dtsi Outdated Show resolved Hide resolved
dts/arm/st/h5/stm32h5.dtsi Outdated Show resolved Hide resolved
dts/arm/st/h5/stm32h5.dtsi Outdated Show resolved Hide resolved
dts/arm/st/h5/stm32h5.dtsi Show resolved Hide resolved
tests/drivers/i2s/i2s_speed/boards/stm32h573i_dk.overlay Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
@zephyrbot zephyrbot added the area: Devicetree Binding PR modifies or adds a Device Tree binding label May 21, 2024
@zephyrbot zephyrbot requested review from decsny and galak May 21, 2024 16:14
@decsny decsny removed their request for review May 21, 2024 19:01
drivers/dma/dma_stm32u5.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.h Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.h Outdated Show resolved Hide resolved
Addition of I2S nodes

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Test on STM32H573i disco board , only the Tx transfer is ok.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM.
A few points to review:

drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're getting there! A few points to iron out:

drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny non-blockers, otherwise LGTM.

Nit: stream->last_block seems to have become a dead variable, could used to be removed if so.

drivers/i2s/i2s_ll_stm32.c Outdated Show resolved Hide resolved
drivers/i2s/i2s_ll_stm32.c Show resolved Hide resolved
Add flag STM32_DMA_16BITS as a combination of
STM32_DMA_PERIPH_16BITS and STM32_DMA_MEM_16BITS

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
In i2s_stm32_isr, remove the errors from SR register
   i2s_stm32_configure, enable the rx path for H7 I2S compatible IP

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
In dma_stm32_reload, the size is the number of bytes and not number
of elements.

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add the function ll_func_i2s_dma_busy to be able to check the
transmission of all the DMA TX packet.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
francktheb and others added 2 commits May 27, 2024 17:26
Correction of the handling of Tx audio samples via DMA

Signed-off-by: Franck Thebault <franck.thebault@st.com>
Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Add a k_busy_wait to the function tx_stream_disable
to be able to complete the drain of the TX queue before disabling.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
Copy link
Collaborator

@mathieuchopstm mathieuchopstm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@aescolar aescolar merged commit fdd6627 into zephyrproject-rtos:main May 28, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: DMA Direct Memory Access area: I2S platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants