16
Messages
This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.
Messages - Arkku
17
Bus Pirate Support / Re: Firmware update on Linux ?
18
Bus Pirate Support / Re: Firmware update on Linux ?
If this is a problem for some reason, try this:
Code: [Select]
stty 115200 </dev/ttyUSB0
echo -e '$rny' >/dev/ttyUSB0
If that doesn't work, replace the [tt:]echo[/tt:] line with: [tt:]cat >/dev/ttyUSB0[/tt:] and type [tt:]$<enter>y<enter><Ctrl-d>[/tt:]
19
Bus Pirate Support / Re: 1-wire ROM search broken in binary mode? (Edit: No.)
I'm terribly sorry about the misplaced blame!
(However, the silver lining is that this mess made me learn how to compile the Bus Pirate firmware on Linux, so maybe that'll yield the community some benefits in the long run. =)
20
Bus Pirate Support / Re: 1-wire ROM search broken in binary mode?
21
Bus Pirate Development / Re: Re: Compiling Bus Pirate firmware with MPLABX (under lin
First one needs to select a PIC programmer device ([tt:]File -> Project properties[/tt:], then [tt:]Conf: default[/tt:], then select, e.g., [tt:]PICKit3[/tt:] from the list on the right). Then click [tt:]Apply[/tt:] and select the programming device ([tt:]PICKit3[/tt:]) from the list on left. Select [tt:]Memories to Program[/tt:] from the menu on the right, and for the option [tt:]Auto select memories and ranges[/tt:] choose [tt:]Manually select memories and ranges[/tt:]. Tick the box for [tt:]Program Memory[/tt:] and below that enter [tt:]0xa6ff[/tt:] as the end value. (Now wasn't that an obvious place to configure exported hex files? =)
Note that the value [tt:]0xa7fa[/tt:] used for MPLAB 8 is not accepted; MPLAB X requires the value to be either [tt:]0xabfb[/tt:] (which overlaps the bootloader area as described above) or of the form ([tt:]0x100 * n - 1[/tt:]); the largest suitable value of this form is [tt:]0xa6ff[/tt:] (a loss of 251 bytes of program space?).
22
Bus Pirate Development / Re: Re: Compiling Bus Pirate firmware with MPLABX (under lin
23
Bus Pirate Support / Re: 1-wire ROM search broken in binary mode?
My next guess would be that the ASCII mode does some initialization of global variables and/or data structures used by the ROM search that is not done by the binary mode.
24
Bus Pirate Development / Re: Compiling Bus Pirate firmware with MPLABX (under linux,
Code: [Select]
Writing page 26 row 215, 6b80...OK
Erasing page 41, a400...OK
Writing page 41 row 328, a400...OK
…
Erasing page 42, a800...ERROR [50]
With the released v6.1 firmware there is no “page 42”, and so it works fine:
Code: [Select]
Writing page 40 row 327, a380...OK
Erasing page 41, a400...OK
Writing page 41 row 328, a400...OK
…
Writing page 41 row 335, a780...OK
I would assume that the problem is because I'm running out of space on the device (i.e, there is no page 42 available?), but no matter what optimizations I try or features I disable, my firmware file always seems to extend to page 41 and 42. Note that in the official firmware release the pages were contiguous from 1 to 41, but in mine they skip from page 26 to 41.
If I try without [tt:]-Os[/tt:], as is the default, and don't disable any normal features like the LCD support that I don't need, my firmware [tt:].hex[/tt:] file is about the same size as the official firmware, but it still exhibits this “page gap” which causes the end to extend to the problematic page 42.
What am I doing wrong, i.e. what makes something want to be on page 42 even if there are over 10 pages free before then?
Or, has anyone been able to compile this succesfully on Linux or OS X with MPLABX, and could they upload their source directory with the MPLABX project? The X-project in SVN does not compile (refers to some obsolete files that don't exist anymore), so I needed to import the MPLAB 8 -version.
P. S. My Bus Pirate is hardware v3.5, bootloader v4.4, [tt:]pirate-loader[/tt:] from the 6.1 binary distribution. After each failed attempt I've always been able to re-upload the official 6.1 firmware.
25
Bus Pirate Support / Re: 1-wire ROM search broken in binary mode?
I took a look at the firmware sources, and it does indeed seem like both modes use the same [tt:]OWSearch()[/tt:] function, which makes the problem all the more puzzling. The only difference I can spot is that the ASCII mode has far more extensive delays between calls to [tt:]OWSearch()[/tt:] due to additional printouts; could it be that there needs to be a slight delay before [tt:]OWSearch()[/tt:] can reliably be executed again?
On the other hand, if this was a simple timing-related issue, I am surprised by the consistency of the error; whenever I have the same combination of devices on the bus, they always get the same incorrect ids, even if I power down in between tests and/or move the devices around physically.
26
Bus Pirate Support / 1-wire ROM search broken in binary mode? (Edit: No.)
I wrote a small library for myself to access the binary mode of Bus Pirate (v3.5, FW 6.1 r1676), and noticed that there seems to be a problem with the 1-wire ROM search function when there are multiple devices on the 1-wire bus. In ASCII mode everything works fine:
Code: [Select]
1-WIRE>(240)
SEARCH (0xF0)
Macro 1WIRE address
1.0x28 0x28 0x65 0x91 0x02 0x00 0x00 0xEB
*DS18B20 Prog Res Dig Therm
2.0x28 0xA4 0xCE 0x91 0x02 0x00 0x00 0x3F
*DS18B20 Prog Res Dig Therm
3.0x28 0x2B 0x6B 0x91 0x02 0x00 0x00 0x10
*DS18B20 Prog Res Dig Therm
However, in binary mode the search only works correctly when there is exactly one device on the bus:
Code: [Select]
1 alone) 0x28286591020000eb
2 alone) 0x28a4ce910200003f
3 alone) 0x282b6b9102000010
But when I have two or three devices on the same bus (exactly the same way as in ASCII mode), I get:
Code: [Select]
1+2) 0x28286591020000eb
0x28acef91020000ff
1+3) 0x28286591020000eb
0x282b6f91020000fb
2+3) 28a4ce910200003f
28afef910200003f
1+2+3) 0x28286591020000eb
0x28acef91020000ff
0x28afef91020000ff
The results are consistently the same for each combination when I try multiple reads, but always incorrect for all but one device. Note that the error is not consistent across different combinations, e.g., device 3 has a different id in 1+3, 2+3, and 1+2+3 combinations.
I am fairly certain I am not reading the binary data incorrectly since I get the correct number of bytes and the beginning of each id always seems to match so reading does not seem to be out of sync there. Is there a bug in the firmware, and why would the Bus Pirate use a different ROM search method for ASCII vs binary mode?
Edit: Oh, by-the-way, the 1-wire binary mode works perfectly for actually accessing all three devices on the same bus once the correct ids are known. The problem is just with the binary mode search ROM command that returns incorrect ids.