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

Target is left in ICP mode after reading flash #153

Open
allanwmacdonald opened this issue Sep 27, 2022 · 1 comment
Open

Target is left in ICP mode after reading flash #153

allanwmacdonald opened this issue Sep 27, 2022 · 1 comment

Comments

@allanwmacdonald
Copy link

allanwmacdonald commented Sep 27, 2022

I've been playing around with this tool with an STM8L101F3U on a little project board connected to an ST-LINK V2.

If I read a portion of memory, the target stops working. If I program the hex file again, the target starts to work.

The target board is powered with a power supply, not the ST-LINK V2 by itself.

If, after reading, I disconnect the power and the USB, and plug the power back in again, the target starts to work.

I browsed around the code and found the following code snippet:

if(pgm->reset) {
// Restarting core (if applicable)
pgm->reset(pgm);
}

and if I add this snippet to the end of each of the read operations (lines 512 and 553 of main.c), the problem goes away.

Thank you for this wonderful project. I hope my comments will contribute to its success.

Cheers,
Allan

@schneidersoft
Copy link
Contributor

I suggest that there is an additional option added to allow the direct control of the reset line. in some workflows it is necessary to leave the device under reset after flashing is done. I can add/test this feature. can we align on the desired behavior?

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