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:
Daniel Beer 2012-08-01 11:32:19 +12:00
parent e02567a712
commit 0e5c38231b
1 changed files with 4 additions and 1 deletions

View File

@ -768,9 +768,12 @@ static void fet_destroy(device_t 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");
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)
printc_err("fet: close command failed\n");