rf2500: separate reset and run on exit.
This was causing a problem with the MSP430FR5739. Exiting and restarting mspdebug would cause the reset vector (0xfffe) to be overwritten with 0xff 0xff. This didn't happen if you repowered the board between the exit and restart.
This commit is contained in:
parent
e02567a712
commit
0e5c38231b
|
@ -768,9 +768,12 @@ static void fet_destroy(device_t dev_base)
|
||||||
{
|
{
|
||||||
struct fet_device *dev = (struct fet_device *)dev_base;
|
struct fet_device *dev = (struct fet_device *)dev_base;
|
||||||
|
|
||||||
if (xfer(dev, C_RESET, NULL, 0, 3, FET_RESET_ALL, 1, 1) < 0)
|
if (xfer(dev, C_RESET, NULL, 0, 3, FET_RESET_ALL, 0, 0) < 0)
|
||||||
printc_err("fet: final reset failed\n");
|
printc_err("fet: final reset failed\n");
|
||||||
|
|
||||||
|
if (xfer(dev, C_RUN, NULL, 0, 2, FET_RUN_FREE, 0) < 0)
|
||||||
|
printc_err("fet: failed to restart CPU\n");
|
||||||
|
|
||||||
if (xfer(dev, C_CLOSE, NULL, 0, 1, 0) < 0)
|
if (xfer(dev, C_CLOSE, NULL, 0, 1, 0) < 0)
|
||||||
printc_err("fet: close command failed\n");
|
printc_err("fet: close command failed\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue