oh right. I didn’t find it ; I get
HiZ> m
Mode selection
1. HiZ
2. 1-WIRE
3. UART
4. HDUART
5. I2C
6. SPI
7. 2WIRE
8. DIO
9. LED
10. INFRARED
x. Exit
Mode >
that would actually be most appreciated
oh right. I didn’t find it ; I get
HiZ> m
Mode selection
1. HiZ
2. 1-WIRE
3. UART
4. HDUART
5. I2C
6. SPI
7. 2WIRE
8. DIO
9. LED
10. INFRARED
x. Exit
Mode >
that would actually be most appreciated
This is what makes Ian a superstar!
Im not sure which firmware you’re running, but I’d suggest updating to the latest if you havent. If JTAG isn’t in the latest v6 firmware then that is a big and I will investigate now.
well… firmware is october 2024 or something, got the latest from the forum but the partition won’t mount (just stuck waiting…)
also, dmesg reports
[83547.235325] usb 3-10: USB disconnect, device number 16
[83552.460125] usb 3-10: new full-speed USB device number 55 using xhci_hcd
[83552.598135] usb 3-10: New USB device found, idVendor=1209, idProduct=7331, bcdDevice= 1.01
[83552.598143] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[83552.598147] usb 3-10: Product: Bus Pirate 5
[83552.598149] usb 3-10: Manufacturer: Bus Pirate
[83552.598151] usb 3-10: SerialNumber: 5buspirate
[83552.603491] cdc_acm 3-10:1.0: ttyACM0: USB ACM device
[83552.604336] cdc_acm 3-10:1.2: ttyACM1: USB ACM device
[83552.604810] usb-storage 3-10:1.4: USB Mass Storage device detected
[83552.604959] scsi host13: usb-storage 3-10:1.4
[83553.613976] scsi 13:0:0:0: Direct-Access BP5 Storage 1.0 PQ: 0 ANSI: 2
[83553.619579] sd 13:0:0:0: [sdg] 47824 2048-byte logical blocks: (97.9 MB/93.4 MiB)
[83553.619930] sd 13:0:0:0: [sdg] Write Protect is off
[83553.619933] sd 13:0:0:0: [sdg] Mode Sense: 03 00 00 00
[83553.620322] sd 13:0:0:0: [sdg] No Caching mode page found
[83553.620324] sd 13:0:0:0: [sdg] Assuming drive cache: write through
[83553.655292] sdg: sdg1
notice how it says BP5 and 5buspirate and Bus Pirate 5?
HiZ> i
This device complies with part 15 of the FCC Rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation.
Bus Pirate 6
Firmware main branch @ 5d7c82e (2024-10-10T11:57:19Z)
RP2350B with 512KB RAM, 128Mbit FLASH
S/N: 4B3319F256DA4E8A
https://BusPirate.com/
Storage: 0.10GB (FAT16 File System)
Configuration file: Loaded
Available modes: HiZ 1-WIRE UART HDUART I2C SPI 2WIRE DIO LED INFRARED
Active mode: HiZ ()=()
Display format: Auto
after maybe 5 minutes it finally, mounted, but read-only :-/
also I find it strange that fdisk reports
/dev/sdg1 63 47823 47761 93.3M 4 FAT16 <32M
a partition type of FAT16 <32M
for a size of 93.3M
seems odd
starting a new thread for the BP6 issues
I don’t know why it took so long to connect.
When a terminal is open the drive mounts as read only. It is a limitation of sharing a FAT formatted drive over USB MSC.
My wild guess is your system cached the BP5 in the USB descriptors based on the old firmware. I see in the source we do send the the version specific strings for the device name. There may be a bug for the drive ID which I’ll push a fix for.
I’m super sorry this has been a frustrating experience for you.
Looking at your other thread I don’t think you actually bootloaded the firmware, it seems to be copied onto the internal flash drive.
You wait for the partition to upload the new firmware?
This isn’t the way it works though: when the regular BusPirate firmware is running, it is providing the internal NAND flash as storage for the OS to mount. The internal NAND flash can be used for example to flash EEPROMs and similar things. It is not designed for firmware updates of the BusPirate.
To update the firmware of the BusPirate, you first have to enter bootloader mode. This can either be done by holding the small button on the back side of the BP while connecting USB, or (this is the more convenient way) with the “$” command on the terminal.
The bootloader will also provide a storage to the OS to mount. But this time it is the NOR flash that stores the firmware. So copy the new firmware onto this one.
See also Upgrade Firmware | Bus Pirate Docs
thanks, I hadn’t been able to find this last page you mentioned, and that explanation on NAND/NOR flash makes it much clearer. upgrade worked like a charm.
it turns out one out of 5 boards has a problem and makes the BP turn off when supplying power, only some faint red light on a few LEDs, it then needs to be disconnected because it also makes it crash.
still can’t flash the bootloader with the picoprobe (Error: Error connecting DP: cannot read IDR) but at least I know I’m not knocking on a brick wall
I can already foresee a lot less headaches with the BP, thanks a lot for your help so far now I need a break some food sleep and try again tomorrow.
Yeah! Glad you’re making progress! Keep us updated.
This sounds like there is a short circuit on this board.
Did you try to use the current-limit feature of the programmable power supply in the BusPirate (“W” command)? If you set the limit for example to 150 or 200 mA your regular boards should continue to work, but the faulty board should trigger the overcurrent limit and the BusPirate should continue to work normally instead of crashing.
Regarding connecting to the nrf52 via SWD I can’t help much because I don’t have experience with these. I think I still have a nrf52 demo board laying around somewhere, but I never did something with it.
I only added an USB-C connector, it’s a bit dirty and I had to do it twice ; I measured (again) and find no shorts on the connector, no shorts between GND, 3V3, 5V… I’ll focus on flashing the bootloader and writing the final code, and mark this board as defective for now… this is where I’m glad I split the main circuit and that of the MCU, because it’s only 25$ for this PCBA and not worth wasting too much time debugging
I would have thought there was an automatic/default current limit to prevent the BP from crashing ; I fail to see a use case where a crashing BP with insufficient power on the device would be helpful
the first time one hits W to set the output voltage, there is no prompt for the current limiter!
I see my current fluctuates between 3.1 and up to around 12mA, considering this, the display of min/max/avg values would be helpful (and maybe also display power in watts? I suppose it’s a nice information to have)
also, the current at the start always peaks, and this is a problem because setting a too high limit current could damage the board, while setting a too low limit current could prevent the board from booting. see where I’m going?
HiZ> m dio
Mode: DIO
DIO> W
Power supply
Volts (0.80V-5.00V)
x to exit (3.30) >
Maximum current (0mA-500mA), <enter> for none
x to exit (none) >
3.30V requested, closest value: 3.30V
Current limit:Disabled
Power supply:Enabled
Vreg output: 3.3V, Vref/Vout pin: 3.3V, Current: 0.4mA
DIO>
I am unable to reproduce this issue on BP6. The code for the power supply is the same across all hardware versions and this issue has never been reported previously.
That is a nice suggestion.
This is related to inrush current when the power supply starts. If the current limit is really low then the fuse will trip just from the inrush.
Maybe we should make enabling the current limit with some reasonable value the default that is selected when pressing enter and you need to explicitly say when you don’t want a current limit?
For example 300mA is something most DUTs should work fine with but shouldn’t cause an issue with the regulator or the supply of the BP.
It could look like this:
DIO> W
Power supply
Volts (0.80V-5.00V)
x to exit (3.30) >
Maximum current (0mA-500mA), <enter> for 300mA and 0 for unlimited
x to exit (300) >
A current limit of 0 doesn’t make sense and would immediately trigger the OCP, so using that for unlimited seems reasonable to me.
It’s now mid-April 2025 … over 6 months later; Your firmware is not up-to-date. Please take a moment, pause, and reflect … you may find you are in a better situation than you thought.
FYI, the BP6 is, in 99% of the cases, a more powerful option than the BP5. It’s faster, fully supports the Follow-Along-Logic-Analyzer (FALA) … which BP5 can only do 95%, has faster core clock speed, additional RAM, and more PIO modules. In other words, it is more future-proof than the BP5.
Where it differs from BP5 is when a feature had made presumptions that differ on the BP6 … e.g., some ports of 3rd party code with presumptions on clock speed. These get found, and then someone typically volunteers their time to fix it.
imho, the only downside to a BP6 over BP5 is the higher cost.
Pull request sent for this:
I see how this can be non-trivial to port
now it is
I figured out what I missed out, is that with ie. W 3.3
the current limit is not prompted for (but can be added after the voltage )
another suggestion is that, when not setting voltage and current limit after the W
, the last used values are the new default! ATM it’s always 3.3V and no current limit
Back to the topic and for the reference :
@jnettlet (DevEco, discord) wrote:
I was then instructed by i²cjak (ZMK firmware’s discord) to issue openocd -f interface/cmsis-dap.cfg -f target/nrf52.cfg -c init -c "reset init" -c halt -c "nrf52_recover"
but in my case I still get the same IDR error.
Shipping two boards to someone in Estonia who has a colleague who has flashed this chip before:
I understand this ask. Initially, it makes sense, to “make life easier”. Ian seems to enable save / re-use last-used results.
At the same time, I recommend AGAINST the use of last-used default settings. The use of last-used values actually increases the size of the mental model one must process. If things are explicit, then there is less confusion.
This, unfortunately, brings up a current shortcoming of the buspirate… no tab completion for commands and their many options, and the commands sometimes enter a “prompting” mode, that doesn’t play well with scripting. This is early days, but these are the things that are top-of-mind for me … high-payoff improvements … but they also have wide-spread changes. We’ll see if this happens or not…