Skip to content

flash: add docs for user defined data #6373

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

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Mar 15, 2018

This should make some of the data more clear to a user

Description

Documentation update for flash algo CMSIS

Feedback received here #6318 (comment)

cc @li-ho

Pull request type

  • Fix
  • Refactor
  • New target
  • Feature
  • Breaking change

AnotherButler
AnotherButler previously approved these changes Mar 15, 2018
Copy link
Contributor

@AnotherButler AnotherButler left a comment

Choose a reason for hiding this comment

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

LGTM 👍

const uint32_t start;
const uint32_t size;
const uint32_t start; /**< Sector start address */
const uint32_t size; /**< Sector size */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

The typical range of size is between xxx and yyyy. It should not be less than xxx.

const uint32_t flash_size;
const sector_info_t *sectors;
const uint32_t sector_info_count;
const uint32_t page_size; /**< The minimum program page size */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

The typical range of page_size is between x and yy, and it should not be more than yy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Similar to sector size, how would upper and bottom limits help? I can list typical size, But that might be a better to include in the porting guide?

const sector_info_t *sectors;
const uint32_t sector_info_count;
const uint32_t page_size; /**< The minimum program page size */
const uint32_t flash_start; /**< Program page size */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

Is flash_start a 32 bit memory address like 0xabcdef98? Should it always be 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not always 0,, and yes 32bit address. How would you change the description?

typedef struct {
const uint32_t start;
const uint32_t size;
const uint32_t start; /**< Sector start address */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

Is start the start address of a flash memory block like 0x02000000? is it 32 bit address?

const uint32_t page_size; /**< The minimum program page size */
const uint32_t flash_start; /**< Program page size */
const uint32_t flash_size; /**< Flash size */
const sector_info_t *sectors; /**< List of sectors */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

Does *sectors contain a list of flash memory block sector info if these memory blocks don't have the same sector size?

Copy link
Contributor Author

@0xc0170 0xc0170 Mar 20, 2018

Choose a reason for hiding this comment

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

Yes, isn't that obvious from sector_info_t ? It defines sector size, and start

const uint32_t sector_info_count;
const uint32_t page_size; /**< The minimum program page size */
const uint32_t flash_start; /**< Program page size */
const uint32_t flash_size; /**< Flash size */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

Is flash_size in sizeof(char) or sizeof(int)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the question here?

const uint32_t flash_start; /**< Program page size */
const uint32_t flash_size; /**< Flash size */
const sector_info_t *sectors; /**< List of sectors */
const uint32_t sector_info_count; /**< Number of sectors */
Copy link

@li-ho li-ho Mar 15, 2018

Choose a reason for hiding this comment

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

The meanings of sector and page are so ambiguous unless you define the relationship among size , page_size and flash_size by an equation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added more info there

This should make some of the data more clear to a user
@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 20, 2018

I pushed an update to add more info to some members

@li-ho I think the level of detail you are looking for might be better for handbook, to describe what is sector, page , each size details ,etc.

Copy link

@li-ho li-ho left a comment

Choose a reason for hiding this comment

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

I have questions because I am a novice.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 21, 2018

I have questions because I am a novice.

👍 The code should provide details you can understand. Thanks for the feedback !

We got FlashIAP documentation plus flash HAL porting. I checked those, they do not touch the concept of what flash actually is (sectors vs page, write/read/erase - how they operate). This might be a good proposal for improvement. However, I do not think we cover the basic description of protocols, or drivers?
@AnotherButler what do you think?

@li-ho
Copy link

li-ho commented Mar 22, 2018

In the document http://www.analog.com/media/en/technical-documentation/application-notes/EE381v01.pdf
the page it talks about is exactly sector here. You are welcome to clarify the overused jargon
which cannot be misunderstood in your context.

@AnotherButler
Copy link
Contributor

@0xc0170 This sounds like great content for the Handbook. I'll create a task to complete this. Can I assign it to you, or can you recommend someone who can work on the content with me?

@0xc0170 0xc0170 requested a review from c1728p9 March 23, 2018 18:12
@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 26, 2018

@AnotherButler Happy with the docs changes here?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 26, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 26, 2018

Build : SUCCESS

Build number : 1574
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6373/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 26, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 26, 2018

@adbridge adbridge merged commit 773fb90 into ARMmbed:master Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants