Browse Source

NRF5: Do not reset target options.

pull/639/head
Uwe Bonnes 5 years ago
committed by UweBonnes
parent
commit
164eb43f00
  1. 4
      src/target/nrf51.c

4
src/target/nrf51.c

@ -127,7 +127,6 @@ bool nrf51_probe(target *t)
if ((uid0 == 0xffffffff) || (uid1 == 0xffffffff) || if ((uid0 == 0xffffffff) || (uid1 == 0xffffffff) ||
(uid0 == 0) || (uid1 == 0)) (uid0 == 0) || (uid1 == 0))
return false; return false;
t->target_options |= CORTEXM_TOPT_INHIBIT_SRST;
/* Test for NRF52 device*/ /* Test for NRF52 device*/
uint32_t info_part = target_mem_read32(t, NRF52_PART_INFO); uint32_t info_part = target_mem_read32(t, NRF52_PART_INFO);
if ((info_part != 0xffffffff) && (info_part != 0) && if ((info_part != 0xffffffff) && (info_part != 0) &&
@ -135,6 +134,7 @@ bool nrf51_probe(target *t)
uint32_t ram_size = target_mem_read32(t, NRF52_INFO_RAM); uint32_t ram_size = target_mem_read32(t, NRF52_INFO_RAM);
t->idcode = info_part; t->idcode = info_part;
t->driver = "Nordic nRF52"; t->driver = "Nordic nRF52";
t->target_options |= CORTEXM_TOPT_INHIBIT_SRST;
target_add_ram(t, 0x20000000, ram_size * 1024); target_add_ram(t, 0x20000000, ram_size * 1024);
nrf51_add_flash(t, 0, page_size * code_size, page_size); nrf51_add_flash(t, 0, page_size * code_size, page_size);
nrf51_add_flash(t, NRF51_UICR, page_size, page_size); nrf51_add_flash(t, NRF51_UICR, page_size, page_size);
@ -146,12 +146,12 @@ bool nrf51_probe(target *t)
* IDCODE is kept as '0', as deciphering is hard and * IDCODE is kept as '0', as deciphering is hard and
* there is later no usage.*/ * there is later no usage.*/
target_add_ram(t, 0x20000000, 0x8000); target_add_ram(t, 0x20000000, 0x8000);
t->target_options |= CORTEXM_TOPT_INHIBIT_SRST;
nrf51_add_flash(t, 0, page_size * code_size, page_size); nrf51_add_flash(t, 0, page_size * code_size, page_size);
nrf51_add_flash(t, NRF51_UICR, page_size, page_size); nrf51_add_flash(t, NRF51_UICR, page_size, page_size);
target_add_commands(t, nrf51_cmd_list, "nRF51"); target_add_commands(t, nrf51_cmd_list, "nRF51");
return true; return true;
} }
t->target_options = 0;
return false; return false;
} }

Loading…
Cancel
Save