-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Conversation
There was a problem hiding this 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 */ |
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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)
?
There was a problem hiding this comment.
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 */ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
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. |
There was a problem hiding this 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.
👍 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? |
In the document http://www.analog.com/media/en/technical-documentation/application-notes/EE381v01.pdf |
@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? |
@AnotherButler Happy with the docs changes here? |
/morph build |
Build : SUCCESSBuild number : 1574 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1214 |
Test : SUCCESSBuild number : 1366 |
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