5/6/2021 0 Comments Lwip Ppp Over Serial Link
If you ultimately need to present this data in an ip fashion (a website hosted by the embedded system) then somewhere in the path you need an ip stack, etc.Fortunately, I found TI including LwIP as part of their ethernet SW in the starterware package, which I assume to ease porting at least on the TI chip side.
![]() If you want to use lwip or some other protocol you probably want to use serialuart not spi. The master selects a single node to connect to its SPI shift register. As it shifts in its data, the slave simultaneously shifts data out. Data is not exchanged unless the master explicitly clocks the data out. Efficient protocols on SPI involve the slave having something useful to output while the master inputs. This may be difficult to arrange, so you usually need a means of indicating null data. Since addressing on SPI is performed by physical chip-select, the addressing inherent in such protocols is meaningless. The master has no way of determining that the slave has copied the data from SPI the shift register before pushing more data. Since SPI is not a network as such, you only need a means to address threads on the selected node. Generally SPI as its names suggests is used to connect to peripheral devices, and in that context the protocol is defined by the peripheral. EEPROMS for example typically use a common or at least compatible command interface across vendors, and SDMMC card SPI interface uses a standardised command test and protocol. Open protocols are designed for generic interoperability and to achieve that might impose significant unnecessary overhead for a closed system, unless perhaps the nodes were running a system that already had a network stack built in. Lwip Ppp Over Serial Link Code For LittleHowever that would only be attractive if both nodes already supported these protocols (running Linux for example), otherwise it will be significant effort and code for little benefit, and would certainly not be efficient. Theres really no reason the same solution methods, such as master periodically polling slaves, couldnt be used with SPI. USB is far more complex than SPI and defines hardware, interconnect, software stacks and device profiles. SPI defines none of that, and SPI controllers are far more primitive, in fact you can implement SPI with GPIO and software. The payback with USB is the ability to connect to third-party devices; with SPI, third party devices such as SDMMC cards and EEPROMs use far simpler protocols. The point is if SPI is what is available, it can be made to work - your concerns inefficiencies, not roadblocks. Why not just roll your own simple packet structure to move the data items you need to move. Depending on how spi is supported on both sides you may or may not be able to use it to define the frame for your data, if not a simple start pattern, length and a trailing checksum and maybe tail pattern would suffice for finding packet boundaries in the stream (no different than a serialuart solution). You can even use the PPP solution for that with a start pattern and I think end pattern with the payload using a two byte pattern whenever the start pattern happens to show up in the data. Yes, I think that an ip stack (lwip or other) will introduce a lot of overhead.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |