BCM2835 LoSSI Clock Output

Open
#3,348 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c, linux

Research direction

Start in bcm2835_spi_transfer_one() and reproduce the LoSSI transfer with SPI_MODE_3, SPI_3WIRE, and BCM2835_SPI_CS_LEN enabled. Compare the controller's measured output with the BCM2835 ARM Peripherals specification. Done means a one-byte transfer produces 9 clock cycles rather than 10 on the Raspberry Pi CM3+ setup.

Written by the indexing model from the issue text.

Description

Describe the bug
I know the Linux Kernel does not natively support LoSSI (this is something I am working on).
However the BCM2835 SPI Driver in LoSSI Mode outputs 10 clock cycles instead of 9 clock cycles as indicated by the BCM2835 ARM Peripherals spec.

image

To reproduce
Add code to enable LoSSI in function bcm2835_spi_transfer_one() and send one byte of data.
cs |= BCM2835_SPI_CS_LEN;

Note: SPI Mode is set to SPI_MODE_3 and SPI_3WIRE

Expected behaviour
Expect 9 clock cycles

Actual behaviour
Measured 10 clock cycles

System
Raspberry Pi CM3+ w/ IO Board
Kernel Version: v5.3.7-yocto-standard
Firmware Date: Aug 22 2019 14:00:42
Firmware Version: 0e6daa5106dd4164474616408e0dc24f997ffcf3 (clean) (release) (start_x)

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.