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: Allow target size restriction for LPC55S69 #10792

Merged
merged 1 commit into from Jun 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion targets/targets.json
Expand Up @@ -2058,7 +2058,8 @@
"detect_code": ["0236"],
"device_name": "LPC55S69JBD100",
"release_versions": ["5"],
"program_cycle_s": 10
"program_cycle_s": 10,
"sectors": [[0,512]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page erase is defined at 256 byte in
https://www.nxp.com/docs/en/user-guide/UM11126.pdf (page 3)
So 512 will work but we could optimise further.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you. However, @offirko left the following comment on the internal ticket:

Jimmy Brisson - please note that while LPC55S69 has 32KB sector size, it supports 512-bytes Page Erase command (subsectors).

When target's erase sector size is queried it returns Page Erase size of 512-bytes. (this is the value eventually used by FlashIAP block device,..etc)

uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)

Could we change the sector size defined at index.json to 512-bytes ?

I would prefer to leave it as 512 bytes to avoid introducing potential bugs. This is unless we also want to change the define for the flash page size. @evedon Please advise.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do this change now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page erase is defined at 256 byte in
https://www.nxp.com/docs/en/user-guide/UM11126.pdf (page 3)
So 512 will work but we could optimise further.

This is a documentation error. Program and erase size is 512, thank you for finding this. We have raised an issue with the documentation team to correct this.

},
"LPC55S69_NS": {
"inherits": ["NSPE_Target", "LPC55S69"],
Expand Down