> Looking through the comments, this is the logic that is used to determine 
> sector sizes:
> 
>  * Although not documented as such by Freescale, it appears that bits
>  * 8:7 of the read-only SIM_SDID register reflect the granularity
>  * settings 0..3, so sector sizes and block counts are applicable
>  * according to the following table.
>  */
> const struct {
>     unsigned pflash_sector_size_bytes;
>     unsigned nvm_sector_size_bytes;
>     unsigned num_blocks;
> } kinetis_flash_params[4] = {
>     { 1<<10, 1<<10, 2 },
>     { 2<<10, 1<<10, 2 },
>     { 2<<10, 2<<10, 2 },
>     { 4<<10, 4<<10, 4 }
> };
> 
> On the part that I'm using, bits 8:7 of SDID are '11' pointing to 4kb sector 
> sizes.

The code was developed primarily for Kinetis 'K' series parts.  I exhaustively 
looked at every K-series data sheet to make the table, but did not look into 
the other Kinetis series (some of which have been introduced since).

It's possible the 'L' series parts need their own table.  There could be 
differences in the flash controller too, so we'll have to be careful not to 
break K-series support.

Chris Kilgour

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to