TWI747416B - Enhanced serial peripheral interface transmission control device and method - Google Patents

Enhanced serial peripheral interface transmission control device and method Download PDF

Info

Publication number
TWI747416B
TWI747416B TW109126366A TW109126366A TWI747416B TW I747416 B TWI747416 B TW I747416B TW 109126366 A TW109126366 A TW 109126366A TW 109126366 A TW109126366 A TW 109126366A TW I747416 B TWI747416 B TW I747416B
Authority
TW
Taiwan
Prior art keywords
signal
slave
master
control device
serial peripheral
Prior art date
Application number
TW109126366A
Other languages
Chinese (zh)
Other versions
TW202207044A (en
Inventor
楊曜丞
Original Assignee
新唐科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 新唐科技股份有限公司 filed Critical 新唐科技股份有限公司
Priority to TW109126366A priority Critical patent/TWI747416B/en
Application granted granted Critical
Publication of TWI747416B publication Critical patent/TWI747416B/en
Publication of TW202207044A publication Critical patent/TW202207044A/en

Links

Images

Abstract

A transmission control device is disclosed, which includes a master device and plurality of slave devices. The master device includes a first serial peripheral interface, and each slave device includes at least a second serial peripheral interface, a frequency counter, and a register. The second selection signal terminal of each second serial peripheral interface is connected to the first selection signal terminal of the first serial peripheral interface and it has at least one common node. Each slave device receives a device identification signal transmitted by the master device, and its frequency counter analyzes whether the device identification signal is the device frequency set by the register.

Description

增強型串列周邊介面傳輸控制裝置及方法Enhanced serial peripheral interface transmission control device and method

本發明是有關於一種傳輸控制裝置及方法,特別是有關於一種增強型串列周邊介面傳輸控制裝置及方法。The present invention relates to a transmission control device and method, in particular to an enhanced serial peripheral interface transmission control device and method.

常規的串列周邊介面(serial peripheral interface, SPI)由時脈訊號(serial clock, SCLK)端、主出從入(master output slave input, MOSI)端、主入從出(master input slave output, MISO)端及選擇訊號(slave selected, SS)端組成,且當一個傳輸控制裝置中的一個主控裝置(master device)藉由串列周邊介面連接一個從控裝置(slave device)並且作資料傳輸時,彼此即需要一個選擇訊號端作一對一的對應。The conventional serial peripheral interface (SPI) consists of the serial clock (SCLK) terminal, the master output slave input (MOSI) terminal, and the master input slave output (MISO) terminal. ) Terminal and select signal (slave selected, SS) terminal, and when a master device (master device) in a transmission control device is connected to a slave device (slave device) through a serial peripheral interface for data transmission , Each needs a selection signal terminal for one-to-one correspondence.

由以上描述可知,當需要連接多個從控裝置時,勢必需要多個選擇訊號端,在裝置的引腳(pin)為有限數目的情形中,此舉造成了引腳數量的浪費。It can be seen from the above description that when multiple slave devices need to be connected, multiple selection signal terminals are inevitably required. In the case where the device has a limited number of pins, this action causes a waste of the number of pins.

為解決上述習知問題,本發明揭露一種傳輸控制裝置,其包含主控裝置及複數個從控裝置。主控裝置至少包含第一串列周邊介面,其中第一串列周邊介面之第一時脈訊號端傳輸裝置辨識訊號,第一主出從入端輸出第一訊號,或第一主入從出端接收第二訊號。To solve the above-mentioned conventional problems, the present invention discloses a transmission control device, which includes a master control device and a plurality of slave control devices. The master control device includes at least a first serial peripheral interface, wherein the first clock signal terminal of the first serial peripheral interface transmits the device identification signal, the first master output and the slave input output the first signal, or the first master input and slave output The end receives the second signal.

複數個從控裝置其分別至少包含第二串列周邊介面、頻率計數器及暫存器,第二串列周邊介面之第二時脈訊號端接收裝置辨識訊號,第二主出從入端接收第一訊號,第二主入從出端輸出第二訊號。A plurality of slave control devices respectively include at least a second serial peripheral interface, a frequency counter, and a register. The second clock signal end of the second serial peripheral interface receives the device identification signal, and the second master output receives the first signal from the input end. One signal, the second main input and the second output output the second signal.

頻率計數器解析裝置辨識訊號,暫存器設定從控裝置之裝置頻率,且裝置頻率包含容錯範圍頻率。其中,複數個從控裝置之裝置頻率之間不重疊,且主控裝置傳送之裝置辨識訊號之頻率範圍包含各複數個從控裝置之裝置頻率,當主控裝置選擇與複數個從控裝置之其中一個進行通訊時,主控裝置產生對應所選從控裝置之裝置頻率的裝置辨識訊號,所選從控裝置根據裝置辨識訊號判斷是否與主控裝置進行通訊。The frequency counter analyzes the device identification signal, the register sets the device frequency of the slave device, and the device frequency includes the frequency of the fault tolerance range. Among them, the device frequencies of a plurality of slave devices do not overlap, and the frequency range of the device identification signal transmitted by the master device includes the device frequency of each plurality of slave devices. When one of them communicates, the master device generates a device identification signal corresponding to the device frequency of the selected slave device, and the selected slave device determines whether to communicate with the master device according to the device identification signal.

根據本發明之實施例,其中裝置辨識訊號傳送之順序優先於第一訊號及第二訊號。According to the embodiment of the present invention, the sequence of the device identification signal transmission takes precedence over the first signal and the second signal.

根據本發明之實施例,其中裝置辨識訊號以至少二個時脈訊號代表。According to an embodiment of the present invention, the device identification signal is represented by at least two clock signals.

根據本發明之實施例,其中第一訊號對應寫入訊號,且第二訊號對應讀取訊號。According to an embodiment of the present invention, the first signal corresponds to the write signal, and the second signal corresponds to the read signal.

本發明也提供一種傳輸控制方法,其適用於傳列周邊介面,其至少包含以下步驟:主控裝置經由第一串列周邊介面之第一時脈訊號端,傳輸裝置辨識訊號至複數個從控裝置。The present invention also provides a transmission control method, which is suitable for transmitting peripheral interfaces, which at least includes the following steps: the master control device passes through the first clock signal end of the first serial peripheral interface, and transmits the device identification signal to a plurality of slave control devices. Device.

複數個從控裝置分別經由第二串列週邊介面之第二時脈訊號端,接收裝置辨識訊號,且分別藉由頻率計數器分析裝置辨識訊號。The plurality of slave control devices respectively receive the device identification signal through the second clock signal end of the second serial peripheral interface, and respectively use the frequency counter analysis device to identify the signal.

主控裝置傳送第一訊號至對應裝置辨識訊號之從控裝置,或對應裝置辨識訊號之從控裝置傳送第二訊號至主控裝置。The master device transmits the first signal to the slave device corresponding to the device identification signal, or the slave device corresponding to the device identification signal transmits the second signal to the master device.

根據本發明之實施例,其中不對應裝置辨識訊號之各從控裝置維持在閒置狀態。According to an embodiment of the present invention, each slave device that does not correspond to the device identification signal is maintained in an idle state.

根據本發明之實施例,其中第一資料訊號對應寫入訊號且第二訊號對應讀取訊號。According to an embodiment of the present invention, the first data signal corresponds to the write signal and the second signal corresponds to the read signal.

承上所述,本發明之傳輸控制裝置及方法具有以下優點:In summary, the transmission control device and method of the present invention have the following advantages:

(1)在不使用選擇訊號端,只使用時脈訊號端、主出從入端及主入從出端就完成一對多的通訊,因此可以達成減少裝置的引腳數目,避免浪費。(1) One-to-many communication is completed by using only the clock signal terminal, the master-out-slave-in terminal, and the master-in-slave output terminal without using the selection signal terminal, so that the number of pins of the device can be reduced and waste is avoided.

(2)藉由主控裝置傳輸裝置辨識訊號至各從控裝置,並且從控裝置藉由頻率計數器解析裝置辨識訊號之頻率,再將對應裝置辨識訊號之從控裝置之選擇訊號端切換至主動狀態或閒置狀態,以進行資料寫入或讀取。如此的操作方式可以在複數個從控裝置中,正確的對特定的從控裝置寫入資料,或是把特定的從控裝置中的資料讀取出。(2) The master device transmits the device identification signal to each slave device, and the slave device analyzes the frequency of the device identification signal through the frequency counter, and then switches the selected signal end of the slave device corresponding to the device identification signal to the active State or idle state for data writing or reading. Such an operation method can correctly write data to a specific slave device or read data from a specific slave device in a plurality of slave control devices.

以下根據第1圖至第5圖,說明本發明的實施方式。所做說明並非為限制本發明的實施方式,而僅為本發明之實施例。Hereinafter, the embodiments of the present invention will be described based on Figs. 1 to 5. The description is not intended to limit the implementation of the present invention, but merely an example of the present invention.

參閱第1圖,其為根據本發明之實施例的傳輸控制裝置示意圖。如圖所示,傳輸控制裝置100包含主控裝置110及複數個從控裝置120。Refer to Figure 1, which is a schematic diagram of a transmission control device according to an embodiment of the present invention. As shown in the figure, the transmission control device 100 includes a master control device 110 and a plurality of slave control devices 120.

根據本發明的實施例,主控裝置110至少包含第一串列周邊介面111,第一串列周邊介面111的第一時脈訊號端112傳輸裝置辨識訊號116、第一主出從入端113輸出第一訊號117,或者第一主入從出端114接收第二訊號118。According to an embodiment of the present invention, the master control device 110 includes at least a first serial peripheral interface 111, a first clock signal terminal 112 of the first serial peripheral interface 111, a transmission device identification signal 116, and a first master output/slave input terminal 113 The first signal 117 is output, or the first main input and slave output 114 receives the second signal 118.

根據本發明的實施例,各從控裝置120分別至少包含第二串列周邊介面121、頻率計數器122及暫存器123。第二串列周邊介面121的第二時脈訊號端124接收由主控裝置110經由第一時脈訊號端112所傳輸的裝置辨識訊號116,第二串列周邊介面121的第二主出從入端125接收由主控裝置110經由第一主出從入端113輸出的第一訊號117,或者主控裝置110的第一主入從出端114接收經由第二串列周邊介面121的第二主入從出端126輸出第二訊號118。According to an embodiment of the present invention, each slave control device 120 includes at least a second serial peripheral interface 121, a frequency counter 122, and a register 123, respectively. The second clock signal terminal 124 of the second serial peripheral interface 121 receives the device identification signal 116 transmitted by the master control device 110 via the first clock signal terminal 112, and the second master-out-slave of the second serial peripheral interface 121 The input 125 receives the first signal 117 output by the main control device 110 via the first main output/slave input 113, or the first main input/slave output 114 of the main control device 110 receives the first signal 117 output via the second serial peripheral interface 121 The two main input and slave output terminals 126 output a second signal 118.

根據本發明的實施例,各從控裝置120的頻率計數器122解析由第二時脈訊號端124接收的裝置辨識訊號116。各從控裝置120的暫存器123可以設定各個從控裝置120的裝置頻率,且各裝置頻率均包含容錯範圍頻率。According to the embodiment of the present invention, the frequency counter 122 of each slave control device 120 analyzes the device identification signal 116 received by the second clock signal terminal 124. The register 123 of each slave control device 120 can set the device frequency of each slave control device 120, and each device frequency includes the fault tolerance range frequency.

根據本發明的實施例,各從控裝置120之裝置頻率之間不重疊,且主控裝置110傳送之裝置辨識訊號116之頻率範圍包含各從控裝置120之裝置頻率,當主控裝置110選擇與各從控裝置120之其中一個進行通訊時,主控裝置110產生對應所選從控裝置120之裝置頻率的裝置辨識訊號116,所選從控裝置120根據裝置辨識訊號116判斷是否與主控裝置110進行通訊。According to the embodiment of the present invention, the device frequencies of each slave device 120 do not overlap, and the frequency range of the device identification signal 116 transmitted by the master device 110 includes the device frequency of each slave device 120. When the master device 110 selects When communicating with one of the slave devices 120, the master device 110 generates a device identification signal 116 corresponding to the device frequency of the selected slave device 120, and the selected slave device 120 determines whether it is with the master according to the device identification signal 116. The device 110 communicates.

上述提及的主控裝置、從控裝置及其包含的串列周邊介面多應用於電子產品內部元件之間的高速資料通訊,例如大容量儲存器之間的資料傳輸。參閱第2圖及第3圖,其中第2圖為先前技術之串列周邊介面之架構示意圖,第3圖為先前技術之串列週邊介面之資料傳輸示意圖。如第2圖所示,串列周邊介面之間為全雙工模式的通訊,通常具有四個保留邏輯訊號介面,即上述提及的時脈訊號端、主出從入端、主入從出端,以及選擇訊號端。如第3圖所示,主控裝置的主出從入端傳送的訊號即對應上述的第一訊號,從控裝置的主入從出端傳送的訊號即對應上述的第二訊號,以及主控裝置的時脈訊號端傳送的訊號即為常規的時脈訊號。The above-mentioned master control device, slave control device and the serial peripheral interfaces contained therein are mostly used for high-speed data communication between internal components of electronic products, such as data transmission between large-capacity storage devices. Refer to Figures 2 and 3, where Figure 2 is a schematic diagram of the prior art serial peripheral interface structure, and Figure 3 is a schematic diagram of the prior art serial peripheral interface data transmission. As shown in Figure 2, the communication between serial peripheral interfaces is in full-duplex mode, usually with four reserved logic signal interfaces, that is, the aforementioned clock signal terminal, master out and slave in, and master in and slave out. Terminal, and select the signal terminal. As shown in Figure 3, the signal transmitted by the master output and slave input of the master control device corresponds to the above-mentioned first signal, and the signal transmitted by the master input and slave output of the slave control device corresponds to the second signal mentioned above, and the master The signal sent by the clock signal end of the device is the regular clock signal.

參閱第4圖,其為根據本發明之實施例之串列週邊介面的資料傳輸示意圖。如圖所示,由主控裝置110的時脈訊號端112傳輸的裝置辨識訊號116,其順序優先於上述提及的第一訊號117及第二訊號118。這代表著當主控裝置110要與從控裝置120進行資料傳輸時,必須先傳送裝置辨識訊號116至各個從控裝置120,主控裝置110藉此進行要對哪一個從控裝置120做資料傳輸的動作。當主控裝置110確定要對哪個從控裝置120傳輸資料之後,再進行第一資料117或第二資料118的傳輸。Refer to FIG. 4, which is a schematic diagram of data transmission of a serial peripheral interface according to an embodiment of the present invention. As shown in the figure, the sequence of the device identification signal 116 transmitted by the clock signal terminal 112 of the master device 110 has priority over the first signal 117 and the second signal 118 mentioned above. This means that when the master device 110 wants to transmit data with the slave device 120, it must first send the device identification signal 116 to each slave device 120, and the master device 110 will use this to perform data transfer to which slave device 120 The action of the transmission. After the master control device 110 determines which slave control device 120 to transmit data to, the first data 117 or the second data 118 is transmitted.

根據本發明的實施例,由主控裝置110的時脈訊號端112傳輸的裝置辨識訊號116,可以用至少二個時脈訊號作為代表。上述提及的各從控裝置120的頻率計數器122即可對此二個時脈訊號進行解析,舉例來說,判斷此二個時脈訊號的上升邊緣或下降邊緣的時間差距,藉此計算出裝置辨識訊號116對應的頻率為何。According to the embodiment of the present invention, the device identification signal 116 transmitted by the clock signal terminal 112 of the main control device 110 can be represented by at least two clock signals. The frequency counter 122 of each slave control device 120 mentioned above can analyze the two clock signals, for example, determine the time difference between the rising edge or the falling edge of the two clock signals, and then calculate What is the frequency corresponding to the device identification signal 116?

根據本發明的實施例,在裝置辨識訊號116之後進行傳輸的第一訊號117,可以代表主控裝置110藉由第一串列周邊介面111的第一主出從入端113傳輸寫入訊號,並且經由第二串列周邊介面121的第二主出從入端125,將資料寫入從控裝置120。According to the embodiment of the present invention, the first signal 117 transmitted after the device identification signal 116 can represent that the master control device 110 transmits the write signal through the first master output and slave input 113 of the first serial peripheral interface 111. In addition, data is written into the slave control device 120 via the second master-out-slave-in terminal 125 of the second serial peripheral interface 121.

根據本發明的實施例,在裝置辨識訊號116之後進行傳輸的第二訊號118,可以代表主控裝置110藉由第一串列周邊介面111的第一主入從出端114,接收經由第二串列周邊介面121的第二主入從出端126傳輸的讀取訊號,將資料由從控裝置120讀取出來。According to the embodiment of the present invention, the second signal 118 transmitted after the device identification signal 116 can represent that the master control device 110 receives the second signal through the second serial peripheral interface 111 through the first master input and slave output 114 of the first serial peripheral interface 111. The reading signal transmitted by the second main input and slave output end 126 of the serial peripheral interface 121 reads the data from the slave control device 120.

根據本發明的實施例,由各個從控裝置120的暫存器123設定的裝置頻率,彼此之間的頻率範圍不互相重疊,且由主控裝置110傳輸至各個從控裝置120的裝置辨識訊號116的頻率範圍,其包含各個暫存器123設定的裝置頻率範圍。由此可以保證主控裝置110傳輸的裝置辨識訊號116,能夠辨識出各個從控裝置120,且不會因為各個從控裝置120的裝置頻率重疊,而發生從控裝置120辨識錯誤的情形。According to the embodiment of the present invention, the device frequency set by the register 123 of each slave control device 120 does not overlap with each other in frequency ranges, and the device identification signal transmitted by the master control device 110 to each slave control device 120 The frequency range of 116 includes the device frequency range set by each register 123. Therefore, it can be ensured that the device identification signal 116 transmitted by the master control device 110 can identify each slave device 120, and the identification error of the slave control device 120 will not occur due to the overlap of the device frequency of each slave control device 120.

參閱第5圖,其根據本發明之實施例之傳輸控制方法步驟流程圖。如圖所示,本發明之傳輸控制方法適用於串列周邊介面,其至少包含以下步驟(S1~S4):Refer to FIG. 5, which is a flowchart of the steps of a transmission control method according to an embodiment of the present invention. As shown in the figure, the transmission control method of the present invention is suitable for serial peripheral interfaces, and it includes at least the following steps (S1~S4):

步驟S1:傳輸控制裝置100中的主控裝置110經由第一串列周邊介面111的第一時脈訊號端112,傳輸裝置辨識訊號116至複數個從控裝置120。Step S1: The master device 110 in the transmission control device 100 transmits the device identification signal 116 to the plurality of slave devices 120 via the first clock signal terminal 112 of the first serial peripheral interface 111.

步驟S2:各個從控裝置120經由第二串列周邊介面121的第二時脈訊號端124,接收裝置辨識訊號116,且分別藉由各從控裝置120的頻率計數器122解析裝置辨識訊號116。Step S2: Each slave device 120 receives the device identification signal 116 via the second clock signal terminal 124 of the second serial peripheral interface 121, and analyzes the device identification signal 116 through the frequency counter 122 of each slave device 120 respectively.

步驟S3:主控裝置110將第一訊號117經由第一串列周邊介面111的第一主出從入端113,傳輸至從控裝置120,其第一訊號117經由第二串列周邊介面121的第二主出從入端125接收。Step S3: The master control device 110 transmits the first signal 117 to the slave control device 120 via the first master output/slave input 113 of the first serial peripheral interface 111, and the first signal 117 is transmitted via the second serial peripheral interface 121 The second main output is received from the input 125.

根據本發明的實施例,或者主控裝置110的第一串列周邊介面111的第一主入從出端114,接收由從控裝置120的第二串列周邊介面121的第二主入從出端126傳輸的第二訊號118。According to the embodiment of the present invention, or the first master-in-slave end 114 of the first serial peripheral interface 111 of the master control device 110 receives the second master-in-slave end 114 of the second serial peripheral interface 121 of the slave control device 120 The second signal 118 transmitted by the output terminal 126.

根據本發明的實施例,各個從控裝置120的頻率計數器122將接收到的裝置辨識訊號116解析之後,若裝置辨識訊號116對應的頻率與從控裝置120的暫存器123設定的裝置頻率不符合,則從控裝置120維持在閒置狀態,如步驟S4。According to the embodiment of the present invention, after the frequency counter 122 of each slave control device 120 analyzes the received device identification signal 116, if the frequency corresponding to the device identification signal 116 is different from the device frequency set by the register 123 of the slave control device 120 If yes, the slave control device 120 is maintained in an idle state, as in step S4.

根據本發明的實施例,第一訊號117對應到主控裝置110藉由第一串列周邊介面111的第一主出從入端113,對從控裝置120進行寫入動作的寫入訊號。According to the embodiment of the present invention, the first signal 117 corresponds to a write signal for the master device 110 to perform a write operation on the slave device 120 through the first master-out-slave-in terminal 113 of the first serial peripheral interface 111.

根據本發明的實施例,其中第二訊號118對應到主控裝置110藉由第一串列周邊介面111的第一主入從出端114,對從控裝置120進行讀取動作的讀取訊號。According to an embodiment of the present invention, the second signal 118 corresponds to the read signal for the master device 110 to perform a read operation on the slave device 120 through the first master input and slave output port 114 of the first serial peripheral interface 111 .

綜合以上描述,本發明的傳輸控制裝置100中的主控裝置110只有一個,而從控裝置120則有不只一個,主控裝置110可藉由輸出裝置辨識訊號116至多個從控裝置120,由從控裝置120判斷是否要回應主控裝置110,與傳統的串列周邊介面之間的選擇訊號端需要一對一的引腳作連接,使得每增加一個從控裝置120就需要多一個引腳的連接方式不相同。Based on the above description, there is only one master control device 110 in the transmission control device 100 of the present invention, and there is more than one slave control device 120. The master control device 110 can identify the signal 116 to a plurality of slave control devices 120 through the output device. The slave control device 120 determines whether to respond to the master control device 110. The selection signal terminal between the serial peripheral interface and the traditional serial peripheral interface requires a one-to-one connection, so that each additional slave device 120 requires one more pin. The connection method is different.

本發明的主控裝置110在對任一個從控裝置120進行資料讀取或寫入之前,先經由第一串列周邊介面111的時脈訊號端傳送裝置辨識訊號116至每個從控裝置120,每個從控裝置120藉由頻率計數器122解析裝置辨識訊號116,得到裝置辨識訊號116所對應的頻率。The master device 110 of the present invention transmits the device identification signal 116 to each slave device 120 through the clock signal end of the first serial peripheral interface 111 before reading or writing data to any slave device 120 Each slave device 120 analyzes the device identification signal 116 through the frequency counter 122 to obtain the frequency corresponding to the device identification signal 116.

舉例來說,頻率計數器122的系統頻率為200MHz,則頻率計數器122藉由偵測輸入訊號的相鄰的上升邊緣或下降邊緣對應的週期數量,若計算出的數量為40,則代表輸入訊號的頻率為5MHz,若計算出的數量為10,則代表輸入訊號的頻率為20MHz。For example, if the system frequency of the frequency counter 122 is 200MHz, the frequency counter 122 detects the number of cycles corresponding to adjacent rising or falling edges of the input signal. If the calculated number is 40, it represents the number of cycles of the input signal. The frequency is 5MHz. If the calculated number is 10, it means that the frequency of the input signal is 20MHz.

利用此種方式,再利用各個從控裝置120的暫存器123設定一個裝置頻率值代表各個從控裝置120的代碼,例如頻率計數器122在裝置辨識訊號116的相鄰兩個上升邊緣或下降邊緣計算的週期數量為40(代表頻率為5MHz),則代表某一個從控裝置120。In this way, the register 123 of each slave control device 120 is then used to set a device frequency value to represent the code of each slave control device 120. For example, the frequency counter 122 is at two adjacent rising edges or falling edges of the device identification signal 116. The calculated number of cycles is 40 (representing a frequency of 5 MHz), which represents a certain slave control device 120.

暫存器123設定的裝置頻率包含一個容錯範圍頻率,舉例來說,頻率計數器122計算出的週期數量為36至44(代表頻率在4.54MHz至5.56MHz之間),均對應到同一個從控裝置120。表1列出當從控裝置不只一個時,各從控裝置可以對應的頻率範圍。The device frequency set by the register 123 includes a fault-tolerant range frequency. For example, the number of cycles calculated by the frequency counter 122 is 36 to 44 (representing a frequency between 4.54MHz and 5.56MHz), which corresponds to the same slave control装置120. Table 1 lists the frequency ranges that each slave device can correspond to when there is more than one slave device.

表1:     頻率範圍 從控裝置1 (5MHz) 頻率 4.54MHz 5MHz 5.56MHz 計數 44 40 36 從控裝置2 (6.6MHz) 頻率 5.88MHz 6.6MHz 7.69MHz 計數 34 30 26 從控裝置3 (10MHz) 頻率 8.3MHz 10MHz 12.5MHz 計數 24 20 16 從控裝置4 (20MHz) 頻率 14.28MHz 20MHz 33.3MHz 計數 14 10 6 Table 1: Frequency Range Slave 1 (5MHz) frequency 4.54MHz 5MHz 5.56MHz count 44 40 36 Slave 2 (6.6MHz) frequency 5.88MHz 6.6MHz 7.69MHz count 34 30 26 Slave 3 (10MHz) frequency 8.3MHz 10MHz 12.5MHz count twenty four 20 16 Slave 4 (20MHz) frequency 14.28MHz 20MHz 33.3MHz count 14 10 6

接著,主控裝置110則對從控裝置120進行寫入資料的動作,或者將資料由從控裝置120讀取出來。進行寫入資料的動作時,資料訊號對應的頻率經由第一串列周邊介面111的第一時脈訊號端112傳輸至從控裝置120,資料訊號則藉由第一主出從入端113傳輸至從控裝置120。Then, the master control device 110 writes data to the slave control device 120, or reads data from the slave control device 120. When writing data, the frequency corresponding to the data signal is transmitted to the slave device 120 via the first clock signal terminal 112 of the first serial peripheral interface 111, and the data signal is transmitted from the input terminal 113 through the first master output To the slave control device 120.

反之,進行讀取資料的動作時,資料訊號對應的頻率經由第一串列周邊介面111的第一時脈訊號端112傳輸至從控裝置120,資料訊號則藉由第二串列周邊介面121的第二主入從出端126讀出至主控裝置110。Conversely, when reading data, the frequency corresponding to the data signal is transmitted to the slave device 120 through the first clock signal terminal 112 of the first serial peripheral interface 111, and the data signal is transmitted through the second serial peripheral interface 121 The second main input of is read from the output terminal 126 to the main control device 110.

作為非限制性實施例,本文描述的方法和系統可用於各種應用,例如在安全記憶體應用、物聯網(IoT)應用、嵌入式應用或汽車應用中,在此僅舉幾個例子。As a non-limiting example, the methods and systems described herein can be used in various applications, such as in secure memory applications, Internet of Things (IoT) applications, embedded applications, or automotive applications, to name just a few examples.

100:傳輸控制裝置 110:主控裝置 111:第一串列周邊介面 112:第一時脈訊號端 113:第一主出從入端 114:第一主入從出端 116:裝置辨識訊號 117:第一訊號 118:第二訊號 120:從控裝置 121:第二串列周邊介面 122:頻率計數器 123:暫存器 124:第二時脈訊號端 125:第二主出從入端 126:第二主入從出端 S1~S4:步驟100: Transmission control device 110: Master control device 111: The first serial peripheral interface 112: The first clock signal terminal 113: The first master out from the incoming end 114: The first main input from the output end 116: Device identification signal 117: First Signal 118: The second signal 120: Slave control device 121: The second serial peripheral interface 122: frequency counter 123: register 124: The second clock signal terminal 125: Second main out and slave in 126: Second main input from output S1~S4: steps

為讓本發明之上述和其他目的、特徵、優點與實施例能更明顯易懂,所附附圖之說明如下: 第1圖為根據本發明之實施例之傳輸控制裝置示意圖。 第2圖為先前技術之串列周邊介面之架構示意圖。 第3圖為先前技術之串列週邊介面之資料傳輸示意圖。 第4圖為根據本發明之實施例之串列週邊介面的資料傳輸示意圖。 第5圖為根據本發明之實施例之傳輸控制方法步驟流程圖。 In order to make the above and other objects, features, advantages and embodiments of the present invention more comprehensible, the description of the attached drawings is as follows: Figure 1 is a schematic diagram of a transmission control device according to an embodiment of the present invention. Figure 2 is a schematic diagram of the prior art serial peripheral interface architecture. Figure 3 is a schematic diagram of data transmission of the serial peripheral interface of the prior art. FIG. 4 is a schematic diagram of data transmission of a serial peripheral interface according to an embodiment of the present invention. Figure 5 is a flow chart of the steps of a transmission control method according to an embodiment of the present invention.

100:傳輸控制裝置 100: Transmission control device

110:主控裝置 110: Master control device

111:第一串列周邊介面 111: The first serial peripheral interface

112:第一時脈訊號端 112: The first clock signal terminal

113:第一主出從入端 113: The first master out from the incoming end

114:第一主入從出端 114: The first main input from the output end

116:裝置辨識訊號 116: Device identification signal

117:第一訊號 117: First Signal

118:第二訊號 118: The second signal

120:從控裝置 120: Slave control device

121:第二串列周邊介面 121: The second serial peripheral interface

122:頻率計數器 122: frequency counter

123:暫存器 123: register

124:第二時脈訊號端 124: The second clock signal terminal

125:第二主出從入端 125: Second main out and slave in

126:第二主入從出端 126: The second main input from the output

Claims (7)

一種傳輸控制裝置,其包含: 一主控裝置(master device),其至少包含: 一第一串列周邊介面(serial peripheral interface, SPI),其一第一時脈(serial clock, SCLK)訊號端傳輸一裝置辨識訊號,一第一主出從入(master output slave input, MOSI)端輸出一第一訊號或一第一主入從出(master input slave output, MISO)端接收一第二訊號;以及 複數個從控裝置(slave device),其分別至少包含: 一第二串列周邊介面,其一第二時脈訊號端接收該裝置辨識訊號,一第二主出從入端接收該第一訊號,一第二主入從出端輸出該第二訊號; 一頻率計數器,其解析該裝置辨識訊號;以及 一暫存器,其設定該從控裝置之一裝置頻率,且該裝置頻率包含一容錯範圍頻率; 其中,複數個從控裝置之該裝置頻率之間不重疊,且該主控裝置傳送之該裝置辨識訊號之頻率範圍包含各該複數個從控裝置之該裝置頻率,當該主控裝置選擇與複數個從控裝置之其中一個進行通訊時,該主控裝置係產生對應該所選從控裝置之該裝置頻率的裝置辨識訊號,該所選從控裝置根據裝置辨識訊號判斷是否與該主控裝置進行通訊。 A transmission control device, which includes: A master device, which includes at least: A first serial peripheral interface (SPI), a first clock (SCLK) signal terminal transmits a device identification signal, and a first master output slave input (MOSI) The terminal outputs a first signal or a first master input slave output (master input slave output, MISO) terminal receives a second signal; and A plurality of slave devices, each of which includes at least: A second serial peripheral interface, a second clock signal terminal of which receives the device identification signal, a second master output and slave input terminal receives the first signal, and a second master input and slave output terminal outputs the second signal; A frequency counter that analyzes the device identification signal; and A register, which sets a device frequency of the slave device, and the device frequency includes a fault-tolerant range frequency; Wherein, the device frequencies of a plurality of slave devices do not overlap, and the frequency range of the device identification signal transmitted by the master device includes the device frequency of each of the plurality of slave devices, when the master device selects and When one of a plurality of slave devices communicates, the master device generates a device identification signal corresponding to the device frequency of the selected slave device, and the selected slave device determines whether it is with the master based on the device identification signal The device communicates. 如請求項1所述之傳輸控制裝置,其中該裝置辨識訊號傳送之順序優先於該第一訊號及該第二訊號。The transmission control device according to claim 1, wherein the sequence of the device identification signal transmission has priority over the first signal and the second signal. 如請求項2所述之傳輸控制裝置,其中該裝置辨識訊號以至少二個時脈訊號代表。The transmission control device according to claim 2, wherein the device identification signal is represented by at least two clock signals. 如請求項2所述之傳輸控制裝置,其中該第一訊號對應一寫入訊號,且該第二訊號對應一讀取訊號。The transmission control device according to claim 2, wherein the first signal corresponds to a write signal, and the second signal corresponds to a read signal. 一種傳輸控制方法,適用於串列周邊介面,其至少包含以下步驟: 一主控裝置經由一第一串列周邊介面之一第一時脈訊號端,傳輸一裝置辨識訊號至複數個從控裝置; 該複數個從控裝置分別經由一第二串列週邊介面之一第二時脈訊號端,接收該裝置辨識訊號,且分別藉由一頻率計數器分析該裝置辨識訊號;以及 該主控裝置傳送一第一訊號至對應該裝置辨識訊號之該從控裝置,或對應該裝置辨識訊號之該從控裝置傳送一第二訊號至該主控裝置。 A transmission control method suitable for serial peripheral interfaces, which includes at least the following steps: A master control device transmits a device identification signal to a plurality of slave control devices via a first clock signal end of a first serial peripheral interface; The plurality of slave devices receive the device identification signal through a second clock signal end of a second serial peripheral interface, and analyze the device identification signal by a frequency counter respectively; and The master control device transmits a first signal to the slave control device corresponding to the device identification signal, or the slave control device corresponding to the device identification signal transmits a second signal to the master control device. 如請求項5所述之傳輸控制方法,其中不對應該裝置辨識訊號之各該從控裝置維持在一閒置狀態。The transmission control method according to claim 5, wherein each slave control device that does not correspond to the device identification signal is maintained in an idle state. 如請求項5所述之傳輸控制方法,其中該第一訊號對應一寫入訊號且該第二訊號對應一讀取訊號。The transmission control method according to claim 5, wherein the first signal corresponds to a write signal and the second signal corresponds to a read signal.
TW109126366A 2020-08-04 2020-08-04 Enhanced serial peripheral interface transmission control device and method TWI747416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109126366A TWI747416B (en) 2020-08-04 2020-08-04 Enhanced serial peripheral interface transmission control device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109126366A TWI747416B (en) 2020-08-04 2020-08-04 Enhanced serial peripheral interface transmission control device and method

Publications (2)

Publication Number Publication Date
TWI747416B true TWI747416B (en) 2021-11-21
TW202207044A TW202207044A (en) 2022-02-16

Family

ID=79907788

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109126366A TWI747416B (en) 2020-08-04 2020-08-04 Enhanced serial peripheral interface transmission control device and method

Country Status (1)

Country Link
TW (1) TWI747416B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI812194B (en) * 2022-04-27 2023-08-11 凌通科技股份有限公司 Serial peripheral interface compatibility extension switching method and embedded system using the same

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201063161Y (en) * 2007-06-08 2008-05-21 威盛电子股份有限公司 Primary device for serial peripheral interface
TWI346874B (en) * 2006-06-15 2011-08-11 Pixart Imaging Inc Multimedia data communication method and system
TW201329723A (en) * 2006-11-02 2013-07-16 Intel Corp PCI express enhancements and extensions
CN104881389A (en) * 2014-02-27 2015-09-02 英飞凌科技股份有限公司 Clockless serial slave device
JP5988449B2 (en) * 2013-10-10 2016-09-07 ノキア テクノロジーズ オーユー Serial communication via communication control pin
US9734118B2 (en) * 2013-10-16 2017-08-15 The Regents Of The University Of California Serial bus interface to enable high-performance and energy-efficient data logging
US20190324923A1 (en) * 2018-04-20 2019-10-24 Microsoft Technology Licensing, Llc Serial peripheral interface filter for processor security
US10649945B1 (en) * 2018-12-10 2020-05-12 Analog Devices International Unlimited Company Non-native digital interface support over a two-wire communication bus
US10719469B2 (en) * 2017-02-28 2020-07-21 Intel Corporation Inband messaging method for integrated type-C universal serial bus detection using enhanced serial peripheral interconnect

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI346874B (en) * 2006-06-15 2011-08-11 Pixart Imaging Inc Multimedia data communication method and system
TW201329723A (en) * 2006-11-02 2013-07-16 Intel Corp PCI express enhancements and extensions
CN201063161Y (en) * 2007-06-08 2008-05-21 威盛电子股份有限公司 Primary device for serial peripheral interface
JP5988449B2 (en) * 2013-10-10 2016-09-07 ノキア テクノロジーズ オーユー Serial communication via communication control pin
US9734118B2 (en) * 2013-10-16 2017-08-15 The Regents Of The University Of California Serial bus interface to enable high-performance and energy-efficient data logging
CN104881389A (en) * 2014-02-27 2015-09-02 英飞凌科技股份有限公司 Clockless serial slave device
US10719469B2 (en) * 2017-02-28 2020-07-21 Intel Corporation Inband messaging method for integrated type-C universal serial bus detection using enhanced serial peripheral interconnect
US20190324923A1 (en) * 2018-04-20 2019-10-24 Microsoft Technology Licensing, Llc Serial peripheral interface filter for processor security
US10649945B1 (en) * 2018-12-10 2020-05-12 Analog Devices International Unlimited Company Non-native digital interface support over a two-wire communication bus

Also Published As

Publication number Publication date
TW202207044A (en) 2022-02-16

Similar Documents

Publication Publication Date Title
US6182183B1 (en) Communications system and method with multilevel connection identification
US5202884A (en) Multiplexing scheme for modem control signals
US20150074306A1 (en) Single Wire Communications Interface and Protocol
US7269088B2 (en) Identical chips with different operations in a system
US20030041205A1 (en) USB compound device and the method for implementation thereof
US20130262724A1 (en) Method and Circuit Arrangement for Transmitting Data Between Processor Modules
US10922263B2 (en) Serial communication device
EP3859542B1 (en) Spi broadcast mode
TWI747416B (en) Enhanced serial peripheral interface transmission control device and method
US7970959B2 (en) DMA transfer system using virtual channels
CN115033515A (en) Master-slave SPI communication method
US10860513B1 (en) I3C hub promoting backward compatibility with I2C
CN108920299B (en) Storage medium
CN109379262B (en) Dual-redundancy CAN bus communication card and method for PCIe interface
CN111506461A (en) Bus-based back pressure module for testing and implementation method thereof
CN216772401U (en) Main equipment main control function implementation system
JP5109597B2 (en) Data transfer device and semiconductor test device
CN114443524A (en) Data transmission method, system, storage medium and equipment
US7373541B1 (en) Alignment signal control apparatus and method for operating the same
TWM321548U (en) Control device for level shift of IIC
CN116185936B (en) SPI communication data receiving and transmitting abnormity detection control system and detection method
TWI739294B (en) Signal transceiving system and method
CN216719084U (en) I2C bus system
US20240134807A1 (en) Logic control device of serial peripheral interface, master-slave system, and master-slave switchover method therfor
US20240089195A1 (en) Increased radio frequency front-end (rffe) throughput using port aggregation