instructions for flashing internal panda (#1521)

* instructions for flashing internal panda

* Update board/README.md
This commit is contained in:
Adeeb Shihadeh 2023-07-17 20:17:18 -07:00 committed by GitHub
parent 5d873444b2
commit b2741013f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 5 deletions

4
Jenkinsfile vendored
View File

@ -82,7 +82,7 @@ pipeline {
steps {
phone_steps("panda-dos", [
["build", "scons -j4"],
["flash", "cd tests/ && ./ci_reset_internal_hw.py"],
["flash", "cd tests/ && ./reflash_internal_panda.py"],
["test", "cd tests/hitl && HW_TYPES=6 pytest --durations=0 [2-7]*.py -k 'not test_send_recv'"],
])
}
@ -93,7 +93,7 @@ pipeline {
steps {
phone_steps("panda-tres", [
["build", "scons -j4"],
["flash", "cd tests/ && ./ci_reset_internal_hw.py"],
["flash", "cd tests/ && ./reflash_internal_panda.py"],
["test", "cd tests/hitl && HW_TYPES=9 pytest --durations=0 2*.py [5-9]*.py"],
])
}

View File

@ -4,8 +4,8 @@ Programming
**Panda**
```
./recover.py # flash bootstub
./flash.py # flash application
./recover.py # flash bootstub
```
Troubleshooting
@ -13,7 +13,8 @@ Troubleshooting
If your panda will not flash and green LED is on, use `recover.py`.
If panda is blinking fast with green LED, use `flash.py`.
Otherwise if LED is off and panda can't be seen with `lsusb` command, use [panda paw](https://comma.ai/shop/products/panda-paw) to go into DFU mode.
[dfu-util](http://github.com/dsigma/dfu-util.git) for flashing
If your device has an internal panda and none of the above works, try running `../tests/reflash_internal_panda.py`.

View File

@ -27,6 +27,7 @@ if __name__ == "__main__":
gpio_set(GPIO.HUB_RST_N, 1)
# flash bootstub
print("resetting into DFU")
gpio_set(GPIO.STM_RST_N, 1)
gpio_set(GPIO.STM_BOOT0, 1)
time.sleep(1)
@ -34,6 +35,7 @@ if __name__ == "__main__":
gpio_set(GPIO.STM_BOOT0, 0)
time.sleep(1)
print("flashing bootstub")
PandaDFU(None).recover()
gpio_set(GPIO.STM_RST_N, 1)
@ -41,7 +43,7 @@ if __name__ == "__main__":
gpio_set(GPIO.STM_RST_N, 0)
time.sleep(1)
# flash app
print("flashing app")
p = Panda()
assert p.bootstub
p.flash()