This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PIccolo微处理器的InitPieVectTable函数

Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE

我想问一下,Piccolo处理器的例程程序中,关于中断向量表初始化的函数InitPieVectTable( ),其中向量表源地址和目的地址都需要加3(Source = Source + 3,Dest = Dest + 3;),这加3的依据来源在哪儿?作为对比,Delfino系列处理器就不需要‘加3’,请各位大神告知一下,不胜感激~

  • 您好,
    请参考F2803x Workshop :
    processors.wiki.ti.com/.../C2000_Archived_Workshops
    在PieCtrl.c文件中找到memcpy:
    memcpy((Uint16 *)&PieVectTable + 6,(Uint16 *)&PieVectTableInit + 6,256-6);
    在C2000Ware / controlSUITE中,PieVect.c文件里的memcpy使用Uint32(而不是Uint16)。
  • Eric:
    如comment中所写:
    Uint32 *Source = (void *) &PieVectTableInit;
    volatile Uint32 *Dest = (void *) &PieVectTable;

    // Do not write over first 3 32-bit locations (these locations are
    // initialized by Boot ROM with boot variables)

    Source = Source + 3;
    Dest = Dest + 3;
  • 谢谢提点。