Realizing the Communication between DSP2407A and S3C4480 by Using CPLD

Publisher:WhisperingWavesLatest update time:2013-04-06 Source: dzscKeywords:CPLD  DSP2407A  S3C4480 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
    In modern automotive electronics , there are usually multiple microcontrollers working together in coordination. DSP controllers use Harvard structure and have fast computing speed, so DSP chips are widely used in automotive electronics to control the automotive power system. ARM is a 32-bit microcontroller with rich external expansion interfaces. Therefore, ARM is generally used in automotive electronics to implement large-capacity data storage and human-computer interaction or GPS global positioning system, so data exchange is required between DSP and ARM.

    CPLD (Complex Programmable Logic Device) is a complex user-programmable logic device. Due to the use of hardware programmable technology, it is as convenient to design hardware circuits as to design software. DSP2407A is a microcontroller designed by T1 to meet a wide range of digital motor control applications. S3C4480 is a cost-effective microcontroller designed by Samsung for handheld devices. This design takes Xilinx's XC95108 as an example, and realizes parallel communication between DSP2407A and S3C4480 by opening up two independent SRAM areas (1 byte each) in CPLD. With this communication mode, data transmission is accurate and high-speed, which can basically meet the requirements of real-time communication between DSP2407A and S3C4480 bus interface, thus organically unifying vehicle power control and human-computer interaction.

1 Overall system structure design
    DSP2407A is responsible for collecting all the data of the car, and then sending the data to S3C44B0 through CPLD for data storage and human-computer interaction. Sometimes S3C4480 needs to receive touch screen commands, and the commands are also sent to DSP2407A controller through CPLD to control the action of the entire car. For DSP2407A, it is necessary to respond to the commands sent by S3C44B0 in a timely manner; and for S3C4480, it is necessary to receive the data sent by DSP2407A at any time, so that the real-time communication between the two parties must be very strong. Therefore, in the system design, DSP2407A receives data in interrupt mode, and S3C44BO receives data in query mode.

    In DSP2407A, [DO~D7] is the data line, [A15~A12] is the address line, IS is the I/O space selection pin, and it is low when accessing external memory or I/O space. WE is write enable and RD is read enable. IOPC7 is a general-purpose I/O pin, which is used to determine whether DSP2407A can write data to CPLD. When IOPC7 is low, it means that DSP2407A can write data to CPLD; if it is high, it means that there is data in CPLD, and DSP2407A cannot write data to CPLD. XINT1 is an external interrupt, which is used to notify DSP2407A to prepare to read data in CPLD.

    In CPLD, it is implemented with 1 XC95108. XC95108 has a total of 108 macro units, which has enough space to implement 2 8-bit SRAM areas; it is mainly used to implement data exchange between DSP2407A and S3C44B0, and does not set the status bit of DSP2407A and S3C44B0 read/write control. In S3C44B0, [D0~D7] is the data line, nGCS1 is the chip select signal, and the chip is activated when the memory address is in the address area of ​​the corresponding segment. nWE is the write enable signal, and nOE is the read enable signal. IOPF0 is a general I/O port, used to monitor whether data can be read from the CPLD: when it is high, it means that there is data in the CPLD and the data can be read; when it is low, it means that there is no data in the CPLD to be read. IOPF1 is a general I/O port, used to monitor whether data can be written to the CPLD: when it is high, it means that there is no data in the CPLD and data can be written to the CPLD; when it is low, it means that there is data in the CPLD and S3C44B0 cannot write data to the CPLD. The system structure is shown in Figure 1.



2 CPLD design
    uses Xilinx ISE8.1 as the design tool, and uses the internationally common VHDL language to write the source program.

2.1 8-bit data is transferred from DSP to ARM

    When [A15~A12] is 1100, DSP2407A starts to write data to CPLD, and sets dspsign_write and armsign_read to 1; it means that there is already data in CPLD, notifying S3C4480 that it can read data and DSP2407A that it cannot write data to CPLD temporarily; at the same time, the data is written to latch sraml.

    When ARM sends a read data signal, it starts to read data from sraml, and sets dspsign_write and armsign_read to 0, it means that there is no data in CPLD, and DSP2407A can rewrite data to CPLD.




2.2 8-bit data is transferred from 83CA480 to DSP2407A
   
When S3C4480 writes data to CPLD, it writes the data to latch sram2 and sets dsp_int to 0, notifying DSP2407A to generate an external interrupt and fetch data from CPLD; armsign_write is set to 0, indicating that there is already data in CPLD and S3C4480 can no longer write data to CPLD. [page]

    When [A15~12] is 1101, DSP2407A sends a read signal to CPLD, data is transferred from latch sram2 to DSP2407A, and dsp_int is set to 1 and armsign_write is set to 1, indicating that the data has been read by DSP2407A and S3C4480 can continue to write data to CPLD.



3. Communication software design between S3C4480 and DSP2407A
   
In this program, DSP2407A uses interrupt mode to receive data, and S3C4480 uses query port mode to receive data.
(1) DSP2407A program


   


(2) S3C44B0 program


   

Keywords:CPLD  DSP2407A  S3C4480 Reference address:Realizing the Communication between DSP2407A and S3C4480 by Using CPLD

Previous article:Implementation of embedded Linux operating system based on digital TV system
Next article:CAN bus embedded driver programming based on uclinux

Recommended ReadingLatest update time:2024-11-16 15:30

Design of a digital high-power laser driver based on CPLD
introduction Laser processing mainly uses CO2 laser beam to focus on the surface of the material to melt the material, and at the same time uses compressed gas coaxial with the laser beam to blow away the melted material to complete the cutting of the required trajectory graphics or the engraving of the surface of th
[Power Management]
Design of a digital high-power laser driver based on CPLD
Design of fiber optic gyro signal acquisition system based on DSP and CPLD
0 Introduction As a new type of inertial device, fiber optic gyroscope has received more and more attention in recent years because it has many advantages that other gyroscopes cannot match, such as simple structure, high precision, large dynamic range, anti-electromagnetic interference, no drift caused by accelerati
[Microcontroller]
Design of fiber optic gyro signal acquisition system based on DSP and CPLD
Design of a digital high-power laser driver based on CPLD
Laser processing mainly uses CO2 laser beam to focus on the surface of the material to melt the material, and at the same time uses compressed gas coaxial with the laser beam to blow away the melted material to complete the cutting of the required trajectory graphics or the engraving of the surface of the correspondin
[Power Management]
Design of a digital high-power laser driver based on CPLD
Coal Gangue Sorting System Based on ARM Core and CAN Bus
introduction With the continuous development of embedded technology, the ARM microcontroller with high performance, low power consumption and low price of 32-bit RISC chip has shown a strong development trend. The combination of embedded system and fieldbus technology, combining the advantages of both, provides
[Microcontroller]
Coal Gangue Sorting System Based on ARM Core and CAN Bus
Using Programmable Logic Devices to Implement Flexible Power Management
  Power management generally refers to issues related to the power supply of circuit boards . These issues include:   • Choose from a variety of DC-DC converters to power the board   • Power supply sequencing/tracking   • Voltage monitoring   • All of the above   In this article, power management is simply defined a
[Power Management]
Using Programmable Logic Devices to Implement Flexible Power Management
Research on flow detection method of hydraulic system based on time difference method
1 Introduction Hydraulic technology is widely used in mining machinery, such as mining rock drilling, shoveling, transportation, crushing and mineral processing equipment. However, since most mining machinery works in a harsh environment, it is easy to cause hydraulic system failures. In addition, the hydra
[Analog Electronics]
Design of IEEE1149.1 USB Download Cable Based on CPLD
introduction With the advent of the System on Chip (SoC) era, programmable logic devices (including complex programmable logic devices (CPLD) and field programmable gate arrays (FPGA)) (with the unique advantage of being reprogrammable in the system) are becoming more and more widely used. This puts higher
[Embedded]
Design of IEEE1149.1 USB Download Cable Based on CPLD
Research on non-uniformity correction of image sensor based on CPLD
Image sensor is a basic device for acquiring modern visual information. It converts the spatially distributed light intensity information incident on the photosensitive surface into a video signal output in a time sequence, thereby reproducing the image information of the object. Ideally, when the image sensor is ex
[Embedded]
Research on non-uniformity correction of image sensor based on CPLD
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号