【Content of the invention】
It is an object of the invention to effectively overcoming the shortcomings of above-mentioned technology, provide on a kind of seamless knitter computer main board
Arm processor and the means of communication of DSP, this invention carries out data transfer using the McBSP module that arm processor and DSP carry,
Its communication speed is faster.
The technical scheme is that and be achieved in that:On a kind of seamless knitter computer main board, arm processor is with DSP's
The means of communication, the McBSP module on described arm processor is connected with the McBSP module by signal on described DSP, and its method includes
Following steps:
S1, the application layer program of arm processor according to order to be executed, according to protocol format, Envelope command frame data,
And send to ARM bsp driver;
S2, the bsp driver of arm processor configure to the McBSP module related register of arm processor, and
In units of a WORD length, data is sent to one by one by DSP by the hardware pin of arm processor;
After S3, DSP driver configures to the McBSP module related register of its own, the data receiving is put into
In relief area, after the data amount check in relief area reaches the threshold values of setting, trigger hardware interrupts;
S4, DSP driver is had no progeny in receiving, and reads the data in relief area, and carries out effect;
If effect is passed through, according to data protocol form, the data receiving is parsed, then send hardware action
Order carrys out control device device, and hardware data information is packaged into correct reply data frame according to data protocol form;
Otherwise, according to data protocol form encapsulation error reply data frame, and ARM process is sent to by its hardware pin
Device;
S5, arm processor driver one by one WORD receive reply data in relief area, the data in relief area reaches
To after threshold values, trigger hardware interrupts, the application layer program of arm processor reads the data in relief area, and is verified;
If verification is passed through, data is analyzed, and analysis result is shown on screen;
If effect failure, do not deal with.
Described arm processor adopts the AM3505 chip of TI company, and DSP adopts the TMS320F28232 model of TI company
Digital processing chip.
The beneficial effects of the present invention is:The McBSP module that the present invention is carried using arm processor and DSP carry
McBSP module carries out Direct Communication, has advantages below:1st, adopt full duplex communication, the both sides of communication can send simultaneously and
Receive information;2nd, have two-stage buffering to send and three-level buffering received data depositor;3rd, allow continuous data streaming;4th, it is
Data is activation and reception provide independent frame-synchronizing impulse and clock signal;5th, support that multichannel sends and receives;6th, serial word
Length is optional, including 8,12,16,20,24,32;7th, the generation of internal clocking and frame-synchronizing impulse is programmable, has quite big
Motility;8th, simple and compact for structure, working stability is it is easy to implement;9th, communication speed can reach more than 50M, and real-time is very
High.
【Specific embodiment】
The invention will be further described with reference to the accompanying drawings and examples.
With reference to shown in Fig. 1, present invention is disclosed on a kind of seamless knitter computer main board arm processor and DSP communication
Method, the McBSP module on described arm processor is connected with the McBSP module by signal on described DSP, and arm processor is as master
Equipment, as from equipment, ARM program sends order frame data to DSP to DSP, sends response to ARM after DSP program receiving data
Frame, described McBSP is the contracting of English MultichannelBuffered Serial Port (multichannel buffer serial port)
Write.The method specifically includes following steps:
S1, the application layer program of arm processor according to order to be executed, according to protocol format, Envelope command frame data,
And send to ARM bsp driver;
S2, the bsp driver of arm processor configure to the McBSP module related register of arm processor, and
With WORD(16bits)For unit, data is sent to one by one by DSP by the hardware pin of arm processor;
After S3, DSP driver configures to the McBSP module related register of its own, the WORD receiving is put into
In relief area, after the data amount check in relief area reaches the threshold values of setting, triggering hardware interrupts data transmission;
After S4, DSP driver receives interrupt signal, read the data in relief area, and carry out effect;
If effect is passed through, according to data protocol form, the data receiving is parsed, then send hardware action
Order carrys out control device device, meanwhile, obtains hardware status information, and hardware data information is encapsulated according to data protocol form
Become correct reply data frame, send to arm processor;
Otherwise, according to data protocol form encapsulation error reply data frame, and ARM process is sent to by its hardware pin
Device;
S5, arm processor driver one by one WORD receive reply data frame in relief area, when the data of relief area
After reaching the threshold values of setting, triggering hardware interrupts transmission, the application layer program of arm processor reads the data in relief area, and
Verified;
If verification is passed through, data is analyzed, and analysis result is shown to screen(Man machine interface)On;
If effect failure, do not deal with.
It can thus be appreciated that:By the method for the invention, arm processor and DSP on achievable seamless knitter computer main board
Between communication, arm processor transmitting control commands, DSP receives control command responsing control command so that corresponding hardware is made
Go out corresponding execution action, its communication speed, with respect to I2C, CAN, the mode such as dual port RAM, is greatly improved, and this
Bright structure and configuration are simple, using also more flexible and convenient.
Further, in the specific embodiment of the invention, its data protocol form is as follows:
Each section of its agreement is defined as follows:
With reference to shown in Fig. 2, Fig. 2 is the structural representation that on seamless knitter computer main board, arm processor is connected with DSP,
Two core processor chips of DSP and ARM are had on seamless knitter computerized control system mainboard, dsp chip adopts TI company
TMS320F28232, ARM chip adopts the AM3505 of TI company, by configuring to two chip McBSP module registers, enters
The setting of row communications parameter.
With reference to shown in Fig. 3, Fig. 3 is the connection diagram of arm processor pin and dsp chip pin;The McBSP of DSP draws
Foot is joined directly together with the McBSP pin of ARM, and the CLKR pin of DSP connects the CLKX pin of ARM, and the CLKX pin of DSP connects
The CLKR pin of ARM, the FSR pin of DSP connects the FSX pin of ARM, and the FSX pin of DSP connects the FSR pin of ARM, DSP's
DX pin connects the DR pin of ARM, and the DR pin of DSP connects the DX pin of ARM.
At DSP end, CLKR is the clock signal of DSP receiving data, and CLKX is the clock signal that DSP sends data, and FSR is
The frame synchronizing signal of DSP receiving data, FSX is the frame synchronizing signal that DSP sends data, and DX is that DSP sends data pin, and DR is
DSP receiving data pin;At ARM end, CLKR is the clock signal of ARM receiving data, and CLKX is the clock letter that ARM sends data
Number, FSR is the frame synchronizing signal of ARM receiving data, and FSX is the frame synchronizing signal that ARM sends data, and DX is that ARM sends data
Pin, DR is ARM receiving data pin.When sending data, the relief area of data-pushing to McBSP, when valid data reach
When sending threshold values, send data.
Described above is only presently preferred embodiments of the present invention, and above-mentioned specific embodiment is not limitation of the present invention.
In the technological thought category of the present invention, various modifications and modification can occur, all those of ordinary skill in the art according to
Retouching, modification or equivalent that upper description is made, belong to the scope that the present invention is protected.