Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected SCK behavior #123

Open
Ouroboros75 opened this issue Jan 25, 2022 · 0 comments
Open

Unexpected SCK behavior #123

Ouroboros75 opened this issue Jan 25, 2022 · 0 comments

Comments

@Ouroboros75
Copy link

I'm trying to establish a Pi 3b+ as an SPI file transfer master
Here's the code i'm using:

`#!/usr/bin/python3
import spidev
import time
import binascii
import RPi.GPIO as GPIO
import crc16

spi = spidev.SpiDev()
spi.open(1, 0)
spi.max_speed_hz = 42000000
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(18, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)

buffSend=[]
for i in range(4192000):
buffSend.append(0x48)
print("start")
print(len(buffSend))
try:
spi.writebytes2(buffSend)
print("\nsend")
except KeyboardInterrupt:
spi.close()
`

The resulting SCK wave form is:
weird

This is rather confusing to me. From what i understand, after each 4 bytes transferred there's an unusual gap until the next 4 bytes.
Is that correct? If yes how can i remove this gap.
Any help is GREATLY appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant