Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto reboot (with -control options) #19

Open
vanbwodonk opened this issue May 27, 2016 · 1 comment
Open

Auto reboot (with -control options) #19

vanbwodonk opened this issue May 27, 2016 · 1 comment

Comments

@vanbwodonk
Copy link

I think is easier if the chip do auto reboot after finishing downloading. Is it possible? Maybe i miss some options to do that. I did little hack for auto reboot. More like Arduino now.

In lpc21isp.c line 2402
`

ifdef LPC_SUPPORT

    case NXP_ARM:
        downloadResult = NxpDownload(IspEnvironment);
        ResetTarget(IspEnvironment, RUN_MODE);
        break;

endif

`
Adding ResetTarget(IspEnvironment, RUN_MODE) after download is done.

@domenpk
Copy link

domenpk commented Nov 22, 2016

This should already happen (and does happen for me).

Is something failing for you? How are you using lpc21isp?

#ifdef LPC_SUPPORT
        case NXP_ARM:
            downloadResult = NxpDownload(IspEnvironment);
            break;
#endif

#ifdef AD_SUPPORT
        case ANALOG_DEVICES_ARM:
            downloadResult = AnalogDevicesDownload(IspEnvironment);    // <-- download happens here
            break;
#endif
        }

        if (downloadResult != 0)     // <-- does it maybe fail for you?
        {
            CloseSerialPort(IspEnvironment);
            exit(downloadResult);
        }
    }

    if (IspEnvironment->StartAddress == 0 || IspEnvironment->TerminalOnly)   // <-- do these checks fail for you?
    {
        /* Only reset target if startaddress = 0
        * Otherwise stay with the running program as started in Download()
        */
        ResetTarget(IspEnvironment, RUN_MODE);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants