From owner-freebsd-arm@freebsd.org Fri May 3 11:43:17 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE59158D081 for ; Fri, 3 May 2019 11:43:17 +0000 (UTC) (envelope-from mprasad9689@gmail.com) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E4E1A6D6C3 for ; Fri, 3 May 2019 11:43:15 +0000 (UTC) (envelope-from mprasad9689@gmail.com) Received: by mail-wm1-x32b.google.com with SMTP id t76so6768178wmt.1 for ; Fri, 03 May 2019 04:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=G0VcsJCdAPPKHIsMIj1KivmHWnEPNud79Yfx6hTntrU=; b=NO6ks+iB4YF7Saw0oa6xsww1l+SHLrDYZf0F7d7uwDIYKyZUecwI07XMawjz3a/4/T gA9L4Angb0uoCz5Ug6iJCS4PRohmELxfAUttXwIepOqo/9wWdKwXOqgspczJYTdJ41OU JitiS67sLZYo2az9TbFVAI1BdUtjkr8LHrE/iFnDrKSCUsmBaME/ieTDpr6EWYj93mh1 KgXIkP5Gaxp3p/kyCUtMCv1eVpXY5TGpHE85az9s9xTgplAYduM78UvnXZp7J13koJUM 6ZAjbDb6v9HBRwG80YASrBCqo6rk9WfRwIQP6MpXjXx2sbFd+Nk5q1v6r2+EL3FyTyft FBHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=G0VcsJCdAPPKHIsMIj1KivmHWnEPNud79Yfx6hTntrU=; b=O6LiT5pKVqfcfWQxt9KqSHe1Bmcw2E4xIjik9jyFmnMD4IyP6F1G/cqxDPU3Xarq/z N0d94WfjSBfYuuh/dLlEkU0E/JFIogZ8VAXfRNHcHNGVORNTrosVNadXri7i4+iiPP4P c1Ea1yN++tAMuMIuNQZpjtJd50Ktn9uTCDXLBXKtzgKPf4QYLJTWysTLufocWa+5LhEi uMhY1apiPAjQwme8D5BOStHX5BLHP+dXd1LuFLGuM6yBXV2ErczTQ+bwGKGaokjlYyk4 X3O52h+8I2lSo5oJf85HvoG++iq4h37mMK20yxg6x11JbZcuMiLq10EvuAbzjs0Qn3YT Hwdw== X-Gm-Message-State: APjAAAUNM+V+bph2VPG253gow/i0DjOMms3gak4g5REIfvWezX3sBuVk IwM1qnKGTivsGl0kP3lFJddwqlNfS0HNpS55cylGvbdno7Szrw== X-Google-Smtp-Source: APXvYqynFHs7C+CPe57QQx+UhJceJXu/XKFkjtm2rwjRlKU7I4ZKq6eFotar8v2oAaikbNMlfcCpO89ZVZ0fsNWn/3k= X-Received: by 2002:a7b:cc91:: with SMTP id p17mr5968367wma.147.1556883793832; Fri, 03 May 2019 04:43:13 -0700 (PDT) MIME-Version: 1.0 From: Prasad M Date: Fri, 3 May 2019 17:13:03 +0530 Message-ID: Subject: FreeBsd I2C utility gives same value as MSB and LSB from DS75 sensor 16bit register. To: freebsd-arm@freebsd.org X-Rspamd-Queue-Id: E4E1A6D6C3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=NO6ks+iB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mprasad9689@gmail.com designates 2a00:1450:4864:20::32b as permitted sender) smtp.mailfrom=mprasad9689@gmail.com X-Spamd-Result: default: False [-6.75 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; IP_SCORE(-2.77)[ip: (-9.30), ipnet: 2a00:1450::/32(-2.23), asn: 15169(-2.24), country: US(-0.06)]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 May 2019 11:43:17 -0000 Hi Folks, I am trying to access a DS75 I2C temperature sensor. It kind of works with the default i2c utility. But it returns twice the high byte instead of the high and low byte for the temperature. Probably because it does 1 byte reads on the I2C bus, sending a stop condition after every byte. The device expects continuous reads and no stop/start in between the 2 bytes. Trying all options i2c, most notably the -m mode switch, yields the same results all the time. Looking at the code in i2c.c Could any one help to solve this problem with working I2CRDWR utility. Thanks Prasad M