From nobody Thu Jul 21 03:46:20 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LpJQd4dSSz4WT1N for ; Thu, 21 Jul 2022 03:46:33 +0000 (UTC) (envelope-from nick@i11.co) Received: from mx.i11.co (mx.i11.co [159.69.78.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4LpJQc3lMkz3BsP for ; Thu, 21 Jul 2022 03:46:32 +0000 (UTC) (envelope-from nick@i11.co) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=i11.co; s=omicron; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=dQBmH6H87I3oQfATzsOA+ohggbdBYZhWml8IYt86Hgg=; b=YJspJHTUy//zuiKs3lx3XAdbNn 0Zq4BfCOwH12XBBTDDJ62BXWpKKUBGAuIhGVT3LB7I5OCZgmlBrHj1Kf31V6rFDYzm14FSvCDnB64 NZIYyWGW/IN7Nb3u7ucma0nYuwzOfHh+wsKKrR4xim4iZqh8BEyNzJg53kMRY2ApRCzacNY/p6wBb 3dEKh6C+ZX53XjL0/oDbHpN+wDATdsXWypcb+29YOUy39q7whMRWmxPhaQHRX2N8F+yK9p1Jd4J2K +RiUmfZQy2MYIQMHaLrgjHygAucKqas2Atm/MnPHEx/kVXLqGHqp2F2e1StMeZgY5C+NTRwAnxi+/ tjS8u2Yw==; Received: from [212.237.25.26] (helo=thinkbook) by mx.i11.co with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oEN8r-0007pY-0G for freebsd-arm@freebsd.org; Thu, 21 Jul 2022 03:46:25 +0000 Date: Thu, 21 Jul 2022 06:46:20 +0300 From: Nick Kostyria To: freebsd-arm@freebsd.org Subject: Re: SPI and si4463 radio Message-ID: <20220721034620.5d1e5372@thinkbook> In-Reply-To: <20210401173801.5021704d@i11.co> References: <20210401173801.5021704d@i11.co> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; amd64-portbld-freebsd12.3) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4LpJQc3lMkz3BsP X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=i11.co header.s=omicron header.b=YJspJHTU; dmarc=pass (policy=reject) header.from=i11.co; spf=pass (mx1.freebsd.org: domain of nick@i11.co designates 159.69.78.69 as permitted sender) smtp.mailfrom=nick@i11.co X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[i11.co,reject]; R_SPF_ALLOW(-0.20)[+ip4:159.69.78.69]; R_DKIM_ALLOW(-0.20)[i11.co:s=omicron]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:24940, ipnet:159.69.0.0/16, country:DE]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_TWO(0.00)[2]; FREEFALL_USER(0.00)[nick]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[i11.co:+]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N On Thu, 1 Apr 2021 20:38:01 +0300 Nick Kostirya via freebsd-arm wrote: > Hello. > I need help with SPI and si4463 radio. > > si4463 radio works great on Arduino Pro Mini. > FreeBSD 12.2 (armv7 r369379) on NanoPi NEO no not work with it. > MISO always has the HIGH state. > The logical analyser says that values of CLK, MOSI, CS is identical to Arduino. > The only difference is that interval between CS and CLK is much bigger on FreeBSD. > > By the way BMP280 works fine on FreeBSD. I found the reason! Si4463 radio works on NetBSD 9.2 on the same ARM board. I compared signals and I saw what clock polarity in idle state is logic HIGH on FreeBSD 12.3! NetBSD 9.2 have LOW. Why does BMP280 work fine on FreeBSD, but not Si4463? BMP280 support SPI_MODE_0 and SPI_MODE_3, but Si4463 support only SPI_MODE_0. SPI_MODE_0 implies logic LOW in idle state of clock. I haven't figured out how to fix it yet... Question. Other boards have same behavior? Or is it only on Allwinner H3?