Browse Source

cc2538 algo: fix erase check

Change-Id: Ib7d1ccd00f60994b2e74c7f7f28536d8a0c2905d
jim
Jim Paris 2 years ago
committed by Jim Paris <jim@jim.sh>
parent
commit
179243fe5e
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      contrib/loaders/flash/cc2538/cc2538_algo.inc
  2. +1
    -1
      contrib/loaders/flash/cc2538/flash.c

+ 4
- 4
contrib/loaders/flash/cc2538/cc2538_algo.inc View File

@@ -49,16 +49,16 @@
0x02,0x43,0x19,0x7b,0x18,0x73,0x59,0x7b,0x58,0x73,0x99,0x7b,0x82,0xf0,0x01,0x02,
0x98,0x73,0xd9,0x7b,0x3a,0x60,0xd8,0x73,0xca,0xe7,0x00,0xbf,0x00,0x24,0x00,0x20,
0x00,0x1c,0x00,0x20,0xd8,0x1b,0x00,0x20,0x38,0x0c,0x00,0x20,0xfe,0xe7,0x00,0x00,
0x08,0xb5,0x00,0x23,0x1a,0x58,0x01,0x32,0x0f,0xd1,0x01,0x33,0xb3,0xf5,0x00,0x7f,
0x08,0xb5,0x00,0x23,0x1a,0x58,0x01,0x32,0x0f,0xd1,0x04,0x33,0xb3,0xf5,0x00,0x6f,
0xf8,0xd1,0x00,0x20,0x08,0xbd,0x82,0x1c,0x04,0xd0,0x00,0x28,0xf9,0xd0,0x40,0xf2,
0x03,0x10,0xf7,0xe7,0x4f,0xf4,0x81,0x70,0xf4,0xe7,0x05,0x4b,0x4f,0xf4,0x00,0x61,
0x1b,0x68,0xdb,0x68,0x98,0x47,0x43,0x1c,0xed,0xd1,0x40,0xf2,0x01,0x10,0xe9,0xe7,
0xd8,0x06,0x00,0x20,0x70,0xb5,0x0a,0x4b,0x00,0x24,0x1b,0x68,0x5b,0x68,0x98,0x47,
0xc5,0x0a,0x05,0xf2,0xff,0x36,0xa5,0x42,0x01,0xd1,0x00,0x20,0x06,0xe0,0x30,0x1b,
0xc0,0x02,0xff,0xf7,0xcd,0xff,0x01,0x34,0x00,0x28,0xf4,0xd0,0x70,0xbd,0x00,0xbf,
0xd8,0x06,0x00,0x20,0x08,0xb5,0x0a,0x4b,0x92,0x08,0x1b,0x68,0x1b,0x69,0x98,0x47,
0x42,0x1c,0x07,0xd0,0x83,0x1c,0x08,0xd0,0x00,0x28,0x14,0xbf,0x4f,0xf4,0x83,0x70,
0x00,0x20,0x08,0xbd,0x4f,0xf4,0x82,0x70,0xfb,0xe7,0x40,0xf2,0x05,0x10,0xf8,0xe7,
0xd8,0x06,0x00,0x20,0x08,0xb5,0x0a,0x4b,0x1b,0x68,0x1b,0x69,0x98,0x47,0x42,0x1c,
0x07,0xd0,0x83,0x1c,0x08,0xd0,0x00,0x28,0x14,0xbf,0x4f,0xf4,0x83,0x70,0x00,0x20,
0x08,0xbd,0x4f,0xf4,0x82,0x70,0xfb,0xe7,0x40,0xf2,0x05,0x10,0xf8,0xe7,0x00,0xbf,
0xd8,0x06,0x00,0x20,0x10,0xb5,0x01,0x00,0x00,0x23,0x00,0x22,0x00,0x20,0x00,0xf0,
0xb1,0xf8,0x10,0xbc,0x02,0xbc,0x08,0x47,0x10,0xb5,0x00,0x21,0x04,0x00,0x00,0xf0,
0xef,0xf8,0x05,0x4b,0x18,0x68,0xc3,0x6b,0x00,0x2b,0x01,0xd0,0x00,0xf0,0x06,0xf8,


+ 1
- 1
contrib/loaders/flash/cc2538/flash.c View File

@@ -55,7 +55,7 @@ extern uint32_t flash_sector_erase(uint32_t sector_address)
bool already_erased = true;
int i;

for (i = 0; i < FLASH_ERASE_SIZE / 4; i++) {
for (i = 0; i < FLASH_ERASE_SIZE; i += 4) {
if ((*(uint32_t *)(sector_address + i)) != 0xffffffff) {
already_erased = false;
break;


Loading…
Cancel
Save