Since this HW is out there in unknown number of deployments, it makes
more sense to add a SW fix. I added a verify_mask which ignores the
button pull-ups on read-back.
Nico: Can you pull latest master and try that?
If 'git show HEAD' shows your revert at the top, you must first do 'git
reset --hard HEAD^' (assuming you have no other uncommited changes).
Then you can do 'git pull'.
Johan
On 03/04/16 20:30, Johan Ström wrote:
Hello again,
I've gotten some helpful off-list response from Der Tiger, and to sum
it up.
The hardware Tiger uses (Hobbyboard) is electrically identical to the
on Nico uses (https://fstab.nl/en/lcd_owfs), except that the
Hobbyboard schematic has 3 pushbuttons between P0..P3 and GND, with
10nF cap's in parallel, and 3 10k pull-ups between VCC and P0..P3. The
schematic Nico uses leaves P0..P3 floating.
One theory put forward by Der Tiger is that, since the patch disables
the PIO output transistors for P0..P3 and thus leaving the outputs in
an undefined state, the chip/owfs could be confused.
Also, with the help of Jan's explanation on the command sequence, I
cannot really see any apparent issues with the patch.
After studying the logs (which says ' Error sending initial
attention'), and the corresponding code, I'm quite sure the lacking
pull-ups are the source of the problem.
OW_Hinit->OW_w_pios writes a byte and then read backs the PIO status,
expecting them to be the same. If no pull-ups are present, it will i.e
write 0x37, but read back 0x30, and fail.
This is the case in the log (see below, [1]).
Nico: Can you try to add some 10k resistors between P0-VCC, P1-VCC and
P3-VCC? Remember to test with the original code (without the extra
revert).
Hopefully that will help!
Thanks to Tiger and Jan for helping to (hopefully) fix this issue :)
Johan
[1]
TRAFFIC IN <NETREAD> bus=0 (/dev/ttyUSB0)
Byte buffer DS9097U, length=1
--000: 37 (Here we write 0x37)
<7>
TRAFFIC IN <NETREAD> bus=0 (/dev/ttyUSB0)
Byte buffer DS9097U, length=1
--000: C8
<.>
TRAFFIC IN <NETREAD> bus=0 (/dev/ttyUSB0)
Byte buffer DS9097U, length=1
--000: AA
<.>
TRAFFIC IN <NETREAD> bus=0 (/dev/ttyUSB0)
Byte buffer DS9097U, length=1
--000: 30 (Here we read back 0x30, bit 0-3 is not pulled up.)
<0>
DEBUG: ow_tcp_read.c:(113) read: 4 - 0 = 4
DEBUG: ow_transaction.c:(145) modify = 0
DEBUG: ow_transaction.c:(208) end = 0
DEBUG: ow_2408.c:(442) Error sending initial attention
DEBUG: ow_2408.c:(406) Screen initialization error
------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers