CopyData
Call peripheral-specific
GetWordData to read
Yes
No
Return
BlockHeader.BlockSize
BlockSize=
0x0000
?
Call GetLongData
to read
BlockHeader.DestAddr
Transfer
BlockHeader.BlockSize
words of data from
port to memory
starting at DestAddr
www.ti.com
Bootloader Features
187
SPRUI07–March 2020
Submit Documentation Feedback
Copyright © 2020, Texas Instruments Incorporated
Boot ROM
Example 2-7. Step 3: Call the ADC_cal() Function
extern void ADC_cal(void) ;
…
EALLOW;
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 1;
ADC_cal();
SysCtrlRegs.PCLKCR0.bit.ADCENCLK = 0;
EDIS;
2.2.15 CopyData Function
All bootloaders use the same function to copy data from the port to the device's SARAM. This function is
the CopyData() function. This function uses a pointer to a GetWordData function that is initialized by each
of the loaders to properly read data from that port. For example, when the SPI loader is evoked, the
GetWordData function pointer is initialized to point to the SPI-specific SPI_GetWordData function. Thus
when the CopyData() function is called, the correct port is accessed. The flow of the CopyData function is
shown in Figure 2-14.
Figure 2-14. Overview of CopyData Function