Skip to content

Add SOF support for ST Synopsys port #1685

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

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,16 +1136,14 @@ void dcd_int_handler(uint8_t rhport) {

if(int_status & GINTSTS_SOF) {
dwc2->gintsts = GINTSTS_SOF;
const uint32_t frame = (dwc2->dsts & DSTS_FNSOF) >> DSTS_FNSOF_Pos;

if (_sof_en) {
uint32_t frame = (dwc2->dsts & (DSTS_FNSOF)) >> 8;
dcd_event_sof(rhport, frame, true);
} else {
// Disable SOF interrupt if SOF was not explicitly enabled. SOF was used for remote wakeup detection
// Disable SOF interrupt if SOF was not explicitly enabled since SOF was used for remote wakeup detection
if (!_sof_en) {
dwc2->gintmsk &= ~GINTMSK_SOFM;
}

dcd_event_bus_signal(rhport, DCD_EVENT_SOF, true);
dcd_event_sof(rhport, frame, true);
}

// RxFIFO non-empty interrupt handling.
Expand Down
Loading