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

Bugfix: LPC1768 IAP could not copy flash to flash #156

Merged
merged 5 commits into from Apr 27, 2023

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Apr 12, 2023

Summary of changes

This fixes an issue reported on the forums here: https://forums.mbed.com/t/limitation-of-flash-iap-for-lpc176x-flashing-from-ram-only/19892

The LPC1768's FlashIAP implementation could not successfully copy flash data to flash. Now, I adapted the existing RAM buffer scheme in the driver to fix this issue. I also did a general cleanup of the lpc1768 flash code, including replacing the magic 1024 number with the page size, and fixing the reported deadlock issue if an operation fails (missed core_util_critical_section_exit() calls).

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

See comment below


@multiplemonomials
Copy link
Collaborator Author

multiplemonomials commented Apr 26, 2023

Ran tests:

96% tests passed, 3 tests failed out of 72

Total Test time (real) = 1435.25 sec

The following tests did not run:
	  8 - mbed-hal-crc (Skipped)
	 11 - mbed-hal-lp-ticker (Skipped)
	 14 - mbed-hal-ospi (Skipped)
	 16 - mbed-hal-qspi (Skipped)
	 27 - mbed-hal-trng (Skipped)
	 32 - mbed-hal-verify-arduino-pinmap (Skipped)
	 43 - mbed-platform-crash-reporting (Skipped)
	 53 - mbed-platform-stats-cpu (Skipped)
	 54 - mbed-platform-stats-heap (Skipped)
	 55 - mbed-platform-stats-sys (Skipped)
	 56 - mbed-platform-stats-thread (Skipped)
	 71 - mbed-connectivity-nfc-eeprom (Skipped)

The following tests FAILED:
	  5 - mbed-usb-device-serial (Failed)
	 65 - mbed-rtos-mutex (Failed)
	 67 - mbed-rtos-semaphore (Failed)

Note that the new flash test is passing!

@multiplemonomials multiplemonomials changed the title [draft] Bugfix: LPC1768 IAP could not copy flash to flash Bugfix: LPC1768 IAP could not copy flash to flash Apr 26, 2023
@multiplemonomials multiplemonomials merged commit 9c65ad9 into master Apr 27, 2023
9 checks passed
@multiplemonomials multiplemonomials deleted the bugfix/fix-lpc1768-copy-flash-to-flash branch April 27, 2023 02:20
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.

None yet

2 participants