SPI Driver "spi_driver_s" contains the SPI Device "spi_dev_s" ... That we need for testing the SPI Interface! But the SPI Device is private and hidden from apps 🙁

github.com/lupyuen/incubator-n

Instead we copy an existing SPI Device Driver to test the SPI Interface ... We pick the simplest smallest SPI Device Driver: dat-31r5-sp

docs.google.com/spreadsheets/d

Every Device Driver defines the File Operations for the device ... Here are the open(), close(), read(), write() and ioctl() operations for our SPI Test Driver

github.com/lupyuen/incubator-n

In the write() operation for our SPI Test Driver, we 1️⃣ Lock the SPI Bus 2️⃣ Config the SPI Interface 3️⃣ Select the SPI Device 4️⃣ Transfer SPI Data 5️⃣ Deselect and Unlock

github.com/lupyuen/incubator-n

Follow

's SPI Pins match the Reference Manual: MOSI = GPIO 1, MISO = GPIO 0 ... But we're about to witness a BL602 SPI Quirk

github.com/bouffalolab/bl_docs

Logic Analyser connected to shows that MISO and MOSI are swapped! This happens in BL602 IoT SDK ... Also in !

lupyuen.github.io/articles/spi

SPI Chip Select has a problem ... It goes High after EVERY byte ... Which is no-no for SX1262 ... Solution: We control Chip Select via GPIO

github.com/lupyuen/incubator-n

Here's how Semtech SX1262 is wired onboard Stack ... Let's update the Pin Definitions in NuttX

How we transmit and receive data over SPI on Apache OS ... And what's inside the SPI Driver ... All shall be explained here

lupyuen.github.io/articles/spi

Show newer
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.