SPI Slave Device Active Communication Initiation via UART Query
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing WWAN modules in Internet of Things devices typically only support SPI master mode, restricting the host's ability to actively initiate communication processes via SPI, which is limiting for devices requiring high transmission rates and low power consumption.
Innovation Solution
An SPI-based data transmission method that allows a slave device to actively initiate communication by querying the supported SPI mode through a UART interface, establishing an SPI connection, and enabling full-duplex data transmission, thereby allowing the host to function as either a master or slave device based on application requirements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If USB interface is used for data transmission, then transmission rate is improved (approximately 480 Mbps), but power consumption increases
Solution Approach 1:
The patent changes the communication interface parameter from USB to SPI, achieving a balance between transmission rate and power consumption. SPI provides approximately 24 Mbps transmission rate while consuming less power than USB, resolving the contradiction between speed and energy usage.
2Use of energy by moving object
If UART interface is used for data transmission, then power consumption is reduced, but transmission rate deteriorates (approximately 3 Mbps)
Solution Approach 1:
The patent changes the communication interface parameter from UART to SPI, improving transmission rate from approximately 3 Mbps to approximately 24 Mbps while maintaining relatively low power consumption characteristics of SPI interface.
3Device complexity
If WWAN module supports only SPI master mode, then device complexity is reduced, but adaptability deteriorates (host cannot initiate SPI communication)
Solution Approach 1:
The patent implements multi-functionality in the WWAN module by enabling it to operate in both SPI master mode and SPI slave mode. This allows the module to adapt to different communication scenarios: initiating communication as master or responding to host initiation as slave, thereby improving adaptability without significantly increasing complexity.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
This application provides an SPI-based data transmission method and apparatus. The method includes: sending, by a first device, a first query request to a second device through a UART interface, where the first query request is used to query an SPI mode supported by the second device; if the first device determines, based on a first query response returned by the second device, that the second device supports an SPI master mode, sending, by the first device, an SPI connection establishment request to the second device through the UART interface, so that the second device initiates a process of establishing an SPI connection to the first device; and after the first device establishes the SPI connection to the second device, receiving, by the first device through the SPI, data sent by the second device, or sending data to the second device through the SPI. By using the foregoing method, a problem that an SPI slave device cannot actively initiate SPI communication is avoided, and power consumption is not significantly increased while a transmission rate is ensured.