Commit c65f7cf2 authored by ntfreak's avatar ntfreak
Browse files

- added check for revA silicon in stm32 flash driver

git-svn-id: svn://svn.berlios.de/openocd/trunk@294 b42882b7-edfa-0310-969c-e2dbd0fdcd60
parent 2a0317e6
......@@ -660,6 +660,15 @@ int stm32x_probe(struct flash_bank_s *bank)
/* get flash size from target */
target_read_u16(target, 0x1FFFF7E0, &num_sectors);
/* check for early silicon rev A */
if ((device_id >> 16) == 0 )
{
/* number of sectors incorrect on revA */
WARNING( "STM32 Rev A Silicon detected, probe inaccurate - assuming 128k flash" );
num_sectors = 128;
}
INFO( "flash size = %dkbytes", num_sectors );
bank->base = 0x08000000;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment