Re: Digest for digitemp@googlegroups.com - 3 updates in 1 topic

24 views
Skip to first unread message

Christian Kreiner

unread,
Jan 10, 2017, 9:16:37 AM1/10/17
to digi...@googlegroups.com

Not sure whether it can help, I maybe have seen a similar problem in a different setup where I simply could not send a "break" on the serial line correctly. But "break" is the reset method for the DS2480B. Those days I developed a patch for digitemp (attached) that sends bytes to bring the chip back to normal operation without using a "break". The patch could still work, as the target source file did not change a lot. It is still in use - more than 10 years by now as I just noticed :-)

Christian

On 10.01.2017 00:43, digi...@googlegroups.com wrote:
DJ exx <ad.ch...@gmail.com>: Jan 09 12:55AM -0800


> The DS2480B chip is connected to TxD/RxD pins on Raspberry Pi 2B directly
>> (not using USB). Port /dev/ttyAMA0 is working correctly and permissions are
>> OK (666 - I'm using sudo anyway).
 
For now I think that Raspbian Jessie has a bug - during boot time it sends
one byte (0xFF) to serial port (if uart is enabled in /boot/config.txt)
which confuses the DS2480B chip. When I connect the chip to gpio pins AFTER
booting - digitemp recognize the chip and all connected sensors. But after
reboot WITH the chip connected to port - recognition fails.
 
Few years ago there was similar issue in Linux
kernel https://github.com/raspberrypi/linux/issues/12
 
Maybe the solution is to change digitemp source code to discard this
unnecessary byte. Or somehow reset the DS2480B chip on digitemp start.
"Brian C. Lane" <b...@brianlane.com>: Jan 09 07:46AM -0800

On Mon, Jan 09, 2017 at 12:55:46AM -0800, DJ exx wrote:
> kernel https://github.com/raspberrypi/linux/issues/12
 
> Maybe the solution is to change digitemp source code to discard this
> unnecessary byte. Or somehow reset the DS2480B chip on digitemp start.
 
I'm not sure what else digitemp could do, the initial connection
sequence includes 10 tries to connect, and it sends a BREAK each time,
and flushes the buffers.
 
I tried getting one of my old Pi's running again with the latest Jessie
lite version, but ran into problems with the usb keyboard support so
didn't get anywhere. I use them with a USB to serial adapter though, not
the GPIO pins.
 
 
--
http://www.brianlane.com
DJ exx <ad.ch...@gmail.com>: Jan 09 08:50AM -0800

Well, in fact I'm not sure that RPi sends a byte (interpreted as 0xFF by
PC serial terminal , not tested on oscilloscope). It might also be a
voltage spike, as described
in http://elinux.org/RPi_Serial_Connection#Glitch_when_opening_serial_port
This may confuse the DS2480B chip so it don't recognize BREAK commands.
 
Of course I could separate RPi TxD from DS2480B through gate switched by
another GPIO output pin before starting digitemp but it requires some
hardware work. For now I'll stay with Raspbian wheezy.
Thanks for your concern Brian.


 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to digitemp+u...@googlegroups.com.

digitemp-3.3.2-ds2480.patch

DJ exx

unread,
Jan 11, 2017, 6:50:06 AM1/11/17
to DigiTemp
Unfortunately this patch doesn't solve the problem - probably BREAK commands are sent correctly but the DS2480B chip is is not-responding state after the RPi boot. I also tried "software master reset" as described in DS2480B application note - no effect.
I wonder if I could disable UARTs during boot, enable it later (change GPIO mode and mknod serial device) and then start digitemp...
Thanks for help
Reply all
Reply to author
Forward
0 new messages