diff options
| -rw-r--r-- | embassy-stm32/src/usb/usb.rs | 10 | ||||
| -rw-r--r-- | embassy-usb/src/class/uac1/speaker.rs | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/embassy-stm32/src/usb/usb.rs b/embassy-stm32/src/usb/usb.rs index 24983cf3c..6682374d3 100644 --- a/embassy-stm32/src/usb/usb.rs +++ b/embassy-stm32/src/usb/usb.rs | |||
| @@ -887,6 +887,16 @@ impl<'d, T: Instance> driver::EndpointOut for Endpoint<'d, T, Out> { | |||
| 887 | }) | 887 | }) |
| 888 | .await; | 888 | .await; |
| 889 | 889 | ||
| 890 | // Errata for STM32H5, 2.20.1: | ||
| 891 | // During OUT transfers, the correct transfer interrupt (CTR) is triggered a little before the last USB SRAM accesses | ||
| 892 | // have completed. If the software responds quickly to the interrupt, the full buffer contents may not be correct. | ||
| 893 | // | ||
| 894 | // Workaround: | ||
| 895 | // Software should ensure that a small delay is included before accessing the SRAM contents. This delay should be | ||
| 896 | // 800 ns in Full Speed mode and 6.4 μs in Low Speed mode. | ||
| 897 | #[cfg(stm32h5)] | ||
| 898 | embassy_time::block_for(embassy_time::Duration::from_nanos(800)); | ||
| 899 | |||
| 890 | RX_COMPLETE[index].store(false, Ordering::Relaxed); | 900 | RX_COMPLETE[index].store(false, Ordering::Relaxed); |
| 891 | 901 | ||
| 892 | if stat == Stat::DISABLED { | 902 | if stat == Stat::DISABLED { |
diff --git a/embassy-usb/src/class/uac1/speaker.rs b/embassy-usb/src/class/uac1/speaker.rs index 25de25d9c..1ff29088c 100644 --- a/embassy-usb/src/class/uac1/speaker.rs +++ b/embassy-usb/src/class/uac1/speaker.rs | |||
| @@ -348,7 +348,7 @@ pub struct AudioSettings { | |||
| 348 | impl Default for AudioSettings { | 348 | impl Default for AudioSettings { |
| 349 | fn default() -> Self { | 349 | fn default() -> Self { |
| 350 | AudioSettings { | 350 | AudioSettings { |
| 351 | muted: [true; MAX_AUDIO_CHANNEL_COUNT], | 351 | muted: [false; MAX_AUDIO_CHANNEL_COUNT], |
| 352 | volume_8q8_db: [MAX_VOLUME_DB * VOLUME_STEPS_PER_DB; MAX_AUDIO_CHANNEL_COUNT], | 352 | volume_8q8_db: [MAX_VOLUME_DB * VOLUME_STEPS_PER_DB; MAX_AUDIO_CHANNEL_COUNT], |
| 353 | } | 353 | } |
| 354 | } | 354 | } |
