Skip to content

Conversation

@Lohrer
Copy link

@Lohrer Lohrer commented Oct 19, 2019

For an Arduino Due with EEFC flash, setting the boot flash bit doesn't complete before a reset is performed. This makes it impossible to get the SAM device out of bootloader mode. Adding a simple check that flash operations are done after committing them fixes the issue.

Note, to program my Due from Ubuntu also requires #78 to get the 1200 baud reset working.

@shumatech
Copy link
Owner

The paradigm in the Flash classes is to wait for completion before performing the next operation to better pipeline commands. If there is a dependency that all flash operations must be complete prior to execution of a reset, then that dependency should be handled at a higher level. For example, change bossa.c to:

if (config.reset) {
// Ensure flash operation are complete prior to reset
flash->ready();
device.reset();
}

You'll need to add the ready() method to the Flash base class and implement it in each concrete class.

@Lohrer
Copy link
Author

Lohrer commented Aug 17, 2021

Closing this PR in favor of #151 which implements the correct Flash paradigm, as suggested above by @shumatech.

@Lohrer Lohrer closed this Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants