GithubHelp home page GithubHelp logo

Comments (7)

ninjasource avatar ninjasource commented on June 26, 2024

I have tested the suggested fix above on an nrf5340-dk but, unfortunately, I do not have an nrf52840-dk rev 3 to test with.
This is related to: #368

from probe-run.

Urhengulas avatar Urhengulas commented on June 26, 2024

Hi @ninjasource, thank you for your report.

Two observations:

  1. For me running a simple hello world program on the nrf52840-dk takes 1.179s without --erase-all and 1.494s with --erase-all. So I can't observe the big difference you are experiencing.

  2. Secondly, I don't think that the probe-rs-cli command you are using is actually triggering an erase_all. There is the --allow-erase-all (which you are setting) and the --chip-erase (which you are not setting).

    Can you please try running probe-rs-cli with --chip-erase and report what happens?

    As far as I understand the "erasing sectors" in the probe-rs-cli output does not refer to the erase_all. If you run probe-run without --erase-all but with -vv (double verbose) you can atill observe (HOST) DEBUG Erased sector of size 4096 bytes in 180 ms two times which adds up to the 8.00 KiB reported by probe-rs-cli.

from probe-run.

ninjasource avatar ninjasource commented on June 26, 2024

My sincere apologies for the late reply, I have been away.

@Urhengulas, I ran the chip erase function. Oddly enough the nrf5340 still needs that --allow-erase-all flag to unlock the chip on power up even though it is erasing the chip anyway.

This completes successfully on the nrf52840 in about half a second so this confirms your observation (in point 1):

probe-rs-cli erase --chip nRF52840_xxAA --allow-erase-all

To answer point 2, this completes on the nrf5340 after 34 seconds although on most runs it simply times out:

probe-rs-cli erase --chip nRF5340_xxAA --allow-erase-all

So I guess the issue is with the probe-rs chip erase command because nordic's programmer app takes about 5 seconds to do a full chip erase (and then some). I have come to realize that the --erase-all and --allow-erase-all commands are completely different things, the latter command being responsible for unlocking the chip.

from probe-run.

ninjasource avatar ninjasource commented on June 26, 2024

I also ran probe-run with the -vv flag and the nrf52840 generated a 7MB log whereas the nrf5340 generates a 38MB file. Too big to pollute this thread with though and github does not allow zip files to be attached to issues. I couldn't spot anything obvious other than the fact that the nrf5340 was doing a hell of a lot of register reading and writing for something that is supposed to be erasing a chip. Let me know if you'd like me to attach the log file to this thread.

from probe-run.

jonathanpallant avatar jonathanpallant commented on June 26, 2024

Can you verify which version of the nRF52 you have? Apparently some later revisions changed how flash erasing works.

from probe-run.

Urhengulas avatar Urhengulas commented on June 26, 2024

I also ran probe-run with the -vv flag and the nrf52840 generated a 7MB log whereas the nrf5340 generates a 38MB file. Too big to pollute this thread with though and github does not allow zip files to be attached to issues.

I think you can attach files by either drag-and-drop or by clicking on the bottom edge of the text input field. And I just tried and was able to upload a zip file.

from probe-run.

Urhengulas avatar Urhengulas commented on June 26, 2024

So I guess the issue is with the probe-rs chip erase command because nordic's programmer app takes about 5 seconds to do a full chip erase (and then some). I have come to realize that the --erase-all and --allow-erase-all commands are completely different things, the latter command being responsible for unlocking the chip.

Can you please report the issue to probe-rs and reference this issue there?

from probe-run.

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.