TWI767234B - Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device - Google Patents

Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device Download PDF

Info

Publication number
TWI767234B
TWI767234B TW109116947A TW109116947A TWI767234B TW I767234 B TWI767234 B TW I767234B TW 109116947 A TW109116947 A TW 109116947A TW 109116947 A TW109116947 A TW 109116947A TW I767234 B TWI767234 B TW I767234B
Authority
TW
Taiwan
Prior art keywords
data
chip
peripheral interface
test
serial
Prior art date
Application number
TW109116947A
Other languages
Chinese (zh)
Other versions
TW202145024A (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 TW109116947A priority Critical patent/TWI767234B/en
Publication of TW202145024A publication Critical patent/TW202145024A/en
Application granted granted Critical
Publication of TWI767234B publication Critical patent/TWI767234B/en

Links

Images

Abstract

本發明主要揭示一種串行周邊介面的傳輸速率提升方法,其應用在一資料傳輸電路之中,該資料傳輸電路包括一主控端晶片、一受控端晶片以及耦接於該主控端晶片與該受控端晶片之間的一串行周邊介面。藉由執行本發明之串行周邊介面的傳輸速率提升方法應用於所述資料傳輸電路之中,該主控端晶片可決定一延時參數從而向該受控端晶片配置所述延時參數,藉此方式保證經由該串行周邊介面之MISO通道所傳輸的串行資料不會因為時間延遲而出現傳輸錯誤現象,使所述串行周邊介面可以滿足該主控端晶片與該受控端晶片之間的高速傳輸需求。The present invention mainly discloses a method for increasing the transmission rate of a serial peripheral interface, which is applied in a data transmission circuit. The data transmission circuit includes a master chip, a slave chip, and a chip coupled to the master chip. A serial peripheral interface with the controlled end chip. By implementing the method for increasing the transmission rate of the serial peripheral interface of the present invention and applying it to the data transmission circuit, the master chip can determine a delay parameter and configure the delay parameter to the slave chip, thereby The method ensures that the serial data transmitted through the MISO channel of the serial peripheral interface will not have transmission errors due to time delay, so that the serial peripheral interface can meet the requirements between the host chip and the slave chip. high-speed transmission requirements.

Description

串行周邊介面的傳輸速率提升方法、資料傳輸電路及資訊處理裝置Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device

本發明係關於晶片與晶片之間的資料傳輸的技術領域,尤指一種串行周邊介面(Serial peripheral interface, SPI)的傳輸速率提升方法。The present invention relates to the technical field of data transmission between chips, in particular to a method for increasing the transmission rate of a serial peripheral interface (SPI).

已知,不同類型的電子產品之中配置有用以執行不同工作的各種電子晶片,故此,如何讓兩個電子晶片之間能夠高效率地進行資料傳輸是非常重要的。目前,IIC與SPI這二種串行(序列)介面分別由飛利浦(Philips)和摩托羅拉(Motorola)所提出,讓微控制器與其週邊晶片能夠在大幅減少使用接腳的情況下達成晶片與晶片之間的通信(資料傳輸),例如:感測器、類比數位轉換器、數位類比轉換器、移位寄存器、靜態隨機存取記憶體、快閃記憶體等。It is known that various electronic chips for performing different tasks are configured in different types of electronic products. Therefore, it is very important to efficiently transmit data between two electronic chips. At present, the two serial (serial) interfaces, IIC and SPI, are proposed by Philips and Motorola, respectively, which allow microcontrollers and their peripheral chips to achieve chip-to-chip communication while greatly reducing the use of pins. Communication (data transfer) between devices, such as sensors, analog-to-digital converters, digital-to-analog converters, shift registers, static random access memory, flash memory, etc.

圖1為習知的一種資料傳輸電路的第一方塊圖。如圖1所示,在使用一串行周邊介面(Serial peripheral interface, SPI)進行資料傳輸的習知的資料傳輸電路之中,一主控端(Master end)晶片1a具有一第一腳位11a、一第二腳位12a、一第三腳位13a、以及一第四腳位14a,且一受控端(Slave end)晶片2a同樣具有一第一腳位21a、一第二腳位22a、一第三腳位23a、以及一第四腳位24a。在串行周邊介面的傳輸協定中,主控端晶片1a以其第一腳位11a分別傳送一串行時鐘信號(Serial clock, SCK)和一片選信號(Chip select, CS)至受控端晶片2a的第一腳位21a和第二腳位22a。FIG. 1 is a first block diagram of a conventional data transmission circuit. As shown in FIG. 1, in a conventional data transmission circuit using a serial peripheral interface (SPI) for data transmission, a master end chip 1a has a first pin 11a , a second pin 12a, a third pin 13a, and a fourth pin 14a, and a slave end chip 2a also has a first pin 21a, a second pin 22a, A third pin 23a, and a fourth pin 24a. In the serial peripheral interface transmission protocol, the first pin 11a of the master chip 1a transmits a serial clock signal (Serial clock, SCK) and a chip select signal (Chip select, CS) to the slave chip 1a respectively. The first pin 21a and the second pin 22a of 2a.

透過第三腳位13a,主控端晶片1a可將其主控端寄存器10a之中的一第一串行資料傳送(驅動)至一MOSI通道,從而使受控端晶片2a以其第三腳位23a通過所述MOSI通道接收該第一串行資料。此處所稱MOSI指的是主控端輸出(Master out)而受控端(Slave in)輸入。另一方面,向受控端晶片2a讀取(採樣)一第二串行資料時,受控端晶片2a透過第四腳位24a將其受控端寄存器20a之中的一第二串行資料傳送(驅動)至一MISO通道,從而使主控端晶片1a以其第四腳位14a通過所述MISO通道接收(採樣)該第二串行資料。此處所稱MISO指的是主控端輸入(Master in)而受控端(Slave out)輸出。Through the third pin 13a, the master chip 1a can transmit (drive) a first serial data in the master register 10a to a MOSI channel, so that the slave chip 2a uses the third pin Bit 23a receives the first serial data through the MOSI channel. The MOSI referred to here refers to the output of the master terminal (Master out) and the input of the slave terminal (Slave in). On the other hand, when reading (sampling) a second serial data from the controlled end chip 2a, the controlled end chip 2a sends a second serial data in the controlled end register 20a through the fourth pin 24a It is transmitted (driven) to a MISO channel, so that the host chip 1a receives (samples) the second serial data through the MISO channel with its fourth pin 14a. The MISO here refers to the input of the master (Master in) and the output of the slave (Slave out).

圖2為經由習知的串行周邊介面所傳輸之信號的第一工作時序圖。如下表一所示,依據時鐘極性(Clock polarity, CPOL)和時鐘相位(Clock phase, CPHA),習知的串行周邊介面的資料傳輸模式可以有四種。 表(1) 模式 CPOL CPHA 串行資料 驅動及/或採樣 0 0 0 在SCK上升沿採樣 在SCK下降沿驅動 1 0 1 在SCK下降沿採樣 在SCK上升沿驅動 2 1 0 在SCK下降沿採樣 在SCK上升沿驅動 3 1 1 在SCK上升沿採樣 在SCK下降沿驅動 FIG. 2 is a first operation timing diagram of a signal transmitted through a conventional serial peripheral interface. As shown in Table 1 below, according to the clock polarity (Clock polarity, CPOL) and the clock phase (Clock phase, CPHA), the conventional serial peripheral interface can have four data transmission modes. Table 1) model CPOL CPHA Serial data driving and/or sampling 0 0 0 Sampling on SCK rising edge Driven on SCK falling edge 1 0 1 Sampling on SCK falling edge Driven on SCK rising edge 2 1 0 Sampling on SCK falling edge Driven on SCK rising edge 3 1 1 Sampling on SCK rising edge Driven on SCK falling edge

圖3為習知的資料傳輸電路的第二方塊圖。如圖3所示,在實際應用中,所述受控端晶片2a可能是設置在一受控端板件3a之上,其中該受控端板件3a的一第一電接點31a、一第二電接點32a、一第三電接點33a、以及一第四電接點34a用以分別耦接一主控端板件4a的一第一電接點41a、一第二電接點42a、一第三電接點43a、以及一第四電接點44a。FIG. 3 is a second block diagram of a conventional data transmission circuit. As shown in FIG. 3, in practical applications, the controlled end chip 2a may be disposed on a controlled end plate member 3a, wherein a first electrical contact 31a of the controlled end plate member 3a, a The second electrical contact 32a, a third electrical contact 33a, and a fourth electrical contact 34a are used for coupling to a first electrical contact 41a and a second electrical contact of a main control end board 4a, respectively 42a, a third electrical contact 43a, and a fourth electrical contact 44a.

請同時參閱圖4所繪示之經由習知的行周邊介面所傳輸之信號的第二工作時序圖。如圖3與圖4所示,在實際應用中,板對板的傳輸時間延遲(Board to Board (B2B) delay)會在所述串行時鐘信號SCK經由主控端板件4a的第一電接點41a傳送至受控端板件3a的第一電接點31a的過程中發生。同時,板對裝置的傳輸時間延遲(Board to Device (B2D) delay)會在所述串行時鐘信號SCK經由受控端板件3a的第一電接點31a傳送到受控端晶片2a的第一腳位21a的過程中發生。進一步地,在向受控端晶片2a讀取資料的情況下,裝置對板的傳輸時間延遲(Device to Board (D2B) delay)會在串行資料經由受控端晶片2a的第四腳位24a傳送到受控端板件3a的第四電接點34a的過程中發生。同時,板對版的傳輸時間延遲(B2B delay)也同樣的會在所述串行資料經由受控端板件3a的第四電接點34a傳送到主控端板件4a的第四電接點44a的過程中發生。Please also refer to the second operation timing diagram of the signal transmitted through the conventional line peripheral interface shown in FIG. 4 . As shown in FIG. 3 and FIG. 4 , in practical applications, the board-to-board (B2B) delay will occur when the serial clock signal SCK passes through the first electrical circuit of the main control end board 4a. This occurs during the transfer of the contact 41a to the first electrical contact 31a of the controlled end plate member 3a. At the same time, the Board to Device (B2D) delay will be transmitted to the second terminal chip 2a via the first electrical contact 31a of the controlled terminal board 3a when the serial clock signal SCK is transmitted. occurs during the course of a pin 21a. Further, in the case of reading data from the controlled end chip 2a, the device to board (D2B) delay will occur when the serial data passes through the fourth pin 24a of the controlled end chip 2a This occurs during transmission to the fourth electrical contact 34a of the controlled end plate member 3a. At the same time, the board-to-board transmission time delay (B2B delay) is also transmitted to the fourth electrical connection of the master control end board 4a via the fourth electrical contact 34a of the controlled end board 3a. occurs during point 44a.

進一步地,若受控端晶片2a還同時發生內部傳輸時間延遲(Trans_delay),則在透過串行周邊介面進行信號傳輸的過程中所發生的時間延遲(Time delay)的計算方式為:(B2B delay)+(B2D delay)+(Trans_delay)+(D2B delay)+(B2B delay)。假設串行時鐘信號SCK的工作頻率為f,則其對應的週期為T。如圖4所示,在時間延遲(Time delay)大於T/2的情況下,傳輸於MISO通道之中的串行資料便會出現資料錯誤的現象。實務經驗指出,當串行時鐘信號SCK的工作頻率越高,則資料傳輸的頻寬也越大,從而使得資料傳輸的速率也越快。可惜的是,隨著資料速率的提升,信號傳輸過程中所發生的時間延遲現象也越顯著,導致習知的串行周邊介面無法以理想速率進行資料傳輸。Further, if the internal transmission time delay (Trans_delay) also occurs at the controlled end chip 2a at the same time, the calculation method of the time delay (Time delay) that occurs during the signal transmission process through the serial peripheral interface is: (B2B delay )+(B2D delay)+(Trans_delay)+(D2B delay)+(B2B delay). Assuming that the operating frequency of the serial clock signal SCK is f, its corresponding period is T. As shown in FIG. 4 , when the time delay (Time delay) is greater than T/2, the serial data transmitted in the MISO channel will have a data error phenomenon. Practical experience points out that when the operating frequency of the serial clock signal SCK is higher, the bandwidth of data transmission is also larger, so that the rate of data transmission is also faster. Unfortunately, with the increase of the data rate, the time delay phenomenon in the signal transmission process becomes more and more obvious, which makes the conventional serial peripheral interface unable to transmit the data at the ideal rate.

由上述說明可知,本領域亟需一種串行周邊介面的傳輸速率提升方法。It can be seen from the above description that there is an urgent need in the art for a method for increasing the transmission rate of a serial peripheral interface.

本發明之主要目的在於提供一種串行周邊介面的傳輸速率提升方法,其應用在包括一主控端晶片、一受控端晶片以及一串行周邊介面的一資料傳輸電路之中,使該主控端晶片可向該受控端晶片配置一延時參數,保證經由該串行周邊介面所傳輸的串行資料不會因為時間延遲而出現傳輸錯誤現象,從而滿足該主控端晶片與該受控端晶片之間的高速傳輸需求。The main purpose of the present invention is to provide a method for increasing the transmission rate of a serial peripheral interface, which is applied in a data transmission circuit including a master chip, a slave chip and a serial peripheral interface, so that the master The control end chip can configure a delay parameter to the controlled end chip to ensure that the serial data transmitted through the serial peripheral interface will not have transmission errors due to time delay, so as to satisfy the requirements of the control end chip and the controlled end chip. High-speed transfer requirements between end wafers.

為達成上述目的,本發明提出所述串行周邊介面的傳輸速率提升方法的一實施例,其包括:In order to achieve the above object, the present invention provides an embodiment of the method for increasing the transmission rate of the serial peripheral interface, which includes:

(1)在一受控端晶片內部設置X個測試寄存器,X為正整數;(1) X test registers are set inside a controlled end chip, and X is a positive integer;

(2)令一主控端晶片通過一串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;其中,i的起始值為1,且i≦X;(2) Make a host chip write a serial data for testing to the ith of the X test registers through a serial peripheral interface, and then from the ith of the test registers through the serial peripheral interface Read out the serial data for the test; wherein, the initial value of i is 1, and i≦X;

(3)對讀出的所述測試用串行資料執行一資料正確性檢查,在所述資料正確性檢查為不通過之情況下執行以下步驟(4),且在所述資料正確性檢查為通過之情況下執行以下步驟(5);(3) Perform a data correctness check on the read serial data for testing, and perform the following step (4) if the data correctness check fails, and when the data correctness check is In the case of passing, perform the following steps (5);

(4)透過該主控端晶片配置一延時參數至該受控端晶片,接著重複執行該步驟(2);以及(4) configuring a delay parameter to the slave chip through the master chip, and then repeating the step (2); and

(5)在i小於X的情況下,該主控端晶片通過所述串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟(3);且在i等於X的情況下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數即確認有效。(5) In the case that i is less than X, the host chip writes a test serial data to the i+1 th of the X test registers through the serial peripheral interface, and then passes the serial The peripheral interface reads the test serial data from the i+1th test register, and then repeats the step (3); and when i is equal to X, the X test registers have all completed the test With the data correctness check of the serial data, the delay parameter is confirmed to be valid.

在一實施例中,所述之串行周邊介面的傳輸速率提升方法更包括以下步驟:In one embodiment, the method for increasing the transmission rate of the serial peripheral interface further includes the following steps:

(6)該主控端晶片與該受控端晶片開始透過所述串行周邊介面進行至少一串行資料之傳輸作業。(6) The host chip and the slave chip start to transmit at least one serial data through the serial peripheral interface.

在一實施例中,該主控端晶片通過該串行周邊介面自所述測試寄存器讀出所述測試用串行資料時,不對讀出的所述測試用串行資料之一第一位元組(bytes)執行該資料正確性檢查。In one embodiment, when the host chip reads the test serial data from the test register through the serial peripheral interface, it does not use a first bit of the read test serial data The group (bytes) performs this data correctness check.

在一實施例中,X個所述測試寄存器皆具有一寄存器地址,且X個所述寄存器地址由該主控端晶片設定。In one embodiment, each of the X test registers has a register address, and the X number of the register addresses are set by the host chip.

在一實施例中,各所述寄存器地址彼此不同,而各所述測試用串行資料彼此相同或不同。In one embodiment, the register addresses are different from each other, and the serial data for testing are the same or different from each other.

本發明同時提供一種資料傳輸電路,具有一主控端晶片、至少一受控端晶片以及耦接於該主控端晶片和所述至少一受控端晶片之間的至少一串行周邊介面;其特徵在於,所述受控端晶片內部設置X個測試寄存器,且該主控端晶片透過執行一傳輸速率提升方法以提升所述串行周邊介面之一串行資料傳輸的傳輸速率;該傳輸速率提升方法包括:The present invention also provides a data transmission circuit comprising a master chip, at least one slave chip, and at least one serial peripheral interface coupled between the master chip and the at least one slave chip; It is characterized in that, X test registers are set inside the controlled end chip, and the master control end chip executes a transmission rate improvement method to increase the transmission rate of a serial data transmission of the serial peripheral interface; the transmission Rate boosting methods include:

(1)令該主控端晶片通過所述至少一串行周邊介面之一選定的串行周邊介面寫入一測試用串行資料至所述至少一受控端晶片中之一選定的受控端晶片之所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;其中,X為正整數,i的起始值為1,且i≦X;(1) Make the host chip write a serial data for testing to the selected slave chip of the at least one slave chip through a selected serial peripheral interface of the at least one serial peripheral interface The ith of the X test registers of the end chip, and then read the serial data for testing from the ith test register through the serial peripheral interface; wherein, X is a positive integer, and the initial value of i is 1, and i≦X;

(2)對讀出的所述測試用串行資料執行一資料正確性檢查,在所述資料正確性檢查為不通過之情況下執行以下步驟(3),且在所述資料正確性檢查為通過之情況下執行以下步驟(4);(2) Perform a data correctness check on the read serial data for testing, and execute the following step (3) if the data correctness check fails, and when the data correctness check is In the case of passing, perform the following steps (4);

(3)透過該主控端晶片配置一延時參數至該選定的受控端晶片,接著重複執行該步驟(2);(3) configuring a delay parameter to the selected controlled end chip through the master chip, and then repeating the step (2);

(4)在i小於X的情況下,該主控端晶片通過該選定的串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該選定的串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟(3);且在i等於X的情況下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數即確認有效;以及(4) In the case that i is less than X, the host chip writes a test serial data to the i+1 th of the X test registers through the selected serial peripheral interface, and then passes the selected serial data The serial peripheral interface reads the test serial data from the i+1th test register, and then repeats the step (3); and in the case where i is equal to X, the X test registers have all been completed The data correctness of the test serial data is checked, and the delay parameter is confirmed to be valid; and

(5)該主控端晶片與該選定的受控端晶片開始透過該選定的串行周邊介面進行至少一串行資料之傳輸作業。(5) The host chip and the selected slave chip start to transmit at least one serial data through the selected serial peripheral interface.

在本發明所述之資料傳輸電路的一實施例中,該主控端晶片通過該選定的串行周邊介面自所述測試寄存器讀出該測試用串行資料時,不對讀出的所述測試用串行資料之一第一位元組執行所述資料正確性檢查。In an embodiment of the data transmission circuit of the present invention, when the host chip reads out the test serial data from the test register through the selected serial peripheral interface, the test of the readout is not performed. The data correctness check is performed with a first tuple of one of the serial data.

在本發明所述之資料傳輸電路的一實施例中,X個所述測試寄存器皆具有一寄存器地址,各所述寄存器地址彼此不同,且各所述測試用串行資料彼此相同或不同。In an embodiment of the data transmission circuit of the present invention, each of the X test registers has a register address, each of the register addresses is different from each other, and each of the test serial data is the same or different from each other.

本發明同時提供一種資訊處理裝置,其具有一中央處理單元及如前所述本發明之資料傳輸電路,其中,該中央處理單元係用以與所述資料傳輸電路通信。The present invention also provides an information processing device having a central processing unit and the data transmission circuit of the present invention as described above, wherein the central processing unit is used for communicating with the data transmission circuit.

在可行的實施例中,所述資訊處理裝置可為智能手機、平板電腦、筆記型電腦、一體式電腦、智能手錶或門禁裝置。In a feasible embodiment, the information processing device may be a smart phone, a tablet computer, a notebook computer, an all-in-one computer, a smart watch or an access control device.

為使  貴審查委員能進一步瞭解本發明之結構、特徵、目的、與其優點,茲附以圖式及較佳具體實施例之詳細說明如後。In order to enable your examiners to further understand the structure, characteristics, purpose, and advantages of the present invention, drawings and detailed descriptions of preferred embodiments are attached as follows.

圖5為應用本發明之一種串行周邊介面的傳輸速率提升方法的一資料傳輸電路的方塊圖。如圖5所示,在透過一串行周邊介面(SPI)進行資料傳輸的一個資料傳輸電路之中,一主控端晶片1具有一第一腳位11、一第二腳位12、一第三腳位13、以及一第四腳位14,且內部設有至少一主控端移位寄存器10。並且,在實際應用中,可將該主控端晶片1設置在具有一第一電接點41、一第二電接點42、一第三電接點43、以及一第四電接點44的一主控端板件4之上。如圖5所示,在所述資料傳輸電路之中,一受控端晶片2同樣具有一第一腳位21、一第二腳位22、一第三腳位23、以及一第四腳位24。並且,在實際應用中,可將該受控端晶片2設置在具有一第一電接點31、一第二電接點32、一第三電接點33、以及一第四電接點34的一受控端板件3。FIG. 5 is a block diagram of a data transmission circuit applying a method for increasing the transmission rate of a serial peripheral interface of the present invention. As shown in FIG. 5 , in a data transmission circuit for data transmission through a serial peripheral interface (SPI), a host chip 1 has a first pin 11 , a second pin 12 , a first pin The three pins 13 and a fourth pin 14 are internally provided with at least one master shift register 10 . In addition, in practical applications, the host chip 1 can be configured to have a first electrical contact 41 , a second electrical contact 42 , a third electrical contact 43 , and a fourth electrical contact 44 on a main control end plate 4. As shown in FIG. 5, in the data transmission circuit, a controlled end chip 2 also has a first pin 21, a second pin 22, a third pin 23, and a fourth pin twenty four. In addition, in practical applications, the controlled end chip 2 can be set to have a first electrical contact 31 , a second electrical contact 32 , a third electrical contact 33 , and a fourth electrical contact 34 of a controlled end plate 3.

在串行周邊介面的傳輸協定中,主控端晶片1以其第一腳位11分別傳送一串行時鐘信號(Serial clock, SCK)和一片選信號(Chip select, CS)至受控端晶片2的第一腳位21和第二腳位22。並且,透過第三腳位13,主控端晶片1可將其主控端寄存器10之中的一第一串行資料傳送(驅動)至一MOSI通道,從而使受控端晶片2以其第三腳位23通過所述MOSI通道接收該第一串行資料。此處所稱MOSI指的是主控端輸出(Master out)而受控端(Slave in)輸入。In the serial peripheral interface transmission protocol, the master chip 1 transmits a serial clock signal (Serial clock, SCK) and a chip select signal (Chip select, CS) to the slave chip with its first pin 11 respectively. 2's first pin 21 and second pin 22. In addition, through the third pin 13, the master chip 1 can transmit (drive) a first serial data in the master register 10 to a MOSI channel, so that the slave chip 2 uses its first serial data to transmit (drive) a MOSI channel. Pin 23 receives the first serial data through the MOSI channel. The MOSI referred to here refers to the output of the master terminal (Master out) and the input of the slave terminal (Slave in).

此外,當主控端晶片1透過串行周邊介面向受控端晶片2讀取(採樣)一第二串行資料時,受控端晶片2透過第四腳位24將其受控端寄存器20之中的一第二串行資料傳送(驅動)至一MISO通道,從而使該主控端晶片1以其第四腳位14通過所述MISO通道接收(採樣)該第二串行資料。此處所稱MISO指的是主控端輸入(Master in)而受控端(Slave out)輸出。In addition, when the master chip 1 reads (samples) a second serial data from the slave chip 2 through the serial peripheral interface, the slave chip 2 sends its slave register 20 through the fourth pin 24 One of the second serial data is transmitted (driven) to a MISO channel, so that the host chip 1 with its fourth pin 14 receives (samples) the second serial data through the MISO channel. The MISO here refers to the input of the master (Master in) and the output of the slave (Slave out).

依據圖3與圖4,可以理解在利用所述串行周邊介面進行信號傳輸的過程中會發生時間延遲(Time delay),且該時間延遲的計算方式為:(B2B delay)+(B2D delay)+(Trans_delay)+(D2B delay)+(B2B delay)。其中,B2B delay為板對板的傳輸時間延遲(Board to Board (B2B) delay),B2D delay為板對裝置(晶片)的傳輸時間延遲(Board to Device (B2D) delay),D2B delay為裝置對板的傳輸時間延遲(Device to Board (D2B) delay),而Trans_delay則為受控端晶片2之內部傳輸時間延遲。故此,本發明之一種串行周邊介面的傳輸速率提升方法應用於利用所述串行周邊介面(SPI)進行資料傳輸的一個資料傳輸電路中,令該資料傳輸電路之主控端晶片1透過執行本發明之方法而能夠有效地提升所述串行周邊介面之一串行資料傳輸的傳輸速率。According to FIG. 3 and FIG. 4 , it can be understood that a time delay (Time delay) occurs in the process of using the serial peripheral interface for signal transmission, and the calculation method of the time delay is: (B2B delay)+(B2D delay) +(Trans_delay)+(D2B delay)+(B2B delay). Among them, B2B delay is Board to Board (B2B) delay, B2D delay is Board to Device (B2D) delay, D2B delay is device pair The transit time delay of the board (Device to Board (D2B) delay), and Trans_delay is the internal transit time delay of the controlled end chip 2. Therefore, a method for increasing the transmission rate of a serial peripheral interface of the present invention is applied to a data transmission circuit using the serial peripheral interface (SPI) for data transmission, so that the host chip 1 of the data transmission circuit executes the The method of the present invention can effectively improve the transmission rate of a serial data transmission of the serial peripheral interface.

圖6為本發明之一種串行周邊介面的傳輸速率提升方法的流程圖。如圖5與圖6所示,本發明之串行周邊介面的傳輸速率提升方法首先執行步驟S1與S2:在一受控端晶片2內部設置X個測試寄存器25,接著令一主控端晶片1通過一串行周邊介面寫入一測試用串行資料至所述X個測試寄存器25的第i個,接著通過該串行周邊介面自第i個所述測試寄存器25讀出該測試用串行資料;其中,X為正整數,i的起始值為1,且i≦X。較佳地,在一實施例中,X為4。亦即,在該受控端晶片2配置四個測試寄存器25。FIG. 6 is a flowchart of a method for increasing the transmission rate of a serial peripheral interface according to the present invention. As shown in FIG. 5 and FIG. 6 , the method for increasing the transmission rate of the serial peripheral interface of the present invention firstly executes steps S1 and S2 : setting X test registers 25 in a controlled-end chip 2 , and then making a host-end chip 1. Write a test serial data to the ith of the X test registers 25 through a serial peripheral interface, and then read the test serial data from the ith test register 25 through the serial peripheral interface row data; where X is a positive integer, the initial value of i is 1, and i≦X. Preferably, in one embodiment, X is 4. That is, four test registers 25 are arranged on the controlled-side wafer 2 .

更詳細地說明,該主控端晶片1透過其第三腳位13將所述測試用串行資料驅動至一MOSI通道,使該受控端晶片2以其第三腳位23通過所述MOSI通道接收該測試用串行資料。進行所述測試用串行資料的讀取(採樣)時,該受控端晶片2透過第四腳位24將其具有之所述受控端寄存器20之中的測試用串行資料傳送(驅動)至一MISO通道,從而使該主控端晶片1以其第四腳位14通過所述MISO通道接收(採樣)該測試用串行資料。In more detail, the master chip 1 drives the test serial data to a MOSI channel through its third pin 13 , so that the slave chip 2 passes through the MOSI through its third pin 23 The channel receives serial data for this test. When reading (sampling) the test serial data, the controlled end chip 2 transmits the test serial data in the controlled end register 20 through the fourth pin 24 (driving). ) to a MISO channel, so that the host chip 1 with its fourth pin 14 receives (samples) the serial data for testing through the MISO channel.

繼續地,方法流程係執行步驟S3:對讀出的所述測試用串行資料執行一資料正確性檢查,在所述資料正確性檢查為不通過之情況下執行後續的步驟S4,且在所述資料正確性檢查為通過之情況下執行後續的步驟S5。換句話說,在對複數個測試寄存器25之中的第1個執行一測試用串行資料的寫/讀操作之後,主控端晶片1可對一原始設定之測試用串行資料與所讀出的該測試用串行資料進行比對,藉此方式檢查所讀出的該測試用串行資料的正確性。Continuingly, the method flow is to perform step S3: perform a data correctness check on the read serial data for testing, and perform the subsequent step S4 in the case that the data correctness check fails, and in all If the above-mentioned data correctness check is passed, the subsequent step S5 is executed. In other words, after a write/read operation of a test serial data is performed on the first one of the plurality of test registers 25 , the host chip 1 can read a test serial data with an original setting and the read data. The serial data for the test is compared, and the correctness of the serial data for the test is checked in this way.

故此,在所述資料正確性檢查為不通過之情況下,方法流程接著執行步驟S4:透過該主控端晶片1配置一延時參數至該受控端晶片2,接著重複執行該步驟S2與該步驟S3。在配置所述延時參數至該受控端晶片2之後,若所述資料正確性檢查為通過,則可接著執行後續的步驟S5。反之,若還是不通過,則在調整該延時參數的值之後,接著重複執行該步驟S2與該步驟S3。Therefore, in the case that the data correctness check fails, the method flow then executes step S4: configure a delay parameter to the slave chip 2 through the master chip 1, and then repeat the steps S2 and the Step S3. After configuring the delay parameter to the controlled end chip 2, if the data correctness check is passed, the subsequent step S5 can be performed. On the other hand, if it still fails, after adjusting the value of the delay parameter, the step S2 and the step S3 are then repeatedly executed.

在第1個測試寄存器25之測試用串行資料的資料正確性檢查被確定為通過之後,還必須接著對其它所有測試寄存器25執行相同的資料正確性檢查程序,故此方法流程接著執行步驟S5:在i小於X的情況下,該主控端晶片1通過所述串行周邊介面寫入一測試用串行資料至所述X個測試寄存器25的第i+1個,接著通過該串行周邊介面自第i+1個所述測試寄存器25讀出該測試用串行資料,而後重複該步驟(3);且在i等於X的情況下,X個所述測試寄存器25皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數即確認有效。After the data correctness check of the test serial data of the first test register 25 is determined to be passed, the same data correctness check procedure must be performed on all other test registers 25, so the method flow then executes step S5: When i is less than X, the host chip 1 writes a test serial data to the i+1 th of the X test registers 25 through the serial peripheral interface, and then passes the serial peripheral interface The interface reads the test serial data from the i+1th test register 25, and then repeats the step (3); and when i is equal to X, the X test registers 25 have all completed the test The data correctness check of the serial data is used for testing, and the delay parameter is confirmed to be valid.

換句話說,只有在所有的測試寄存器25皆已完成所述測試用串行資料的資料正確性檢查之後,特別設定的所述延時參數才會被認定為有校。之後,該主控端晶片1與該受控端晶片2便可以開始透過所述串行周邊介面進行至少一串行資料之傳輸作業。圖7為本發明之串行周邊介面所傳輸信號的第一工作時序圖。如圖7所示,令主控端晶片1與受控端晶片2採用SPI mode0協定進行資料傳輸,且在應用本發明之串行周邊介面的傳輸速率提升方法之後將延時參數的數值配置為1。由圖7可知,透過串行周邊介面(SPI)之MISO通道進行信號傳輸的過程中所發生的時間延遲(Time delay)的計算方式為:(B2B delay)+(B2D delay)+(Trans_delay)+(D2B delay)+(B2B delay)-(N*T/2) < T/2。前式中,N為所述延時參數。簡單地說,在應用本發明之串行周邊介面的傳輸速率提升方法的情況下,時間延遲(Time delay)由原本的大於T/2被調整至小於T/2,從而保證傳輸於MISO通道之中的串行資料不會出現資料錯誤的現象,使串行周邊介面可以滿足高速傳輸需求。In other words, only after all the test registers 25 have completed the data correctness check of the test serial data, the specially set delay parameter will be regarded as valid. After that, the host chip 1 and the slave chip 2 can start to transmit at least one serial data through the serial peripheral interface. FIG. 7 is a first operation timing diagram of signals transmitted by the serial peripheral interface of the present invention. As shown in FIG. 7 , the master chip 1 and the slave chip 2 use the SPI mode0 protocol for data transmission, and after applying the method for increasing the transmission rate of the serial peripheral interface of the present invention, the value of the delay parameter is set to 1 . As can be seen from Figure 7, the calculation method of the time delay (Time delay) that occurs in the process of signal transmission through the MISO channel of the Serial Peripheral Interface (SPI) is: (B2B delay)+(B2D delay)+(Trans_delay)+ (D2B delay)+(B2B delay)-(N*T/2) < T/2. In the preceding formula, N is the delay parameter. To put it simply, in the case of applying the method for increasing the transmission rate of the serial peripheral interface of the present invention, the time delay is adjusted from the original greater than T/2 to less than T/2, so as to ensure the transmission between the MISO channels. There is no data error phenomenon in the serial data in the serial interface, so that the serial peripheral interface can meet the needs of high-speed transmission.

當然,在主控端晶片1及/或受控端晶片2的種類不同的情況下,經利用測試用串行資料完成資料正確性檢查的流程後,還是有可能不需要向受控端晶片2配置延時參數。圖8為應用本發明之串行周邊介面的傳輸速率提升方法之串行周邊介面所傳輸信號的第二工作時序圖。如圖8所示,令主控端晶片1與受控端晶片2採用SPI mode0協定進行資料傳輸且在應用本發明之串行周邊介面的傳輸速率提升方法之後,結果顯示,並無向受控端晶片2配置延時參數(亦即,N=0)的需要。Of course, in the case where the types of the master chip 1 and/or the slave chip 2 are different, after completing the data correctness check process using the serial data for testing, it may still be unnecessary to send the data to the slave chip 2. Configure delay parameters. FIG. 8 is a second operation timing diagram of the signal transmitted by the serial peripheral interface applying the method for increasing the transmission rate of the serial peripheral interface of the present invention. As shown in FIG. 8 , the master chip 1 and the slave chip 2 use the SPI mode0 protocol for data transmission and after applying the method for increasing the transmission rate of the serial peripheral interface of the present invention, the result shows that there is no direction to the controlled The end chip 2 configures the need for delay parameters (ie, N=0).

補充說明的是,在應用本發明之串行周邊介面的傳輸速率提升方法的過程中,當該主控端晶片1通過串行周邊介面自所述測試寄存器25讀出所述測試用串行資料時,不對讀出的所述測試用串行資料之一第一位元組(bytes)執行所謂的資料正確性檢查。主要原因在於,向受控端晶片2讀取(採樣)串行資料時,受控端晶片2有可能提前將其測試寄存器25之中的串行資料傳送(驅動)至MISO通道。故此,為了避免執行資料正確性檢查時發生誤判情形,有必要將讀出的測試用串行資料之第一位元組(bytes)做為虛資料(dummy data),且不對其執行資料正確性檢查。It is added that, in the process of applying the method for increasing the transmission rate of the serial peripheral interface of the present invention, when the host chip 1 reads the test serial data from the test register 25 through the serial peripheral interface , the so-called data correctness check is not performed on one of the first bytes of the read-out serial data for testing. The main reason is that when reading (sampling) serial data from the controlled-end chip 2 , the controlled-end chip 2 may transmit (drive) the serial data in its test register 25 to the MISO channel in advance. Therefore, in order to avoid misjudgment when performing the data correctness check, it is necessary to use the first byte of the read serial data for testing as dummy data, and not perform data correctness on it. examine.

另一方面,配置在受控端晶片2內部X個所述測試寄存器25皆具有一寄存器地址,且X個所述寄存器地址是由通過主控端晶片1予以設定。在一實施例中,各所述寄存器地址彼此不同,例如,addr:0xaa、addr:0x55、addr:0x5a、addr:0xa5等。同時,所述測試用串行資料也是透過主控端晶片1予以設定,各所述測試用串行資料可以彼此相同或不同。例如,data:aaaaaa、data:555555、data:5a5a5a、data:a5a5a5等。On the other hand, each of the X test registers 25 disposed inside the slave chip 2 has a register address, and the X register addresses are set by the master chip 1 . In one embodiment, the register addresses are different from each other, eg, addr:0xaa, addr:0x55, addr:0x5a, addr:0xa5, and so on. Meanwhile, the serial data for testing is also set through the host chip 1, and the serial data for testing can be the same or different from each other. For example, data:aaaaaa, data:555555, data:5a5a5a, data:a5a5a5, etc.

如此,上述已完整且清楚地說明本發明之一種串行周邊介面的傳輸速率提升方法;並且,經由上述可得知本發明具有下列優點:In this way, the above has completely and clearly described a method for increasing the transmission rate of a serial peripheral interface of the present invention; and, from the above, it can be known that the present invention has the following advantages:

(1)本發明揭示一種串行周邊介面的傳輸速率提升方法,其可應用在一資料傳輸電路之中,該資料傳輸電路包括一主控端晶片、一受控端晶片以及耦接於該主控端晶片與該受控端晶片之間的一串行周邊介面。本發明之一種串行周邊介面的傳輸速率提升方法應用於所述資料傳輸電路之中,令該主控端晶片透過執行本發明之方法而向該受控端晶片配置一延時參數,從而保證經由該串行周邊介面之MISO通道所傳輸的串行資料不會因為時間延遲而出現錯誤,使所述串行周邊介面可以滿足該主控端晶片與該受控端晶片之間的高速傳輸需求。(1) The present invention discloses a method for increasing the transmission rate of a serial peripheral interface, which can be applied to a data transmission circuit. The data transmission circuit includes a master chip, a slave chip, and a chip coupled to the master chip. A serial peripheral interface between the control end chip and the controlled end chip. A method for increasing the transmission rate of a serial peripheral interface of the present invention is applied to the data transmission circuit, so that the master chip configures a delay parameter to the slave chip by executing the method of the present invention, so as to ensure that the The serial data transmitted by the MISO channel of the serial peripheral interface will not have errors due to time delay, so that the serial peripheral interface can meet the high-speed transmission requirement between the master chip and the slave chip.

(2)本發明同時揭示一種資料傳輸電路,其具有一主控端晶片、至少一受控端晶片以及耦接於該主控端晶片和所述至少一受控端晶片之間的至少一串行周邊介面;其中,該主控端晶片執行本發明所述之串行周邊介面的傳輸速率提升方法,從而提升所述串行周邊介面之一串行資料傳輸的傳輸速率。(2) The present invention also discloses a data transmission circuit, which has a master chip, at least one slave chip, and at least one string coupled between the master chip and the at least one slave chip A peripheral interface is performed; wherein, the host chip executes the method for increasing the transmission rate of the serial peripheral interface of the present invention, thereby increasing the transmission rate of a serial data transmission of the serial peripheral interface.

(3)本發明同時提供一種資訊處理裝置,其具有一中央處理單元及如前所述本發明之資料傳輸電路,其中,該中央處理單元係用以與所述資料傳輸電路通信。並且,該資訊處理裝置可為智能手機、平板電腦、筆記型電腦、一體式電腦、智能手錶、或門禁裝置。(3) The present invention also provides an information processing device having a central processing unit and the data transmission circuit of the present invention as described above, wherein the central processing unit is used for communication with the data transmission circuit. Moreover, the information processing device can be a smart phone, a tablet computer, a notebook computer, an all-in-one computer, a smart watch, or an access control device.

必須加以強調的是,前述本案所揭示者乃為較佳實施例,舉凡局部之變更或修飾而源於本案之技術思想而為熟習該項技藝之人所易於推知者,俱不脫本案之專利權範疇。It must be emphasized that the above-mentioned disclosure in this case is a preferred embodiment, and any partial changes or modifications originating from the technical ideas of this case and easily inferred by those who are familiar with the art are within the scope of the patent of this case. category of rights.

綜上所陳,本案無論目的、手段與功效,皆顯示其迥異於習知技術,且其首先發明合於實用,確實符合發明之專利要件,懇請  貴審查委員明察,並早日賜予專利俾嘉惠社會,是為至禱。To sum up, regardless of the purpose, means and effect of this case, it shows that it is completely different from the conventional technology, and its first invention is practical, and it does meet the patent requirements of the invention. Society is to pray for the best.

1a:主控端晶片 10a:主控端寄存器 11a:第一腳位 12a:第二腳位 13a:第三腳位 14a:第四腳位 2a:受控端晶片 20a:受控端寄存器 21a:第一腳位 22a:第二腳位 23a:第三腳位 24a:第四腳位 3a:受控端板件 31a:第一電接點 32a:第二電接點 33a:第三電接點 34a:第四電接點 4a:主控端板件 41a:第一電接點 42a:第二電接點 43a:第三電接點 44a:第四電接點 1:主控端晶片 10:主控端寄存器 11:第一腳位 12:第二腳位 13:第三腳位 14:第四腳位 2:受控端晶片 20:受控端寄存器 21:第一腳位 22:第二腳位 23:第三腳位 24:第四腳位 25:測試寄存器 3:受控端板件 31:第一電接點 32:第二電接點 33:第三電接點 34:第四電接點 4:主控端板件 41:第一電接點 42:第二電接點 43:第三電接點 44:第四電接點 S1:在一受控端晶片內部設置X個測試寄存器 S2:令一主控端晶片通過一串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;i的起始值為1,且i≦X S3:對讀出的所述測試用串行資料執行一資料正確性檢查在所述資料正確性檢查為不通過之情況下執行以下步驟S4且在所述資料正確性檢查為通過之情況下執行以下步驟S5 S4:透過該主控端晶片配置一延時參數N至該受控端晶片接著重複執行該步驟S2 S5:在i小於X的情況下,該主控端晶片通過所述串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟S3;且在i等於X的情況下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數N即確認有效1a: main control chip 10a: Master register 11a: first foot position 12a: second foot position 13a: The third foot 14a: Fourth foot 2a: Controlled end chip 20a: Controlled end register 21a: first foot position 22a: second foot position 23a: third foot 24a: Fourth foot 3a: Controlled end plate 31a: first electrical contact 32a: second electrical contact 33a: The third electrical contact 34a: Fourth electrical contact 4a: Main control end board 41a: first electrical contact 42a: second electrical contact 43a: The third electrical contact 44a: Fourth electrical contact 1: Main control chip 10: Master register 11: The first foot 12: The second pin 13: The third foot 14: Fourth foot 2: Controlled end chip 20: Controlled end register 21: The first foot 22: The second foot 23: The third foot 24: Fourth foot 25: Test register 3: Controlled end plate 31: The first electrical contact 32: The second electrical contact 33: The third electrical contact 34: Fourth electrical contact 4: Main control end board 41: The first electrical contact 42: The second electrical contact 43: The third electrical contact 44: Fourth electrical contact S1: Set X test registers inside a controlled end chip S2: Make a host chip write a test serial data to the ith of the X test registers through a serial peripheral interface, and then read from the ith test register through the serial peripheral interface Output the serial data for the test; the initial value of i is 1, and i≦X S3: Execute a data correctness check on the read serial data for testing. If the data correctness check fails, execute the following step S4, and if the data correctness check is passed, execute the following steps. The following step S5 S4: Configure a delay parameter N to the controlled end chip through the master chip, and then repeat the step S2 S5: In the case that i is less than X, the host chip writes a test serial data to the i+1 th of the X test registers through the serial peripheral interface, and then passes the serial peripheral interface The interface reads out the test serial data from the i+1th test register, and then repeats the step S3; and in the case where i is equal to X, all the X test registers have completed the test serial data The correctness of the data is checked, and the delay parameter N is confirmed to be valid.

圖1為習知的一種資料傳輸電路的第一方塊圖; 圖2為經由習知的行周邊介面所傳輸之信號的第一工作時序圖; 圖3為習知的資料傳輸電路的第二方塊圖; 圖4為經由習知的行周邊介面所傳輸之信號的第二工作時序圖; 圖5為應用本發明之一種串行周邊介面的傳輸速率提升方法的一資料傳輸電路的方塊圖; 圖6為本發明之一種串行周邊介面的傳輸速率提升方法的流程圖; 圖7為應用本發明之串行周邊介面所傳輸信號的第一工作時序圖;以及 圖8為應用本發明之串行周邊介面所傳輸信號的第二工作時序圖。1 is a first block diagram of a conventional data transmission circuit; 2 is a first operation timing diagram of a signal transmitted through a conventional line peripheral interface; 3 is a second block diagram of a conventional data transmission circuit; FIG. 4 is a second operation timing diagram of a signal transmitted through a conventional line peripheral interface; 5 is a block diagram of a data transmission circuit applying a method for increasing the transmission rate of a serial peripheral interface of the present invention; 6 is a flowchart of a method for increasing the transmission rate of a serial peripheral interface according to the present invention; FIG. 7 is a first operation timing diagram of signals transmitted by the serial peripheral interface applying the present invention; and FIG. 8 is a second operation timing diagram of the signal transmitted by the serial peripheral interface applying the present invention.

S1:在一受控端晶片內部設置X個測試寄存器S1: Set X test registers inside a controlled end chip

S2:令一主控端晶片通過一串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;i的起始值為1,且i≦XS2: Make a host chip write a test serial data to the ith of the X test registers through a serial peripheral interface, and then read from the ith test register through the serial peripheral interface Output the serial data for the test; the initial value of i is 1, and i≦X

S3:對讀出的所述測試用串行資料執行一資料正確性檢查在所述資料正確性檢查為不通過之情況下執行以下步驟S4且在所述資料正確性檢查為通過之情況下執行以下步驟S5S3: Execute a data correctness check on the read serial data for testing. If the data correctness check fails, execute the following step S4, and if the data correctness check is passed, execute the following steps. The following step S5

S4:透過該主控端晶片配置一延時參數N至該受控端晶片接著重複執行該步驟S2S4: Configure a delay parameter N to the controlled end chip through the master chip, and then repeat the step S2

S5:在i小於X的情況下,該主控端晶片通過所述串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟S3;且在i等於X的情況 下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數N即確認有效S5: In the case that i is less than X, the host chip writes a test serial data to the i+1 th of the X test registers through the serial peripheral interface, and then passes the serial peripheral interface The interface reads the test serial data from the i+1th test register, and then repeats the step S3; and in the case that i is equal to X Next, the X test registers have all completed the data correctness check of the test serial data, and the delay parameter N is confirmed to be valid

Claims (10)

一種串行周邊介面的傳輸速率提升方法,包括:(1)在一受控端晶片內部設置X個測試寄存器,X為正整數;(2)令一主控端晶片通過一串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;其中,i的起始值為1,且i≦X;(3)對讀出的所述測試用串行資料執行一資料正確性檢查,在所述資料正確性檢查為不通過之情況下執行以下步驟(4),且在所述資料正確性檢查為通過之情況下執行以下步驟(5);(4)透過該主控端晶片調整一延時參數至該受控端晶片,接著重複執行該步驟(2);(5)在i小於X的情況下,該主控端晶片通過所述串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟(3);且在i等於X的情況下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數即確認有效;其中,該延時參數係用以調整該受控端晶片與該主控端晶片間之信號傳輸延時。 A method for increasing the transmission rate of a serial peripheral interface, comprising: (1) setting X test registers inside a controlled end chip, where X is a positive integer; (2) making a master control end chip write a serial peripheral interface Input a serial data for testing into the ith of the X test registers, and then read out the serial data for testing from the ith test register through the serial peripheral interface; wherein, the initial value of i is 1, and i≦X; (3) perform a data correctness check on the read serial data for testing, and perform the following step (4) if the data correctness check fails, and If the data correctness check is passed, execute the following step (5); (4) adjust a delay parameter to the slave chip through the master chip, and then repeat the step (2); (5) ) In the case that i is less than X, the host chip writes a test serial data to the i+1 th of the X test registers through the serial peripheral interface, and then passes the serial peripheral interface Read out the test serial data from the i+1th test register, and then repeat the step (3); and when i is equal to X, all X test registers have completed the test serial data The data correctness check of the data is performed, and the delay parameter is confirmed to be valid; wherein, the delay parameter is used to adjust the signal transmission delay between the controlled end chip and the master control end chip. 如請求項1所述之串行周邊介面的傳輸速率提升方法,更包括以下步驟:(6)該主控端晶片與該受控端晶片開始透過所述串行周邊介面進行至少一串行資料之傳輸作業。 The method for increasing the transmission rate of a serial peripheral interface as claimed in claim 1, further comprising the following steps: (6) the host chip and the slave chip start to perform at least one serial data through the serial peripheral interface transmission operation. 如請求項1所述之串行周邊介面的傳輸速率提升方法,其中,該主控端晶片通過該串行周邊介面自所述測試寄存器讀出所述測試用串行資料時,不對讀出的所述測試用串行資料之一第一位元組執行該資料正確性檢查。 The method for increasing the transmission rate of a serial peripheral interface according to claim 1, wherein, when the host chip reads the test serial data from the test register through the serial peripheral interface, it does not The test performs the data correctness check with a first tuple of serial data. 如請求項1所述之串行周邊介面的傳輸速率提升方法,其中,X個所述測試寄存器皆具有一寄存器地址,且X個所述寄存器地址由該主控端晶片設定。 The method for increasing the transmission rate of a serial peripheral interface according to claim 1, wherein each of the X test registers has a register address, and the X register addresses are set by the host chip. 如請求項4所述之串行周邊介面的傳輸速率提升方法,其中,各所述寄存器地址彼此不同,且各所述測試用串行資料彼此相同或不同。 The method for increasing the transmission rate of a serial peripheral interface according to claim 4, wherein the register addresses are different from each other, and the serial data for testing are the same or different from each other. 一種資料傳輸電路,具有一主控端晶片、至少一受控端晶片以及耦接於該主控端晶片和所述至少一受控端晶片之間的至少一串行周邊介面;其特徵在於,各所述受控端晶片內部設置X個測試寄存器,且該主控端晶片透過執行一傳輸速率提升方法以提升所述串行周邊介面之一串行資料傳輸的傳輸速率;該傳輸速率提升方法包括:(1)令該主控端晶片通過所述至少一串行周邊介面之一選定的串行周邊介面寫入一測試用串行資料至所述至少一受控端晶片中之一選定的受控端晶片之所述X個測試寄存器的第i個,接著通過該串行周邊介面自第i個所述測試寄存器讀出該測試用串行資料;其中,X為正整數,i的起始值為1,且i≦X;(2)對讀出的所述測試用串行資料執行一資料正確性檢查,在所述資料正確性檢查為不通過之情況下執行以下步驟(3),且在所述資料正確性檢查為通過之情況下執行以下步驟(4);(3)透過該主控端晶片調整一延時參數至該選定的受控端晶片,接著重複執行該步驟(2);(4)在i小於X的情況下,該主控端晶片通過該選定的串行周邊介面寫入一測試用串行資料至所述X個測試寄存器的第i+1個,接著通過該選定的串行周邊介面自第i+1個所述測試寄存器讀出該測試用串行資料,而後重複該步驟(3);且在i等於X的情況下,X個所述測試寄存器皆已完成所述測試用串行資料的該資料正確性檢查,所述延時參數即確認有效;以及(5)該主控端晶片與該選定的受控端晶片開始透過該選定的串行周邊介面進行至少一串行資料之傳輸作業; 其中,該延時參數係用以調整該受控端晶片與該主控端晶片間之信號傳輸延時。 A data transmission circuit, comprising a master chip, at least one slave chip, and at least one serial peripheral interface coupled between the master chip and the at least one slave chip; characterized in that: Each of the controlled end chips is internally provided with X test registers, and the host chip executes a transmission rate improvement method to increase the transmission rate of a serial data transmission of the serial peripheral interface; the transmission rate improvement method Including: (1) making the host chip write a serial data for testing to the selected one of the at least one slave chip through the serial peripheral interface selected by the at least one serial peripheral interface The ith of the X test registers of the controlled end chip, and then the serial data for testing is read out from the ith test register through the serial peripheral interface; wherein, X is a positive integer, starting from i The initial value is 1, and i≦X; (2) Perform a data correctness check on the read serial data for testing, and perform the following steps (3) if the data correctness check fails , and if the data correctness check is passed, execute the following step (4); (3) adjust a delay parameter to the selected slave chip through the master chip, and then repeat the step (2) ); (4) In the case that i is less than X, the host chip writes a test serial data to the i+1th of the X test registers through the selected serial peripheral interface, and then passes The selected serial peripheral interface reads the test serial data from the i+1th test register, and then repeats the step (3); and when i is equal to X, the X test registers are all The data correctness check of the serial data for the test has been completed, and the delay parameter is confirmed to be valid; and (5) the host chip and the selected slave chip start to pass through the selected serial peripheral interface Carry out at least one serial data transmission operation; Wherein, the delay parameter is used to adjust the signal transmission delay between the controlled end chip and the master control end chip. 如請求項6所述之資料傳輸電路,其中,該主控端晶片通過該選定的串行周邊介面自所述測試寄存器讀出該測試用串行資料時,不對讀出的所述測試用串行資料之一第一位元組執行所述資料正確性檢查。 The data transmission circuit of claim 6, wherein when the host chip reads the test serial data from the test register through the selected serial peripheral interface, the read test serial data is not The first tuple of one of the row data performs the data correctness check. 如請求項6所述之資料傳輸電路,其中,X個所述測試寄存器皆具有一寄存器地址,各所述寄存器地址彼此不同,且各所述測試用串行資料彼此相同或不同。 The data transmission circuit of claim 6, wherein each of the X test registers has a register address, each of the register addresses is different from each other, and each of the test serial data is the same or different from each other. 一種資訊處理裝置,其具有一中央處理單元及如申請專利範圍第6至8項中任一項所述之資料傳輸電路,其中,該中央處理單元係用以與所述資料傳輸電路通信。 An information processing device has a central processing unit and the data transmission circuit according to any one of the claims 6 to 8, wherein the central processing unit is used for communicating with the data transmission circuit. 如請求項9所述之資訊處理裝置,其係由智能手機、平板電腦、筆記型電腦、一體式電腦、智能手錶和門禁裝置所組成群組所選擇的一種電子裝置。 The information processing device according to claim 9, which is an electronic device selected from the group consisting of a smart phone, a tablet computer, a notebook computer, an all-in-one computer, a smart watch and an access control device.
TW109116947A 2020-05-21 2020-05-21 Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device TWI767234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW109116947A TWI767234B (en) 2020-05-21 2020-05-21 Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW109116947A TWI767234B (en) 2020-05-21 2020-05-21 Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device

Publications (2)

Publication Number Publication Date
TW202145024A TW202145024A (en) 2021-12-01
TWI767234B true TWI767234B (en) 2022-06-11

Family

ID=80783869

Family Applications (1)

Application Number Title Priority Date Filing Date
TW109116947A TWI767234B (en) 2020-05-21 2020-05-21 Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device

Country Status (1)

Country Link
TW (1) TWI767234B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332633A1 (en) * 2012-06-06 2013-12-12 Honeywell International Inc. Process controller having multi-channel serial communications link
CN108141293A (en) * 2015-10-23 2018-06-08 高通股份有限公司 For the device and method for making controller synchronous with sensor
CN108255231A (en) * 2016-12-28 2018-07-06 深圳市中兴微电子技术有限公司 A kind of data sampling method and chip

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130332633A1 (en) * 2012-06-06 2013-12-12 Honeywell International Inc. Process controller having multi-channel serial communications link
CN108141293A (en) * 2015-10-23 2018-06-08 高通股份有限公司 For the device and method for making controller synchronous with sensor
CN108255231A (en) * 2016-12-28 2018-07-06 深圳市中兴微电子技术有限公司 A kind of data sampling method and chip

Also Published As

Publication number Publication date
TW202145024A (en) 2021-12-01

Similar Documents

Publication Publication Date Title
US8331361B2 (en) Apparatus and method for producing device identifiers for serially interconnected devices of mixed type
JP6517243B2 (en) Link Layer / Physical Layer (PHY) Serial Interface
JP2009535748A (en) Memory module with reduced access granularity
WO2008074126A1 (en) Id generation apparatus and method for serially interconnected devices
KR100996786B1 (en) Memory systems with memory chips down and up
WO2023216751A1 (en) Memory check pin processing method and apparatus, device, storage medium, and computer program product
US10613128B2 (en) Testing device and testing method
US20080162758A1 (en) System and Method for Enhancing I2C Bus Data Rate
TWI767234B (en) Method for increasing transmission rate of serial peripheral interface, data transmission circuit and information processing device
TWI298502B (en) Method and apparatus for increasing transmission efficiency of an electric device using a serial peripheral interface
CN117056249B (en) MDIO-to-AHB conversion method, system, equipment and medium
CN107807890A (en) FPGA, layout method, equipment and the circuit board of embedded SDRAM memory
TWI697005B (en) Testing device and testing method
KR102457095B1 (en) Memory module comprising variable delay element and installing method for delay thereof
CN113570050B (en) Bidirectional asynchronous synchronous first-in first-out adapter
US11574661B1 (en) Shared command shifter systems and methods
US20080215790A1 (en) Memory systems for automated computing machinery
TWI747416B (en) Enhanced serial peripheral interface transmission control device and method
US11301414B1 (en) Systems and methods for communicating with clients with non-deterministic response delay over a communication interface
TW202105186A (en) Memory interface circuit, memory storage device and signal generation method
US20130279622A1 (en) Method and system of reducing power supply noise during training of high speed communication links
WO2023109580A1 (en) Data processing system and method
TWI758156B (en) Broadcast SPI communication method, circuit device and information processing device
US20240126663A1 (en) Semiconductor device and link configuring method
TWI765642B (en) Inter-chip SPI communication method, circuit device and information processing device for cascaded chip circuits