Coder Social home page Coder Social logo

tonton81 / spislave_t4 Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 9.0 9 KB

SPI Slave Library for Teensy 4.0/4.1

Home Page: https://forum.pjrc.com/threads/66389-SPISlave_T4?p=271504#post271504

License: MIT License

C++ 100.00%
teensy spi slave pjrc lpspi

spislave_t4's People

Contributors

tonton81 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

spislave_t4's Issues

Noob Question

Hi, I am confused about the usage of the library. For the TSPISlave library it is quite clear how to select the SPI pins:

uint8_t miso = 51;
uint8_t mosi = 52;
uint8_t sck = 53;
uint8_t cs = 43;
uint8_t spimode = 16;

TSPISlave mySPI = TSPISlave(SPI2, miso, mosi, sck, cs, spimode);

But for the SPISlave_T4 example we don't find such code, instead only:

SPISlave_T4<&SPI, SPI_8_BITS> mySPI;

What am I missing?

Nothing in Received Data Register (RDR)

Hi,

We have been trying to set up SPI communication with a Arduino Uno Master and Teensy 4.1 Slave. After checking with an oscilloscope, we can see that the signals coming from the Master are fine, but the slave end just isn't able to read the number being transmitted correctly and stop reading after 1 byte.

Our current wiring is 10-10, 11-12, 12-11, 13-13. Any idea on how to resolve this? Thanks.

a few little tweaks

Hey There!

Thank you for your Library, this will help me very much!

There are just little tweaks you could take if you want.

the SPISlave_T4.tpp should be named SPISlave_T4.cpp, this drops an Error, if you open the File in an other IDE than the Arduino IDE

the example sketch should be in a folder, thats named like the file, otherwise you wont find the Example over the Arduino IDEs "Example Tab"

maybe this helps

Does Not Work

Your code corrupts incoming MOSI messages somehow. I can see this on a digital logic analyser, sending data between teensies. Neither slave nor master is getting data.
It seems like two forks are fixing major issues with your code, but without any commenting or documentation in your code I cannot tell what's going on. PJRC directly links your Repo on his website, so it would be great if you could fix this for the community :)

SPI Master/SLAVE Communication

I'm trying to communicate my master teensy 4.1 board with several teensy 4.1 slave boards, but I couldn't find any library that can help me to make a teensy work as a slave.
I tried I2C protocol and it worked but I need higher speed than the one I have with I2C.
I tried this library but I faced a lot of errors in Arduino IDE
Can you help me to solve this problem

Using SPISlave_T4 with SPI1

I've been trying to get this library going for use with SPI1, but aren't having much luck. I made a copy, and changed the IOMUX* entries to match that of the Teensy4.1's SPI1, but so far no go.

The project I'm working on does simultaneous sampling of two SPI ADCs, with the main SPI (ADC0) acting as master for the SPI1 (ADC1) slave. At one point I tried making SPI1 the master, and using your library stock as the slave, but for whatever reason, the Teensy would hang early in boot.

I'm sure I've messed something up along the way, and would appreciate a few pointers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.