1 introduction
DSP the chip Bootloader procedure uses when the electricity the user program from the exterior non-volatility, the slow memory or the exterior controller loads to internal high speed RAM, guaranteed that the user program moves high speed in the DSP interior, TI Corporation’s C55x the series DSP chip provides many kinds of loading patterns, mainly includes the HPI guidance loading, the serial E2ROM guidance loading, the parallel guidance loading, the serial port guidance loading, I2C the main line E2ROM guidance loading and so on, what usually use is the parallel guidance loading pattern, this way guidance speed realizes quickly simply, but the volume and the power loss are also big, along with the serial interface storage device capacity’s enhancement, the serial guidance way volume is small, the power loss is lowThe superiority then appeared came out, therefore used ARM the serial interface to carry on the guidance loading for DSP, not only could omit the memory chip, moreover using the ARM ISP function, might according to need to change the user program, was advantageous in system’s maintenance and the promotion.
This article take the TMS320VC5509A chip guidance loading as an example, introduced in detail realizes the procedure guidance loading using ARM through the I2C serial guidance way, other guidance process may refer to correlation technique material [1].
TMS320VC5509A is TI a Corporation section of 16 fixed point low power loss DSP chip, its instruction cycle is 5ns most quickly, internal has 128×16k high speed RAM, the performance-to-price ratio is very high, widely uses in embedded domains and so on hand-hold equipment, correspondence, data acquisition.
When TI Corporation’s DSP chip leaving the plant, the solidification has the guidance loading operation in internal ROM (Bootloader), its major function is loads the exterior procedure to internal RAM in moves, raises system’s running rate, C55x series DSP its Bootloader procedure located at internal ROM spatial 0xFF0000-0xFF8000 place, after entering the Bootloader procedure, the procedure carries on the initialization first to DSP, disposes DSP the storehouse register, the interrupt register and the DSP condition register, guaranteed when guidance loading user program will not be interrupted, thus vectoring procedure load defeat.
Because DSP may through from lifts the table to make the revision to the register, needs to pay attention when the Bootloader program run, do not revise the Bootloader procedure has disposed the interrupt control register as far as possible, will otherwise cause the unpredictable consequence.
2.1 I2C guidance pattern hardware connection
For realizes through the I2C main line to the DSP guidance loading, usually the situation is the choice has I2C bus interface E2ROM, electric circuit diagram as shown in Figure 1, GPIO0-GPIO3 is uses for to choose the Bootloader guidance pattern, when after DSP replacement, to these 4 base pin level sampling, entered according to the different combination to the corresponding Bootloader procedure, Table 1 has listed the GPIO0-GPIO3 base pin different condition combination as well as the corresponding Bootloader guidance way. SDL and SDA respectively are the I2C clock and the data line, above pulls the resistance the size to be decided in connects I2C equipment’s how many [2].
![]() |
If realizes the guidance loading through the I2C main line to DSP, to stored datum’s I2C equipment has, if several requests:
(1) this equipment must first compatible Philips I2C main line standard V2.1, the work from the equipment pattern, and it from the device address is 0×50.
(2) the equipment interior uses two byte addressing, namely after receiving the main engine writes the order, after that receives the data is 16 address data.
(3) when reads to the equipment, the related equipment must support the automatic addressing increase, namely reads every time one time, its dummy home address indicator from increases 1, guarantee procedure according to smooth read-out.
Commonly used I2C connection E2ROM has ST Corporation’s M24 series and Philips PCF85 series E2ROM, according to procedure size choice corresponding chip, what needs to pay attention is the I2C guidance pattern most supports 64kB the data.
When I2C guidance pattern movement, DSP takes the main equipment to control the I2C main line’s clock, regarding DSP, SCL must satisfy the speed which the basis equation (1) obtains, but the I2C guidance pattern support’s highest clock rate is 400kHz, if therefore wants to use the I2C guidance pattern, on DSP when electricity the input clock cannot be bigger than 12MHz.
SCL (high) =SCL (low) =15× (DSP input clock cycle) (1)
2.2 I2C guidance pattern data storage way
For can the data from the exterior memory removal to DSP, the user program need to save correctly the data according to certain form in E2ROM, saves the data according to these forms is from lifts the table (Boot table), from lifts the table is the Bootloader procedure can the normal operation guarantee, only then according to from lifts the data the table the request memory, the user program can by the removal to the DSP interior normal operation, from lifts in the table also to need some Bootloader control data besides the user data, like the procedure entry point address (entry point address), the register disposition (register configurations) and the programmable detention (programmable delay) and so on, from liftsTable structure as shown in Figure 2.
![]() |
![]() |
And procedure entry point address in user program removal after the DSP interior, the user program starts from this address place to move, usually the situation is the interrupt to meter’s reset place, before Bootloader removal data, if needs to be possible to change certain register’s value, like DSP clock disposition register, EMIF disposition and so on, from lifts the table disposes these registers, requires certain time to be able the normal work, will otherwise cause the vectoring procedure defeat. The detention counter is lets Bootloader postpone the corresponding CPU cycle to carry on the data removal again, guarantees the vectoring procedure normal work, because DSP is uses the partition form to organize the data, like code section, data segment and user from definition data segment and so on, therefore production from lifts the table also defers to the partition memory which the corresponding form establishes, like this is advantageous to the program maintenance, realizes the modular design.
From lifts the table final, is the continual 4 byte entire zero data, its goal is to tell the DSP pre-computed course to complete, may pass on to the procedure entrance execution, simultaneously the DSP also give directions informed the guidance to the external storage unit to end, in the I2C pattern, after receiving the end mark on the data bus will give the stop symbol as the main engine receiving apparatus’s DSP signal, used for to finish the data transmission.
Must establish from lifts the table, may HEX conversion routine which provides using TI (HEX55.exe), will produce the linked file transforms uses in memory’s data format [1]. First, needs to establish CMD (link command file linker command file) the document, the link option which the input needs, HEX55 uses each kind of option translated file which this document provides, below is I2C the guidance way establishment CMD document and its option as well as the concrete meaning:
Usually in the situation must define uses some way like - Serial8, - options and so on parallel16, indicated that selects what Boot method, thus production correspondence storage format, because used the I2C pattern to guide, therefore these options might not use, in addition might use - reg_config and - the delay option, the CPU periodicity which the distinction established needed to change the register value which as well as needs to retard, what final demand attention was the HEX55 procedure must use v2.1 and the following edition, the early edition production from lifts the table not to be able the correct vectoring procedure.
3 ARM end design
Above introduced realizes the data storage form which using I2C connection E2ROM the guidance loading’s hardware connects and needs, uses ARM actually own I2C controller, from will lift the table to save in ARM FLASH, and lets ARM according to the I2C guidance pattern in the E2ROM succession to the DSP transmission correspondence data, realizes to the DSP guidance loading, selects ARM is Philips LPC2138. LPC2813 is based on the 32b ARM7 essence, the interior has reaches 512k high speed FLash and 32k static RAM, its operating frequency may reach 60MHz, its I2C bus control unit supports the I2C all working pattern, these when use in guides DSP not needing to use the port to simulate the I2C succession, the use is very convenient, when guides DSP, so long as ARM according to the corresponding order transmits the data, can realize the DSP pre-computed course, when uses the ARM guidance, only need Figure 1 SCL and SDA separately with ARM SCL and the SDA connection then.
Bootloader uses when the I2C read data its succession as shown in Figure 2. After the guidance starts, DSP will first use the stochastic read instruction (random read command) from the 0×0000 address place read data, this read instruction false will write the instruction and the current address read instruction by one (current address read command) is composed, after the ARM correct sound should the instruction, DSP will then continue to use the current address read instruction read surplus data.
In LPC2138, the I2C main line has the special controller, and after each time receives the data, corresponds the I2C condition register by the different code will express that the current I2C main line condition, the user may act according to the different condition to carry on next step operation [3], the entire guidance process will be ARM acts according to the different main line condition to transmit or the receive corresponding data, uses when ARM will guide the DSP program load, ARM takes from the equipment work, will cut between two kind of working patterns, respectively be from equipment receive (slave receiver and from equipment transmission (slave transmitter).
Following introduced that the ARM end procedure the movement condition, in the procedure first (I2ADDR) sets at through the I2C address register ARM from the device address is 0×50, again (I2CONSET) I2EN and AA will set using the I2C setting control register 1, such ARM will work from the equipment pattern, once the I2C main line will receive the valid data, the procedure will enter to the interrupt service in moves, user program according to I2C condition register (I2STAT) thus the value judgment current condition will enter the next step the operation, Figure 3 for interrupt service work flow.
After Figure 3 Representative State receives the data, in the I2C condition register’s value, the different value represents each condition which on the main line possibly appears. what 0xA0 receives on behalf of the procedure is start perhaps stop symbolized that the returns master routine continues to wait for the interrupt, Representative 0×60 receives own and writes the order from the device address, and returns to the ACK signal, Representative Count1 receives writes the order number of times, because in the entire guidance process can only receive to one time writes the order, so long as therefore Count is bigger than 1 piece of receive to make a mistake, needs to start the vectoring procedure, controls DSP using ARM the reset signal to make a fresh start to guide the process, until the success guidance, 0×80 expressed that ARM entered from the equipment receive data condition, and front had already received this aircraft’s device address, this time received the data and returns to the ACK signal, I2DATWhen from equipment receive pattern saves receives to data, transmits when the pattern saves treats the transmission the data, after the guidance starts, continual two times receives the data should be 0, if is not 0, indicated that the vectoring procedure makes a mistake, needs to reposition DSP to make a fresh start to receive.
![]() |
Count is the continual two receive data 0 counters, once satisfies the condition, will transmit the buffer the first address to take out the memory in Trans_addr, Representative 0xA8 receives the current address read order, once receives this order, will wait the transmission data to take out sends in transmission data register I2DAT, so that time next transmission sends out the data, 0xC0 expressed that the data transmits successfully, and has not received the ACK signal, means that the current address read order ended, this time will transmit the buffer address to add 1, took out next time treats the transmission data address, has like this then completed 1 byte data transmission, entire guidance process yizhi dao DSP received from lifts the table to finishAfter the symbol stops, what needs to pay attention, I2C interrupts the flag bit to need to eliminate through the software, each time interrupts when the returns must use I2C to reset the control register (I2CONCLR) manual to eliminate in the I2C control register’s interrupt symbol.
Completed the I2C guidance loading pattern according to the above method, the user has been possible to join the test order in the procedure, through controlled the GPIO height change production pulse, using oscilloscope observation, thus judgment pre-computed course whether to succeed.
4 conclusions
This article proposed the guidance way already successfully applied in a section of low power loss, the small number passes on the middle of the equipment, has exempted to the exterior memory’s programming, is specially advantageous to equipment’s promotion and the maintenance.



