Skip to content

STM32F723 does not trigger HAL_PCD_DataOutStageCallback for USB Audio on Windows #8

Closed
@fxtentacle

Description

@fxtentacle

Dear STM team,

When I created a new STM32F723ZETx project (FW v1.17.2) with STM32CubeMx and selected USB audio, then it worked nicely on Linux, but AUDIO_PeriodicTC_HS was never called on Windows. I've verified that Windows is sending isochronous audio packets, which means the problem is caused by the STM32 HAL not triggering the appropriate callbacks despite the hardware receiving the data.

My impression is that this line:

https://github.com/STMicroelectronics/stm32f7xx_hal_driver/blob/52bfa97ba66afc08481f6fd7631322593bd89691/Src/stm32f7xx_hal_pcd.c#L1377

is trying to verify that the even/odd flag inside DOEPCTL is matching with the current frame number's parity. If that is the intention, then instead of

((RegVal & (0x1U << 16)) == (hpcd->FrameNumber & 0x1U)))

it should read

(((RegVal & (0x1U << 16)) != 0) == (hpcd->FrameNumber & 0x1U)))

because we want to check if the EONUM bit is set and not check for its absolute value. And, indeed, that small change repairs the HAL_PCD_DataOutStageCallback on Windows 😃

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghalHAL-LL driver-related issue or pull-request.internal bug trackerIssue confirmed and logged into the internal bug tracking systemusbUniversal Serial Bus

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions