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

USB/SPI/I2C device mode, does it work? #34

Open
mfp20 opened this issue Feb 24, 2021 · 9 comments
Open

USB/SPI/I2C device mode, does it work? #34

mfp20 opened this issue Feb 24, 2021 · 9 comments

Comments

@mfp20
Copy link

mfp20 commented Feb 24, 2021

Regards

@boochow
Copy link
Owner

boochow commented Feb 24, 2021

Sorry, not implemented.

@mfp20
Copy link
Author

mfp20 commented Feb 24, 2021

Is it hard to implement?

@boochow
Copy link
Owner

boochow commented Feb 24, 2021

I believe it is hard, because I haven't seen any bare-metal project which supports USB device mode

@mfp20
Copy link
Author

mfp20 commented Feb 24, 2021

I see, I can't find any. Thanks!

BTW, what is the pin toggle speed?

@boochow
Copy link
Owner

boochow commented Feb 24, 2021

Sorry, I haven't measure it.

@mfp20 mfp20 changed the title USB device mode, does it work? USB/SPI/I2C device mode, does it work? Feb 24, 2021
@mfp20
Copy link
Author

mfp20 commented Feb 24, 2021

What about SPI and I2C? Do they work in slave mode?

@boochow
Copy link
Owner

boochow commented Feb 24, 2021

I have only tested master mode for both SPI and I2C. RPi's hardware SPI does not support slave mode anyway.

@mfp20
Copy link
Author

mfp20 commented Feb 24, 2021

I have only tested master mode for both SPI and I2C. RPi's hardware SPI does not support slave mode anyway.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf

Page 4

SPI Slave is supported by hardware, but linux support has been added around v4.13. I wouldn't be surprised if nobody ever used it yet. It looks like the protocol isn't strict enough, so plenty incompatible implementations exist.

@boochow
Copy link
Owner

boochow commented Feb 25, 2021

SPI Slave is supported by hardware, but linux support has been added around v4.13.

maybe it is referring BSC/SPI described in chapter 11, which I have not implemented. I only implemented SPI0, which cannot be used in slave mode. Also, I have read at somewhere that BSC/SPI slave does not work correctly

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

2 participants