CN110471865A - A method of simulation SPI communication realizes that controller is communicated with driver - Google Patents

A method of simulation SPI communication realizes that controller is communicated with driver Download PDF

Info

Publication number
CN110471865A
CN110471865A CN201910753637.0A CN201910753637A CN110471865A CN 110471865 A CN110471865 A CN 110471865A CN 201910753637 A CN201910753637 A CN 201910753637A CN 110471865 A CN110471865 A CN 110471865A
Authority
CN
China
Prior art keywords
signal
interface
controller
state
driver
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910753637.0A
Other languages
Chinese (zh)
Other versions
CN110471865B (en
Inventor
熊金
李�杰
陈军
陈禹伶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mianyang Weibo Electronic Co Ltd
Original Assignee
Mianyang Weibo Electronic Co Ltd
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 Mianyang Weibo Electronic Co Ltd filed Critical Mianyang Weibo Electronic Co Ltd
Priority to CN201910753637.0A priority Critical patent/CN110471865B/en
Publication of CN110471865A publication Critical patent/CN110471865A/en
Application granted granted Critical
Publication of CN110471865B publication Critical patent/CN110471865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a kind of simulation SPI communications to realize the method that controller is communicated with driver, the described method includes: being equipped with 4 kinds of communication PHY interfaces between controller and driver, it is respectively as follows: physical interface SON, physical interface PULSE, physical interface DIR and physical interface ALM;There are two types of control modes for tool simultaneously for above-mentioned physical interface: instruction control mode and simulation SPI communication control;The multiplexing of the interface of the driver to controller and pulse command control is realized, i.e., simulates SPI communication using above-mentioned signal but also as signal of communication as control signal.

Description

A method of simulation SPI communication realizes that controller is communicated with driver
Technical field
The present invention relates to the communications fields, and in particular, to a kind of to simulate what SPI communication realization controller was communicated with driver Method.
Background technique
For different mechanical arrangements, needs the parameter of adjust drivers or obtain the state of driver, such as electronics Gear, operating current, smoothing parameter, warning reason etc. need directly to access the relevant parameter of driver by system, meet The actual needs of production scene, user scene.In actual use situation, due to various limitations, controller possibly can not be provided Corresponding communication interface causes not realizing the reading and modification to drive parameter by controller.For cost consideration and How platform resource limitation, make full use of motion control card and driver itself existing resource, realizes that system accesses stepper drive The function of device parameter, this also becomes problem to be solved in project development process.
Summary of the invention
The present invention provides a kind of simulation SPI communications to realize the method that controller is communicated with driver, realizes to control The multiplexing of the interface of device and the driver of pulse command control, i.e., as control signal but also as signal of communication, utilization is above-mentioned Signal simulates SPI communication.
For achieving the above object, this application provides a kind of simulation SPI communications to realize that controller is communicated with driver Method, which comprises
It is equipped with 4 kinds of communication PHY interfaces between controller and driver, is respectively as follows: physical interface SON, physical interface PULSE, physical interface DIR and physical interface ALM;There are two types of control modes for tool simultaneously for above-mentioned physical interface: instruction control mode With simulation SPI communication control.
Wherein, the communication PHY interface between controller and driver has:
Physical interface SON, the signal in the interface are driver enable signal, which is defeated from controller end direction Out, it is inputted to drive side direction;
Physical interface PULSE, the signal in the interface are command pulse signal, which is defeated from controller end direction Out, it is inputted to drive side direction;
Physical interface DIR, the signal in the interface are command pulse signal, which is to export from controller end direction, It is inputted to drive side direction;
Physical interface ALM, the signal in the interface are driver alarm signal, which is defeated to controller end direction Enter, is exported from drive side direction.
Wherein, the driver control interface of motion control card needs these signals: SON-is enabled, CLK-pulse, DIR-direction, ALM-alarm, pulse interface can be multiplexed, and execute conventional func and SPI communication function, function such as 1 institute of table Show:
Table 1
Conventional func (motor control) Function (SPI communication) after multiplexing
SON- is enabled The choosing of CS- piece
CLK- pulse CLK- input clock
The direction DIR- DATAIN- input data (slave angle)
ALM- alarm DATAOUT- output data (slave angle)
Further, instruction control mode includes:
When the SON signal of controller output is effective, control interface signal definition and state are instructed are as follows:
Physical interface SON, signal in the interface are that driver enables output signal in controller end, the letter in the interface It number is enabled input signal in drive side, the state of the signal is enabled effective;
Physical interface PULSE, signal in the interface are command pulse output signal in controller end, the letter in the interface It number is command pulse input signal in drive side, the state of the signal is PULSE state;
Physical interface DIR, signal in the interface are command direction output signal in controller end, the signal in the interface It is command direction input signal in drive side, the state of the signal is DIR state;
Physical interface ALM, signal in the interface are driver alarm input signal in controller end, the letter in the interface It number is alarm output signal in drive side, the state of the signal is ALM state.
Further, instruction control mode includes:
When the SON invalidating signal of controller output, control interface signal definition and state are instructed are as follows:
Physical interface SON, signal in the interface are that driver enables output signal in controller end, the letter in the interface It number is enabled input signal in drive side, the state of the signal is enabled invalid;
Physical interface PULSE, signal in the interface are command pulse output signal in controller end, the letter in the interface Number drive side be command pulse input signal, the state of the signal is invalid;
Physical interface DIR, signal in the interface are command direction output signal in controller end, the signal in the interface It is command direction input signal in drive side, the state of the signal is invalid;
Physical interface ALM, signal in the interface are driver alarm input signal in controller end, the letter in the interface Number drive side be alarm output signal, the state of the signal is invalid.
Further, simulation SPI communication control includes:
When the SON invalidating signal of controller output, SPI communication control interface signal definition and state are simulated are as follows:
Physical interface SON, signal in the interface are simulation SPI piece choosing output CS signal in controller end, in the interface Signal in drive side be simulation SPI chip select input CS signal, the state of the signal is that piece choosing is effective;
Physical interface PULSE, signal in the interface are simulation SPI clock output CLK signal, the interface in controller end In signal in drive side be that simulation SPI clock inputs CLK signal, the state of the signal is PULSE state;
Physical interface DIR, signal in the interface are that simulation SPI data export MOUT signal, the interface in controller end In signal in drive side be that simulation SPI data input SIN signal, the state of the signal is DIR state;
Physical interface ALM, signal in the interface is that simulation SPI data input MIN signal in controller end, in the interface Signal in drive side be that simulation SPI data export SOUT signal, the state of the signal is ALM state.
Further, controller is issued SPI data by DIR interface, often one by one by way of sending single pulse After having sent an instruction, ALM state is read as SPI data entry information.
Further, simulation SPI communication control includes:
When the SON signal of controller output is effective, SPI communication control interface signal definition and state are simulated are as follows:
Physical interface SON, signal in the interface are simulation SPI piece choosing output CS signal in controller end, in the interface Signal in drive side be simulation SPI chip select input CS signal, the state of the signal is that piece choosing is invalid;
Physical interface PULSE, signal in the interface are simulation SPI clock output CLK signal, the interface in controller end In signal drive side be simulation SPI clock input CLK signal, the state of the signal is invalid;
Physical interface DIR, signal in the interface are that simulation SPI data export MOUT signal, the interface in controller end In signal drive side be simulation SPI data input SIN signal, the state of the signal is invalid;
Physical interface ALM, signal in the interface is that simulation SPI data input MIN signal in controller end, in the interface Signal drive side be simulation SPI data export SOUT signal, the state of the signal is invalid.
Further, SPI communication flow figure includes:
Step 1: it is invalid that SON signal condition, which is arranged, in controller;
Step 2: controller setting DIR signal condition is that need to send outputs data bits DOUTx;
Step 3: controller is that frequency sends single instruction pulse PULSE by SPI baud rate;
Step 4: whether driver detection PULSE signal is in rising edge or failing edge;If otherwise return step 4 continues to examine It surveys, if so then execute step 5;
Step 5: it is data bit DOUTx that driver, which reads DIR state,;
Step 6: driver is by the data bit DINx state output that need to be returned to ALM signal;
Step 7: judging whether controller completes single instruction or order is sent, if not completing, continues to execute step 7;If having completed, 8 are thened follow the steps;
Step 8: controller reads ALM state as SPI input data position DINx;
Step 9: judging whether controller completes sending and receiving for all SPI data bit, if not completing, return to step Rapid 2;If having completed, 10 are thened follow the steps;
Step 10: it is effective that SON signal condition, which is arranged, in controller.
Further, when enabling effective, the control function of motion control card and driver is executed, when enabling invalid, is held Row SPI communication function;ALM pin only in communication process be used for communication function, other when execute conventional func.
Further, a communication process, frame format are completed during entire piece choosing in the transport protocol of SPI communication are as follows: side To 16-verification of domain 1-address field, 15-data field, 16, domain, then slave computer receiving direction domain first receives address field; Subsequent operation is determined according to directions and address field content: if it is transmission is write, continuing to data field and verification domain, if No mistake is verified, the write-in of memory or the calling of function are completed after address field is decoded if verification is wrong and abandons the secondary biography It is defeated;If it is transmission is read, the content for obtaining data field is read after address field is decoded by memory, then by data field and school It tests domain and passes to host.
Further, the communication timing in this method are as follows:
1) transmission is lower beginnings every time with a SON, exports CLK changing, at least holding 10us before DIR;
2) guarantee every time in the failing edge output data DIR of CLK, rising edge sampled data DIR of the driver in CLK;
3) driver CLK rising edge output data ALM, in the failing edge sampled data ALM of CLK;
4) end of transmission sets high SON signal every time, and at least keeps 150us.
One or more technical solution provided by the present application, has at least the following technical effects or advantages:
Hardware resource is saved, using existing hardware platform, by the change of software, in completely compatible existing pulse command control System functionally, can extend the SPI communication function of realizing controller and driver, complete the Read-write Catrol to drive parameter;
It avoids carrying out driving parameter adjustment using other tools, convenient for the field adjustable of after-sale service personnel.
Detailed description of the invention
Attached drawing described herein is used to provide to further understand the embodiment of the present invention, constitutes one of the application Point, do not constitute the restriction to the embodiment of the present invention;
Fig. 1 is simulation SPI communication flow schematic diagram in the application;
Fig. 2 is SPI communication multiplexing time diagram in the application;
Fig. 3 is that data flow diagram is write in communication in the application;
Fig. 4 is communication time data stream journey schematic diagram in the application.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real Applying mode, the present invention is further described in detail.It should be noted that in the case where not conflicting mutually, the application's Feature in embodiment and embodiment can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, still, the present invention may be used also Implemented with being different from the other modes being described herein in range using other, therefore, protection scope of the present invention is not by under The limitation of specific embodiment disclosed in face.
The interface of controller and the driver of pulse command control usually has these signals: SON, PULSE, DIR, ALM, Signal definition is shown in Table 2.The enabled of driver, command pulse and direction controlling may be implemented by these signals in controller, obtains The alarm condition of driver.
The definition of 2 interface signal of table and direction
Physical interface Signal definition Controller end direction Drive side direction
SON Driver is enabled Output Input
PULSE Command pulse Output Input
DIR Command direction Output Input
ALM Driver alarm Input Output
Using the existing interface signal of controller (SON, PULSE, DIR, ALM), simulation control is carried out by software, it can be with SPI analog communication is realized in the case where completely compatible existing interface control function, for reading and modifying the related of driver Parameter.
I.e. the interface can have simultaneously there are two types of control mode: instruction control (existing control function), simulation SPI Communication Control (extension control function).Concrete methods of realizing is as follows:
Instruct control mode:
When the SON signal of controller output is effective, control interface signal definition and state are instructed are as follows:
Table 3 instructs control interface signal definition and state (enabled effective)
When the SON invalidating signal of controller output, control interface signal definition and state are instructed are as follows:
Table 4 instructs control interface signal definition and state (enabled invalid)
Simulate SPI communication modes
When the SON invalidating signal of controller output, SPI communication control interface signal definition and state are simulated are as follows:
Table 5 simulates SPI communication control interface signal definition and state (piece choosing is effective)
At this point, controller is issued by way of sending single pulse, by SPI data by DIR interface one by one, every transmission After single pulse (data bit), the present bit that ALM state is inputted as SPI data is read.SPI communication flow figure is as shown in Figure 1.
SPI communication flow verbal description is following (data direction be subject to controller end):
1) SON signal is set as starting in vain by transmission every time with controller.
2) controller issues single instruction pulse using the SPI outputs data bits DOUTx that need to be sent as command direction DIR PULSE (pulse frequency simulates SPI baud rate).
3) driver reads DIR state as SPI outputs data bits in the rising edge (or failing edge) of PULSE signal DOUTx, while the SPI input data position DINx that need to be returned is output to ALM signal.
4) after the transmission of controller completion single instruction pulse PULSE, ALM state is read as SPI input data position DINx。
5) step 2-4 is repeated until completing sending and receiving for all SPI data bit.
6) SON signal is set as effectively indicating to terminate when time SPI transmission by controller.
SPI communications protocol can define according to actual needs, as long as meeting above-mentioned communication flow control, for reading Take and modify drive parameter.
2.2. when the SON signal of controller output is effective, SPI communication control interface signal definition and state are simulated are as follows:
Table 6 simulates SPI communication control interface signal definition and state (piece choosing is invalid)
Wherein, the working principle of driver control signal and the multiplexing of SPI high-speed serial communication
The basic functional principle of communication:
1) when enabling effective, the control function of motion control card and driver is executed, when enabling invalid, it is logical to execute SPI Telecommunication function.
2) ALM pin only in communication process be used for communication function, other when execute conventional func.From SPI communication function When can be switched to conventional func, ALM signal is significant after 100us.After the completion of SPI communication, CS need at least keep 100us with On time.
3) transport protocol of SPI communication
A communication process is completed during entire piece choosing, frame format is as shown in table 7.
Table 7
Slave computer receiving direction domain first, then receives address field.Subsequent behaviour is determined according to directions and address field content Make: if it is transmission is write, continuing to data field and verification domain is completed after decoding address field if verifying no mistake The write-in of memory or the calling of function abandon the secondary transmission if verification is wrong;It is transmitted if it is reading, after address field is decoded The content for obtaining data field is read by memory, and data field and verification domain are then passed into host.
Communicate timing, SPI communication multiplexing timing as shown in Fig. 2,
1) transmission is lower beginnings every time with a SON, exports CLK changing, at least holding 10us before DIR;
2) guarantee that driver can be in the rising edge hits that CLK is located next to every time in the failing edge output data DIR of CLK According to DIR;
3) for driver in the rising edge output data ALM of CLK, system should be in the failing edge sampled data that CLK is located next to ALM;
4) end of transmission should set high SON signal every time, and at least keep 150us.
Infusing 1:CLK should be uniform
Before note 2:SON is lower, CLK, DIR can be any number
Note 3:ALM just becomes normal mode numerical value after SON gets higher about 100us, after entering communication pattern, if do not had Have start communicate (i.e. no pulse input) ALM be also normal mode numerical value.
Effective logic is as shown in table 8:
Table 8
Signal Function Logic
SON Effectively=conventional func, invalid=SPI communication function Positive logic
PUL DSP pin height=1, DSP pin is low=and 0 Positive logic
DIR DSP pin height=1, DSP pin is low=and 0 Positive logic
ALM Effectively=1, invalid=0 Positive logic
Transmission direction:
It is transmitted from left to right when transmitting by frame format in domain.It is transmitted when position is transmitted in domain from a high position to low level.
Directions:
Indicate the transmission direction of effective content, 0=is read, and 1=writes.Host is transmitted to by slave when reading, is transmitted to when writing by host Slave.The following are in read-write state, the transmission direction in all domains is as shown in table 9:
Table 9
Clock signal: slave sends or receives data in rising edge clock.
Address field: transmission is logical address.When read operation, real-time decoding address field.
Verify range: (directions 1: address field is 7 high)+address field least-significant byte+data field most-significant byte+data field least-significant byte.
Referring to FIG. 3, Fig. 3 is that data flow diagram is write in communication in this method, writes data and specifically include: emptying queue fortune Dynamic control allows, and chip selection signal effectively (servo-drive enabling signal delay 200us), write address writes data, writes CRC check value, Chip selection signal is invalid (servo-drive enabling signal delay 200us), and motion control failure, transmission, which writes data in EEPROM, orders It enables, waits pending datas to write mark effective.
Referring to FIG. 4, Fig. 4 is to communicate time data stream journey schematic diagram in this method, reads data and specifically include: emptying queue fortune Dynamic control allows, and chip selection signal effectively (servo-drive enabling signal delay 200us), write address receives data, receives the school CRC Value is tested, chip selection signal is invalid (servo-drive enabling signal delay 200us), and motion control failure returns to reading value.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of simulation SPI communication realizes the method that controller is communicated with driver, which is characterized in that the described method includes:
It is equipped with 4 kinds of communication PHY interfaces between controller and driver, is respectively as follows: physical interface SON, physical interface PULSE, object Manage interface DIR and physical interface ALM;There are two types of control modes for tool simultaneously for above-mentioned physical interface: instruction control mode and simulation SPI Communication control.
2. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that Instruction control mode include:
When the SON signal of controller output is effective, control interface signal definition and state are instructed are as follows:
Physical interface SON, signal in the interface are that driver enables output signal in controller end, and the signal in the interface exists Drive side is enabled input signal, and the state of the signal is enabled effective;
Physical interface PULSE, signal in the interface are command pulse output signal in controller end, and the signal in the interface exists Drive side is command pulse input signal, and the state of the signal is PULSE state;
Physical interface DIR, signal in the interface are command direction output signal in controller end, and the signal in the interface is driving Dynamic device end is command direction input signal, and the state of the signal is DIR state;
Physical interface ALM, signal in the interface are driver alarm input signal in controller end, and the signal in the interface exists Drive side is alarm output signal, and the state of the signal is ALM state.
3. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that Instruction control mode include:
When the SON invalidating signal of controller output, control interface signal definition and state are instructed are as follows:
Physical interface SON, signal in the interface are that driver enables output signal in controller end, and the signal in the interface exists Drive side is enabled input signal, and the state of the signal is enabled invalid;
Physical interface PULSE, signal in the interface are command pulse output signal in controller end, and the signal in the interface exists Drive side is command pulse input signal, and the state of the signal is invalid;
Physical interface DIR, signal in the interface are command direction output signal in controller end, and the signal in the interface is driving Dynamic device end is command direction input signal, and the state of the signal is invalid;
Physical interface ALM, signal in the interface are driver alarm input signal in controller end, and the signal in the interface exists Drive side is alarm output signal, and the state of the signal is invalid.
4. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that Simulating SPI communication control includes:
When the SON invalidating signal of controller output, SPI communication control interface signal definition and state are simulated are as follows:
Physical interface SON, signal in the interface are simulation SPI piece choosing output CS signal in controller end, the letter in the interface It number is simulation SPI chip select input CS signal in drive side, the state of the signal is that piece choosing is effective;
Physical interface PULSE, signal in the interface are simulation SPI clock output CLK signal in controller end, in the interface Signal is that simulation SPI clock inputs CLK signal in drive side, and the state of the signal is PULSE state;
Physical interface DIR, signal in the interface is that simulation SPI data export MOUT signal in controller end, in the interface Signal is that simulation SPI data input SIN signal in drive side, and the state of the signal is DIR state;
Physical interface ALM, signal in the interface are that simulation SPI data input MIN signal in controller end, the letter in the interface It number is that simulation SPI data export SOUT signal in drive side, the state of the signal is ALM state.
5. simulation SPI communication according to claim 4 realizes the method that controller is communicated with driver, which is characterized in that Controller is issued one by one by way of sending single pulse, by SPI data by DIR interface, it is every has sent one instruct after, ALM state is read as SPI data entry information.
6. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that
Simulating SPI communication control includes:
When the SON signal of controller output is effective, SPI communication control interface signal definition and state are simulated are as follows:
Physical interface SON, signal in the interface are simulation SPI piece choosing output CS signal in controller end, the letter in the interface It number is simulation SPI chip select input CS signal in drive side, the state of the signal is that piece choosing is invalid;
Physical interface PULSE, signal in the interface are simulation SPI clock output CLK signal in controller end, in the interface Signal is that simulation SPI clock inputs CLK signal in drive side, and the state of the signal is invalid;
Physical interface DIR, signal in the interface is that simulation SPI data export MOUT signal in controller end, in the interface Signal is that simulation SPI data input SIN signal in drive side, and the state of the signal is invalid;
Physical interface ALM, signal in the interface are that simulation SPI data input MIN signal in controller end, the letter in the interface Number drive side be simulation SPI data export SOUT signal, the state of the signal is invalid.
7. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that SPI communication flow figure includes:
Step 1: it is invalid that SON signal condition, which is arranged, in controller;
Step 2: controller setting DIR signal condition is that need to send outputs data bits DOUTx;
Step 3: controller is that frequency sends single instruction pulse PULSE by SPI baud rate;
Step 4: whether driver detection PULSE signal is in rising edge or failing edge;If otherwise return step 4 continues to test, If so then execute step 5;
Step 5: it is data bit DOUTx that driver, which reads DIR state,;
Step 6: driver is by the data bit DINx state output that need to be returned to ALM signal;
Step 7: judging whether controller completes single instruction or order is sent, if not completing, continues to execute step 7;If It has been completed that, then follow the steps 8;
Step 8: controller reads ALM state as SPI input data position DINx;
Step 9: judge whether controller completes sending and receiving for all SPI data bit, if not completing, return step 2; If having completed, 10 are thened follow the steps;
Step 10: it is effective that SON signal condition, which is arranged, in controller.
8. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that When enabling effective, the control function of motion control card and driver is executed, when enabling invalid, executes SPI communication function;ALM Pin only in communication process be used for communication function, other when execute conventional func.
9. simulation SPI communication according to claim 1 realizes the method that controller is communicated with driver, which is characterized in that A communication process, frame format are completed during entire piece choosing in the transport protocol of SPI communication are as follows: 1-address field of directions 15 Position-data field 16-verifies 16, domain, then slave computer receiving direction domain first receives address field;According to directions and address Domain content determines subsequent operation: if it is transmission is write, data field and verification domain are continued to, it, will if verifying no mistake The write-in of memory or the calling of function are completed after address field decoding abandons the secondary transmission if verification is wrong;It is transmitted if it is reading, The content for obtaining data field is read after then address field is decoded by memory, data field and verification domain are then passed into host.
10. simulation SPI communication according to claim 7 realizes the method that controller is communicated with driver, which is characterized in that Communication timing in this method are as follows:
1) transmission is lower beginnings every time with a SON, exports CLK changing, at least holding 10us before DIR;
2) guarantee every time in the failing edge output data DIR of CLK, rising edge sampled data DIR of the driver in CLK;
3) driver CLK rising edge output data ALM, in the failing edge sampled data ALM of CLK;
4) end of transmission sets high SON signal every time, and at least keeps 150us.
CN201910753637.0A 2019-08-15 2019-08-15 Method for realizing communication between controller and driver by simulating SPI communication Active CN110471865B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910753637.0A CN110471865B (en) 2019-08-15 2019-08-15 Method for realizing communication between controller and driver by simulating SPI communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910753637.0A CN110471865B (en) 2019-08-15 2019-08-15 Method for realizing communication between controller and driver by simulating SPI communication

Publications (2)

Publication Number Publication Date
CN110471865A true CN110471865A (en) 2019-11-19
CN110471865B CN110471865B (en) 2021-04-02

Family

ID=68510932

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910753637.0A Active CN110471865B (en) 2019-08-15 2019-08-15 Method for realizing communication between controller and driver by simulating SPI communication

Country Status (1)

Country Link
CN (1) CN110471865B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984206A (en) * 2006-05-30 2007-06-20 华为技术有限公司 Device and method analog series external interface and player therewith
CN103914414A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 I/O port based SPI simulation method and device
CN204695305U (en) * 2015-06-11 2015-10-07 北京海泰方圆科技有限公司 A kind of SPI communication interface based on joint product and this joint product
CN106569973A (en) * 2016-10-25 2017-04-19 深圳市科陆精密仪器有限公司 Serial peripheral interface multiplexing method and communication system
CN106569416A (en) * 2016-10-28 2017-04-19 珠海格力电器股份有限公司 Method and device for reusing serial interface and simulation debugging interface of microcontroller
EP3323051A1 (en) * 2015-07-15 2018-05-23 Microchip Technology Incorporated Spi interface with less-than-8-bit bytes and variable packet size
CN108667628A (en) * 2017-03-31 2018-10-16 深圳市中兴微电子技术有限公司 A kind of interface switching device and interface conversion method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1984206A (en) * 2006-05-30 2007-06-20 华为技术有限公司 Device and method analog series external interface and player therewith
CN103914414A (en) * 2012-12-30 2014-07-09 航天信息股份有限公司 I/O port based SPI simulation method and device
CN204695305U (en) * 2015-06-11 2015-10-07 北京海泰方圆科技有限公司 A kind of SPI communication interface based on joint product and this joint product
EP3323051A1 (en) * 2015-07-15 2018-05-23 Microchip Technology Incorporated Spi interface with less-than-8-bit bytes and variable packet size
CN106569973A (en) * 2016-10-25 2017-04-19 深圳市科陆精密仪器有限公司 Serial peripheral interface multiplexing method and communication system
CN106569416A (en) * 2016-10-28 2017-04-19 珠海格力电器股份有限公司 Method and device for reusing serial interface and simulation debugging interface of microcontroller
CN108667628A (en) * 2017-03-31 2018-10-16 深圳市中兴微电子技术有限公司 A kind of interface switching device and interface conversion method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘沪平等: ""把单片机串口通讯改造为spi通讯接口"", 《电子世界》 *

Also Published As

Publication number Publication date
CN110471865B (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN107907814B (en) Method for improving mass production test efficiency of chips
US20120030387A1 (en) Mechanism to flexibly support multiple device numbers on point-to-point interconnect upstream ports
CN113608936B (en) Multi-path interface test system and method
CN105335548B (en) A kind of MCU emulation mode for ICE
CN108268414A (en) SD card driver and its control method based on SPI mode
CN113270137B (en) DDR2 testing method based on FPGA embedded soft core
CN103970665B (en) A kind of simulation SPI FLASH FPGA system and adjustment method
CN110348091B (en) Signal delay simulation device and simulation device applying same
CN115033444B (en) 8051 core-based online debugging circuit control device
CN105843549A (en) Memory device and method for implementing an error detection protocol
CN109634256B (en) Board level verification system of general CAN controller chip
CN106126465B (en) A kind of data transmission method and device
CN107025203A (en) First board, the second board and a kind of equipment
CN111931442A (en) FPGA embedded FLASH controller and electronic device
CN103793263B (en) DMA transaction-level modeling method based on Power PC processor
CN112860495A (en) Debugging method of I2C slave device, I2C master device and storage medium
CN109416667A (en) With dynamic and configurable response, serial device emulator using two storage levels
WO2016184170A1 (en) Smi interface device debugging apparatus and method, and storage medium
CN102193860A (en) Microcontroller online debugging circuit and method as well as microcontroller
CN110120877A (en) A kind of configuration method of the parameter of the configuration circuit and exchange chip of exchange chip
CN110471865A (en) A method of simulation SPI communication realizes that controller is communicated with driver
US9032252B2 (en) Debug barrier transactions
CN114218138B (en) USB equipment simulation device and test system
CN111506461A (en) Bus-based back pressure module for testing and implementation method thereof
CN106649187B (en) A kind of method of chip automation peripheral hardware agreement selection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant