We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Is it possible to use MDK-pro IP networking SLIP with SPI physical interface, which can run faster than UART?
Would imagine you could, might want to be careful about how you achieve bit/byte synchronization on SPI
Using UART, both ends are some kind of masters in transmit direction, and slaves in receive direction. With SPI is a different story. One end (master) initiates both transmit and receive, the other end (slave) sends and receives data as instructed by the master.
SLIP at low end sends/receives a byte asynchronously. UART can do that by its nature, but SPI not. So you have to emulate this mode in software.
The question is however, what is a benefit of doing this, since a CPU has much more work to do for each byte it transmits or receives. (byte stuffing, checksum calculation and validation, etc.) Ethernet MAC controller performs all those actions in hardware. So the speed gain using SPI with SLIP might not be so obvious.
Using a modified SPI bus, a continuous SPI also known as PCM bus, would be a better idea.
Can it?
Check the datasheet: Most UARTs can go at mega bit/s rates - it's usually just the RS232 transceiver that limits the speed...
(or the desire/need to stick to "standard" baud rates)
UART is limited to 3.7Mbps (with 59MHz clock) or 5.5Mbps at overclocked 88MHz.
Most SPI can go at higher baudrates than corresponding UARTs for the reason that a UART normally sample the input at 8 or 16 times the baudrate - this to synchronize well with the start bit and still support baudrate errors without failing near the stop bit(s).
The SPI doesn't need that, since there is a dedicated clock signal that informs when it's time to sample the input. So while some UART can do Mbit/s, we instead have some SPI that can do 50Mbit/s or more.