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

🐛 Fix hangs in DUE native USB #26572

Merged
Prev Previous commit
Next Next commit
more active voice
  • Loading branch information
thinkyhead committed Jan 4, 2024
commit 4ecfb8c1a4c2ba3bdec67e07bd9838e9707e2a5c
18 changes: 9 additions & 9 deletions Marlin/src/HAL/DUE/usb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@

## Source

The USB files in this project were sourced from the Atmel ASF (Advanced Software Framework). The framework provides a variety of examples, which were utilized in this project.
We sourced the USB files in Marlin from the Atmel ASF (Advanced Software Framework). The framework provides a variety of examples which were utilized in this project.

Atmel does not provide these files in a source repository, but they can be extracted from ASF, which can be downloaded from Atmel.
Atmel doesn't provide these files in a source repository but they can be extracted from ASF, which can be downloaded from Atmel.

[Advanced Software Framework](https://www.microchip.com/en-us/tools-resources/develop/libraries/advanced-software-framework)

## Modifications

While the files are mostly unmodified except for minor cosmetic changes, some more significant changes have been required.
The files are mostly unmodified except for minor cosmetic changes but some more significant changes were needed.

The change which prompted the addition of this file is below. Other changes may have been made prior to this.
The changes that prompted the addition of this README file are listed below. Other changes may have been made prior to this.

1. uotghs_device_due.c was modified to resolve race conditions which could leave interrupts asserted when freezing the peripheral clock. This resulted in hangs and watchdog resets due to the ensuing interrupt storm.
1. Modified `uotghs_device_due.c` to resolve race conditions that could leave interrupts asserted when freezing the peripheral clock, resulting in hangs and watchdog resets due to the ensuing interrupt storm.

## Version Information

The exact version of ASF used as the source is currently unknown. However, the copyright information in the files indicates they are from the year 2015.
We don't know the exact version of ASF used as the source. However, the copyright information in the files indicates they are from 2015.

## Upgrade Considerations

A comparison was made with the ASF 3.52.0 files released in 2022. No immediate benefits were identified that would justify an upgrade. It's important to note that the files in Marlin do not follow the same folder structure as the files in ASF, which complicates the process of comparing and consuming updated files.
We looked at the ASF 3.52.0 files released in 2022 but saw no immediate benefits to justify an upgrade. It's important to note that the files in Marlin don't follow the same folder structure as the files in ASF, which complicates the process of comparing and applying updated files.

When these files are updated, it is important that they are carefully compared to those in Marlin, to migrate forward any improvements made in the Marlin source code.
When these files are updated it's important to carefully compare them to Marlin's versions so any improvements in the Marlin sources are brought forward.

It would be best if the Marlin directory structure could be made to align with the ASF structure, or to at least document the source of each file to ease future updates.
It would be best to make Marlin's directory structure align with ASF or at least document the source of each file to ease future updates.