TMS320C62x HPI引导过程的实现
IC;
2)然后把地址写到HPIA;
3)最后通过HPID读或写数据。
本文链接地址:http://www.oyaya.net/fanwen/view/156984.html
2)然后把地址写到HPIA;
3)最后通过HPID读或写数据。
假设主机CPU也是TMS320C62x,那么主机与目标机之间的连接如图1所示:
如图1所示,假如Target 6201的/HCS连接到主机6201的CE1上。Target 6201的HPI寄存器映射到Host 6201DSP内存中,HCNTRL[1:0]和HHWIL连接到主机CPU的地址线上,那么HPIC、HPIA、HPID寄存器的地址分配如表2所示。,那么在C语言中,可以通过指针访问HPIC、HPIA、HPID,例如:
#define C6201_HPI 0x01400000 /* Host address on which C6x HPI is mapped */
int *hpi_ptr; /* define and initialize pointer*/
hpi_ptr = (int *)C6201_HPI;
/* Write dest_address to HPIA, with HOB=1 */
ptr_hpi[2] = (int)(dest_address & 0x0ffff);
ptr_hpi[3] = (int)((dest_address>>16)&0x0ffff);
表2 HPIC、HPIA、HPID各寄存器的地址分配
映射到主机的地址
HPI控制线
HPI寄存器访问
HCNTL[1:0]
HHWIL
HPI Base address + 0x00
00
0
HPIC 1st halfword
HPI Base address + 0x04
00
1
HPIC 2st halfword
HPI Base address + 0x08