Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jul 2022 06:46:20 +0300
From:      Nick Kostyria <nick@i11.co>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 1 Apr 2021 20:38:01 +0300
Nick Kostirya via freebsd-arm <freebsd-arm@freebsd.org> 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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220721034620.5d1e5372>