Giter Site home page Giter Site logo

Incorrect reset behaviour about probe-rs HOT 6 OPEN

jeriksson621 avatar jeriksson621 commented on June 21, 2024
Incorrect reset behaviour

from probe-rs.

Comments (6)

Yatekii avatar Yatekii commented on June 21, 2024

I am not really sure where this behavior is coming from, but did you make sure your reset pin is working as intended?

This feature was always working without troubles and was not touched in a while - to my knowledge at least.

from probe-rs.

jeriksson621 avatar jeriksson621 commented on June 21, 2024

I have tested some more, there seems to be two things going on here,
ATSAME70N20B seems to not enable communication while reset is asserted (low). Atleast not with my setup.

And there is a bug in probe-rs, that seems to be triggered when --connect-under-reset fails.

I have verified it with a nucleo-f401re board, while debugging the onboard f401re.

Steps to reproduce:

Disconnect one of the jumpers that connects the SWD, i.e. make sure the following command fails:
probe-rs erase --chip STM32F401CBUx --connect-under-reset

If you now measure the reset line it will be held low by the ST-link hardware probe.
reconnect the SWD jumper.

Call: probe-rs erase --chip STM32F401CBUx

This call will fail, but when returning it has released the reset line.

Call: "probe-rs erase --chip STM32F401CBUx" again, now it works since the previous call released the reset line.

i.e. The erronous behavoiur here seems to be three things:

  1. "probe-rs XXX --connect-under-reset" returns without releasing reset when it fails.
  2. "probe-rs erase --chip STM32F401CBUx" does not make sure that the probe is a correct state when initalizing (i.e. deasserting reset)
  3. SWD communication seems to fail when reset is asserted on the ATSAME70*

Do you have any idea of what to check to debug point 3?

from probe-rs.

Tiwalun avatar Tiwalun commented on June 21, 2024

Regarding point 3, are you sure that the chip supports debugging while the reset line is asserted? As far as I know, not all chips support this.

from probe-rs.

Yatekii avatar Yatekii commented on June 21, 2024

yeah, also, I recall the atmel chips have some finicky reset routine that technically requires custom sequences but might work by sheer coincidence. afaik atmel chips support debugging under reset (at least in limited capacity) tho.

from probe-rs.

jeriksson621 avatar jeriksson621 commented on June 21, 2024

If it is supported or not is not documented at all that I have found. This is definetly a likely reason for this issue.
I believe the E5x series has some custom "reset extension", but the E70 should not have this issue atleast.

from probe-rs.

bugadani avatar bugadani commented on June 21, 2024

Neither the j-link, nor the st-link drivers in probe-rs are compatible with reset extension. Reset extension requires the probe to hold the TCK line low, which is implemented via calls to swj_pins, but the drivers only implement control of nRESET. It's unclear whether this can change in a meaningful way, but we may be able to work around it. cc #2325 that attempts something related.

from probe-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.