Re: SPI and si4463 radio

From: Nick Kostyria <nick_at_i11.co>
Date: Thu, 21 Jul 2022 03:46:20 UTC
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?