Update repo
This commit is contained in:
1 parent
749dab5721
commit
ce65a0f59a
14950 files changed
+4408250
-1
No files matched your search
@@ -0,0 +1,85 @@
|
||||
MEMORY
|
||||
{
|
||||
/* Flash sectors */
|
||||
CMBANK0_RESETISR : origin = 0x00200000, length = 0x00000008 /* Boot to Flash Entry Point */
|
||||
CMBANK0_SECTOR0_1_2 : origin = 0x00200008, length = 0x0000BFF7
|
||||
/* CMBANK0_SECTOR1 : origin = 0x00204000, length = 0x00004000 */
|
||||
/* CMBANK0_SECTOR2 : origin = 0x00208000, length = 0x00004000 */
|
||||
CMBANK0_SECTOR3 : origin = 0x0020C000, length = 0x00004000
|
||||
CMBANK0_SECTOR4 : origin = 0x00210000, length = 0x00010000
|
||||
CMBANK0_SECTOR5 : origin = 0x00220000, length = 0x00010000
|
||||
CMBANK0_SECTOR6 : origin = 0x00230000, length = 0x00010000
|
||||
CMBANK0_SECTOR7 : origin = 0x00240000, length = 0x00010000
|
||||
CMBANK0_SECTOR8 : origin = 0x00250000, length = 0x00010000
|
||||
CMBANK0_SECTOR9 : origin = 0x00260000, length = 0x00010000
|
||||
CMBANK0_SECTOR10 : origin = 0x00270000, length = 0x00004000
|
||||
CMBANK0_SECTOR11 : origin = 0x00274000, length = 0x00004000
|
||||
CMBANK0_SECTOR12 : origin = 0x00278000, length = 0x00004000
|
||||
CMBANK0_SECTOR13 : origin = 0x0027C000, length = 0x00004000
|
||||
|
||||
C1RAM : origin = 0x1FFFC000, length = 0x00001FFF
|
||||
C0RAM : origin = 0x1FFFE000, length = 0x00001FFF
|
||||
|
||||
BOOT_RSVD : origin = 0x20000000, length = 0x00000800 /* Part of S0, BOOT rom will use this for stack */
|
||||
S0RAM : origin = 0x20000800, length = 0x000037FF
|
||||
S1RAM : origin = 0x20004000, length = 0x00003FFF
|
||||
S2RAM : origin = 0x20008000, length = 0x00003FFF
|
||||
S3RAM : origin = 0x2000C000, length = 0x00003FFF
|
||||
E0RAM : origin = 0x20010000, length = 0x00003FFF
|
||||
|
||||
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000400
|
||||
CPU1TOCMMSGRAM0_ECAT : origin = 0x20080400, length = 0x00000400
|
||||
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
|
||||
|
||||
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000400
|
||||
CMTOCPU1MSGRAM0_ECAT : origin = 0x20082400, length = 0x00000400
|
||||
CMTOCPU1MSGRAM1 : origin = 0x20082800, length = 0x00000800
|
||||
|
||||
CPU2TOCMMSGRAM0 : origin = 0x20084000, length = 0x00000800
|
||||
CPU2TOCMMSGRAM1 : origin = 0x20084800, length = 0x00000800
|
||||
CMTOCPU2MSGRAM0 : origin = 0x20086000, length = 0x00000800
|
||||
CMTOCPU2MSGRAM1 : origin = 0x20086800, length = 0x00000800
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.resetisr : > CMBANK0_RESETISR
|
||||
.vftable : > CMBANK0_SECTOR0_1_2 /* Application placed vector table in Flash*/
|
||||
.vtable : > S0RAM /* Application placed vector table in RAM*/
|
||||
.text : >> CMBANK0_SECTOR0_1_2 | CMBANK0_SECTOR3
|
||||
.cinit : > CMBANK0_SECTOR0_1_2
|
||||
.pinit : > CMBANK0_SECTOR0_1_2
|
||||
.switch : > CMBANK0_SECTOR0_1_2
|
||||
.sysmem : > C1RAM
|
||||
|
||||
.stack : > C1RAM
|
||||
.ebss : > C1RAM
|
||||
.econst : > CMBANK0_SECTOR0_1_2
|
||||
.esysmem : > C1RAM
|
||||
.data : > C1RAM
|
||||
.bss : > C1RAM
|
||||
.const : > CMBANK0_SECTOR0_1_2
|
||||
|
||||
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU1_ECAT : > CMTOCPU1MSGRAM0_ECAT, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
|
||||
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
|
||||
MSGRAM_CPU1_TO_CM_ECAT : > CPU1TOCMMSGRAM0_ECAT, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
|
||||
|
||||
.TI.ramfunc : {} LOAD = CMBANK0_SECTOR0_1_2 | CMBANK0_SECTOR3,
|
||||
RUN = S0RAM | S1RAM | S2RAM,
|
||||
LOAD_START(RamfuncsLoadStart),
|
||||
LOAD_SIZE(RamfuncsLoadSize),
|
||||
LOAD_END(RamfuncsLoadEnd),
|
||||
RUN_START(RamfuncsRunStart),
|
||||
RUN_SIZE(RamfuncsRunSize),
|
||||
RUN_END(RamfuncsRunEnd),
|
||||
ALIGN(8)
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
@@ -0,0 +1,134 @@
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* BEGIN is used for the "boot to Flash" bootloader mode */
|
||||
BEGIN : origin = 0x080000, length = 0x000002
|
||||
BOOT_RSVD : origin = 0x000002, length = 0x0001AE /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM0 : origin = 0x0001B0, length = 0x000250
|
||||
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
|
||||
RAMD0 : origin = 0x00C000, length = 0x000800
|
||||
RAMD1 : origin = 0x00C800, length = 0x000800
|
||||
RAMLS0 : origin = 0x008000, length = 0x000800
|
||||
RAMLS1 : origin = 0x008800, length = 0x000800
|
||||
RAMLS2 : origin = 0x009000, length = 0x000800
|
||||
RAMLS3 : origin = 0x009800, length = 0x000800
|
||||
RAMLS4 : origin = 0x00A000, length = 0x000800
|
||||
RAMLS5 : origin = 0x00A800, length = 0x000800
|
||||
RAMLS6 : origin = 0x00B000, length = 0x000800
|
||||
RAMLS7 : origin = 0x00B800, length = 0x000800
|
||||
RAMGS0 : origin = 0x00D000, length = 0x001000
|
||||
RAMGS1 : origin = 0x00E000, length = 0x001000
|
||||
RAMGS2 : origin = 0x00F000, length = 0x001000
|
||||
RAMGS3 : origin = 0x010000, length = 0x001000
|
||||
RAMGS4 : origin = 0x011000, length = 0x001000
|
||||
RAMGS5 : origin = 0x012000, length = 0x001000
|
||||
RAMGS6 : origin = 0x013000, length = 0x001000
|
||||
RAMGS7 : origin = 0x014000, length = 0x001000
|
||||
RAMGS8 : origin = 0x015000, length = 0x001000
|
||||
RAMGS9 : origin = 0x016000, length = 0x001000
|
||||
RAMGS10 : origin = 0x017000, length = 0x001000
|
||||
RAMGS11 : origin = 0x018000, length = 0x001000
|
||||
RAMGS12 : origin = 0x019000, length = 0x001000
|
||||
RAMGS13 : origin = 0x01A000, length = 0x001000
|
||||
RAMGS14 : origin = 0x01B000, length = 0x001000
|
||||
RAMGS15 : origin = 0x01C000, length = 0x001000
|
||||
|
||||
/* Flash sectors */
|
||||
FLASH0 : origin = 0x080002, length = 0x001FFE /* on-chip Flash */
|
||||
FLASH1 : origin = 0x082000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH2 : origin = 0x084000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH3 : origin = 0x086000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH4 : origin = 0x088000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH5 : origin = 0x090000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH6 : origin = 0x098000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH7 : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH8 : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH9 : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH10 : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH11 : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH12 : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH13 : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
|
||||
|
||||
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
|
||||
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
|
||||
CPUTOCMRAM : origin = 0x039000, length = 0x000800
|
||||
CMTOCPURAM : origin = 0x038000, length = 0x000800
|
||||
|
||||
CANA_MSG_RAM : origin = 0x049000, length = 0x000800
|
||||
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800
|
||||
|
||||
RESET : origin = 0x3FFFC0, length = 0x000002
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
codestart : > BEGIN, ALIGN(4)
|
||||
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(4)
|
||||
.cinit : > FLASH1 | FLASH2 | FLASH3, ALIGN(4)
|
||||
.switch : > FLASH1, ALIGN(4)
|
||||
.reset : > RESET, TYPE = DSECT /* not used, */
|
||||
.stack : > RAMGS0
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.init_array : > FLASH1, ALIGN(4)
|
||||
.bss : > RAMLS4 | RAMLS5
|
||||
.bss:output : > RAMLS3
|
||||
.bss:cio : > RAMLS5
|
||||
.data : > RAMLS5
|
||||
.sysmem : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.const : > FLASH5, ALIGN(4)
|
||||
#else
|
||||
.pinit : > FLASH1, ALIGN(4)
|
||||
.ebss : > RAMLS5
|
||||
.esysmem : > RAMLS5
|
||||
.cio : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.econst : >> FLASH4 | FLASH5, ALIGN(4)
|
||||
#endif
|
||||
|
||||
ramgs0 : > RAMGS0, type=NOINIT
|
||||
ramgs1 : > RAMGS1, type=NOINIT
|
||||
|
||||
MSGRAM_CPU1_TO_CPU2 : > CPU1TOCPU2RAM, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CPU1 : > CPU2TOCPU1RAM, type=NOINIT
|
||||
MSGRAM_CPU_TO_CM : > CPUTOCMRAM, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU : > CMTOCPURAM, type=NOINIT
|
||||
|
||||
/* The following section definition are for SDFM examples */
|
||||
Filter_RegsFile : > RAMGS0
|
||||
Filter1_RegsFile : > RAMGS1, fill=0x1111
|
||||
Filter2_RegsFile : > RAMGS2, fill=0x2222
|
||||
Filter3_RegsFile : > RAMGS3, fill=0x3333
|
||||
Filter4_RegsFile : > RAMGS4, fill=0x4444
|
||||
Difference_RegsFile : >RAMGS5, fill=0x3333
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(RamfuncsLoadStart),
|
||||
LOAD_SIZE(RamfuncsLoadSize),
|
||||
LOAD_END(RamfuncsLoadEnd),
|
||||
RUN_START(RamfuncsRunStart),
|
||||
RUN_SIZE(RamfuncsRunSize),
|
||||
RUN_END(RamfuncsRunEnd),
|
||||
ALIGN(4)
|
||||
#else
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(_RamfuncsLoadStart),
|
||||
LOAD_SIZE(_RamfuncsLoadSize),
|
||||
LOAD_END(_RamfuncsLoadEnd),
|
||||
RUN_START(_RamfuncsRunStart),
|
||||
RUN_SIZE(_RamfuncsRunSize),
|
||||
RUN_END(_RamfuncsRunEnd),
|
||||
ALIGN(4)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
|
||||
MEMORY
|
||||
{
|
||||
/* BEGIN is used for the "boot to Flash" bootloader mode */
|
||||
BEGIN : origin = 0x080000, length = 0x000002
|
||||
BOOT_RSVD : origin = 0x000002, length = 0x0001AE /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM0 : origin = 0x0001B0, length = 0x000250
|
||||
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
|
||||
RAMD0 : origin = 0x00C000, length = 0x000800
|
||||
RAMD1 : origin = 0x00C800, length = 0x000800
|
||||
RAMLS0 : origin = 0x008000, length = 0x000800
|
||||
RAMLS1 : origin = 0x008800, length = 0x000800
|
||||
RAMLS2 : origin = 0x009000, length = 0x000800
|
||||
RAMLS3 : origin = 0x009800, length = 0x000800
|
||||
RAMLS4 : origin = 0x00A000, length = 0x000800
|
||||
RAMLS5 : origin = 0x00A800, length = 0x001800
|
||||
/* combined RAMLS5 + RAMLS6 + RAMLS7 as any of them aren't able to load sysmem individually
|
||||
RAMLS6 : origin = 0x00B000, length = 0x000800
|
||||
RAMLS7 : origin = 0x00B800, length = 0x000800 */
|
||||
RAMGS0 : origin = 0x00D000, length = 0x001000
|
||||
RAMGS1 : origin = 0x00E000, length = 0x001000
|
||||
RAMGS2 : origin = 0x00F000, length = 0x001000
|
||||
RAMGS3 : origin = 0x010000, length = 0x001000
|
||||
RAMGS4 : origin = 0x011000, length = 0x001000
|
||||
RAMGS5 : origin = 0x012000, length = 0x001000
|
||||
RAMGS6 : origin = 0x013000, length = 0x001000
|
||||
RAMGS7 : origin = 0x014000, length = 0x001000
|
||||
RAMGS8 : origin = 0x015000, length = 0x001000
|
||||
RAMGS9 : origin = 0x016000, length = 0x001000
|
||||
RAMGS10 : origin = 0x017000, length = 0x001000
|
||||
RAMGS11 : origin = 0x018000, length = 0x001000
|
||||
RAMGS12 : origin = 0x019000, length = 0x001000
|
||||
RAMGS13 : origin = 0x01A000, length = 0x001000
|
||||
RAMGS14 : origin = 0x01B000, length = 0x001000
|
||||
RAMGS15 : origin = 0x01C000, length = 0x001000
|
||||
|
||||
/* Flash sectors */
|
||||
FLASH0 : origin = 0x080002, length = 0x001FFE /* on-chip Flash */
|
||||
FLASH1 : origin = 0x082000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH2 : origin = 0x084000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH3 : origin = 0x086000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH4 : origin = 0x088000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH5 : origin = 0x090000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH6 : origin = 0x098000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH7 : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH8 : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH9 : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH10 : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH11 : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH12 : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH13 : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
|
||||
|
||||
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
|
||||
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
|
||||
CPUTOCMRAM : origin = 0x039000, length = 0x000800
|
||||
CMTOCPURAM : origin = 0x038000, length = 0x000800
|
||||
|
||||
CANA_MSG_RAM : origin = 0x049000, length = 0x000800
|
||||
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800
|
||||
|
||||
RESET : origin = 0x3FFFC0, length = 0x000002
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
codestart : > BEGIN, ALIGN(4)
|
||||
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(4)
|
||||
.cinit : > FLASH1 | FLASH2 | FLASH3, ALIGN(4)
|
||||
.switch : > FLASH1, ALIGN(4)
|
||||
.reset : > RESET, TYPE = DSECT /* not used, */
|
||||
.stack : > RAMGS0
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.init_array : > FLASH1, ALIGN(4)
|
||||
.bss : > RAMLS4 | RAMLS5
|
||||
.bss:output : > RAMLS3
|
||||
.bss:cio : > RAMLS5
|
||||
.data : > RAMLS5
|
||||
.sysmem : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.const : > FLASH5, ALIGN(4)
|
||||
#else
|
||||
.pinit : > FLASH1, ALIGN(4)
|
||||
.ebss : > RAMLS5
|
||||
.esysmem : > RAMLS5
|
||||
.cio : > RAMLS5
|
||||
/* Initalized sections go in Flash */
|
||||
.econst : >> FLASH4 | FLASH5, ALIGN(4)
|
||||
#endif
|
||||
|
||||
ramgs0 : > RAMGS0, type=NOINIT
|
||||
ramgs1 : > RAMGS1, type=NOINIT
|
||||
|
||||
MSGRAM_CPU1_TO_CPU2 : > CPU1TOCPU2RAM, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CPU1 : > CPU2TOCPU1RAM, type=NOINIT
|
||||
MSGRAM_CPU_TO_CM : > CPUTOCMRAM, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU : > CMTOCPURAM, type=NOINIT
|
||||
|
||||
/* The following section definition are for SDFM examples */
|
||||
Filter_RegsFile : > RAMGS0
|
||||
Filter1_RegsFile : > RAMGS1, fill=0x1111
|
||||
Filter2_RegsFile : > RAMGS2, fill=0x2222
|
||||
Filter3_RegsFile : > RAMGS3, fill=0x3333
|
||||
Filter4_RegsFile : > RAMGS4, fill=0x4444
|
||||
Difference_RegsFile : >RAMGS5, fill=0x3333
|
||||
|
||||
#if defined(__TI_EABI__)
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(RamfuncsLoadStart),
|
||||
LOAD_SIZE(RamfuncsLoadSize),
|
||||
LOAD_END(RamfuncsLoadEnd),
|
||||
RUN_START(RamfuncsRunStart),
|
||||
RUN_SIZE(RamfuncsRunSize),
|
||||
RUN_END(RamfuncsRunEnd),
|
||||
ALIGN(4)
|
||||
#else
|
||||
.TI.ramfunc : {} LOAD = FLASH3,
|
||||
RUN = RAMLS0 | RAMLS1 | RAMLS2 |RAMLS3,
|
||||
LOAD_START(_RamfuncsLoadStart),
|
||||
LOAD_SIZE(_RamfuncsLoadSize),
|
||||
LOAD_END(_RamfuncsLoadEnd),
|
||||
RUN_START(_RamfuncsRunStart),
|
||||
RUN_SIZE(_RamfuncsRunSize),
|
||||
RUN_END(_RamfuncsRunEnd),
|
||||
ALIGN(4)
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
@@ -0,0 +1,77 @@
|
||||
MEMORY
|
||||
{
|
||||
/* Flash sectors */
|
||||
CMBANK0_SECTOR0 : origin = 0x00200000, length = 0x00004000
|
||||
CMBANK0_SECTOR1 : origin = 0x00204000, length = 0x00004000
|
||||
CMBANK0_SECTOR2 : origin = 0x00208000, length = 0x00004000
|
||||
CMBANK0_SECTOR3 : origin = 0x0020C000, length = 0x00004000
|
||||
CMBANK0_SECTOR4 : origin = 0x00210000, length = 0x00010000
|
||||
CMBANK0_SECTOR5 : origin = 0x00220000, length = 0x00010000
|
||||
CMBANK0_SECTOR6 : origin = 0x00230000, length = 0x00010000
|
||||
CMBANK0_SECTOR7 : origin = 0x00240000, length = 0x00010000
|
||||
CMBANK0_SECTOR8 : origin = 0x00250000, length = 0x00010000
|
||||
CMBANK0_SECTOR9 : origin = 0x00260000, length = 0x00010000
|
||||
CMBANK0_SECTOR10 : origin = 0x00270000, length = 0x00004000
|
||||
CMBANK0_SECTOR11 : origin = 0x00274000, length = 0x00004000
|
||||
CMBANK0_SECTOR12 : origin = 0x00278000, length = 0x00004000
|
||||
CMBANK0_SECTOR13 : origin = 0x0027C000, length = 0x00004000
|
||||
|
||||
C1RAM : origin = 0x1FFFC000, length = 0x00001FFF
|
||||
C0RAM : origin = 0x1FFFE000, length = 0x00001FFF
|
||||
|
||||
BOOT_RSVD : origin = 0x20000000, length = 0x00000800 /* Part of S0, BOOT rom will use this for stack */
|
||||
S0RAM_RESETISR : origin = 0x20000800, length = 0x00000008 /* Boot to RAM Entry Point */
|
||||
S0_S1_S2RAM : origin = 0x20000808, length = 0x0000B7F7
|
||||
/* S0RAM : origin = 0x20000808, length = 0x000037F8 */
|
||||
/* S1RAM : origin = 0x20004000, length = 0x00003FFF */
|
||||
/* S2RAM : origin = 0x20008000, length = 0x00003FFF */
|
||||
S3RAM : origin = 0x2000C000, length = 0x00003FFF
|
||||
E0RAM : origin = 0x20010000, length = 0x00003FFF
|
||||
|
||||
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000400
|
||||
CPU1TOCMMSGRAM0_ECAT : origin = 0x20080400, length = 0x00000400
|
||||
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
|
||||
|
||||
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000400
|
||||
CMTOCPU1MSGRAM0_ECAT : origin = 0x20082400, length = 0x00000400
|
||||
CMTOCPU1MSGRAM1 : origin = 0x20082800, length = 0x00000800
|
||||
|
||||
CPU2TOCMMSGRAM0 : origin = 0x20084000, length = 0x00000800
|
||||
CPU2TOCMMSGRAM1 : origin = 0x20084800, length = 0x00000800
|
||||
CMTOCPU2MSGRAM0 : origin = 0x20086000, length = 0x00000800
|
||||
CMTOCPU2MSGRAM1 : origin = 0x20086800, length = 0x00000800
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.resetisr : > S0RAM_RESETISR
|
||||
.vtable : > S0_S1_S2RAM /* Application placed vector table */
|
||||
.text : >> C1RAM | C0RAM | S0_S1_S2RAM
|
||||
.TI.ramfunc : > C0RAM
|
||||
.cinit : > C0RAM | S0_S1_S2RAM
|
||||
.pinit : > C0RAM
|
||||
.switch : > C0RAM
|
||||
.sysmem : > C0RAM
|
||||
|
||||
.stack : > C1RAM
|
||||
.ebss : > C1RAM
|
||||
.econst : > C1RAM
|
||||
.esysmem : > C1RAM
|
||||
.data : > C1RAM
|
||||
.bss : > C1RAM
|
||||
.const : > C1RAM
|
||||
|
||||
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU1_ECAT : > CMTOCPU1MSGRAM0_ECAT, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
|
||||
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
|
||||
MSGRAM_CPU1_TO_CM_ECAT : > CPU1TOCMMSGRAM0_ECAT, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
@@ -0,0 +1,110 @@
|
||||
MEMORY
|
||||
{
|
||||
/* BEGIN is used for the "boot to SARAM" bootloader mode */
|
||||
BEGIN : origin = 0x000000, length = 0x000002
|
||||
BOOT_RSVD : origin = 0x000002, length = 0x0001AE /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM0 : origin = 0x0001B0, length = 0x000250
|
||||
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
|
||||
RAMD0 : origin = 0x00C000, length = 0x000800
|
||||
RAMD1 : origin = 0x00C800, length = 0x000800
|
||||
RAMLS0_to_LS7 : origin = 0x008000, length = 0x004000
|
||||
/* RAMLS0 : origin = 0x008000, length = 0x000800 */
|
||||
/* RAMLS1 : origin = 0x008800, length = 0x000800 */
|
||||
/* RAMLS2 : origin = 0x009000, length = 0x000800 */
|
||||
/* RAMLS3 : origin = 0x009800, length = 0x000800 */
|
||||
/* RAMLS4 : origin = 0x00A000, length = 0x000800 */
|
||||
/* RAMLS5 : origin = 0x00A800, length = 0x000800 */
|
||||
/* RAMLS6 : origin = 0x00B000, length = 0x000800 */
|
||||
/* RAMLS7 : origin = 0x00B800, length = 0x000800 */
|
||||
RAMGS0 : origin = 0x00D000, length = 0x001000
|
||||
RAMGS1 : origin = 0x00E000, length = 0x001000
|
||||
RAMGS2 : origin = 0x00F000, length = 0x001000
|
||||
RAMGS3 : origin = 0x010000, length = 0x001000
|
||||
RAMGS4 : origin = 0x011000, length = 0x001000
|
||||
RAMGS5 : origin = 0x012000, length = 0x001000
|
||||
RAMGS6 : origin = 0x013000, length = 0x001000
|
||||
RAMGS7 : origin = 0x014000, length = 0x001000
|
||||
RAMGS8 : origin = 0x015000, length = 0x001000
|
||||
RAMGS9 : origin = 0x016000, length = 0x001000
|
||||
RAMGS10 : origin = 0x017000, length = 0x001000
|
||||
RAMGS11 : origin = 0x018000, length = 0x001000
|
||||
RAMGS12 : origin = 0x019000, length = 0x001000
|
||||
RAMGS13 : origin = 0x01A000, length = 0x001000
|
||||
RAMGS14 : origin = 0x01B000, length = 0x001000
|
||||
RAMGS15 : origin = 0x01C000, length = 0x001000
|
||||
|
||||
/* Flash sectors */
|
||||
FLASH0 : origin = 0x080000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH1 : origin = 0x082000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH2 : origin = 0x084000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH3 : origin = 0x086000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH4 : origin = 0x088000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH5 : origin = 0x090000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH6 : origin = 0x098000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH7 : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH8 : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH9 : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH10 : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH11 : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH12 : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH13 : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
|
||||
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
|
||||
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
|
||||
|
||||
CPUTOCMRAM : origin = 0x039000, length = 0x000800
|
||||
CMTOCPURAM : origin = 0x038000, length = 0x000800
|
||||
|
||||
CANA_MSG_RAM : origin = 0x049000, length = 0x000800
|
||||
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800
|
||||
RESET : origin = 0x3FFFC0, length = 0x000002
|
||||
}
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
codestart : > BEGIN
|
||||
.text : >> RAMD0 | RAMD1 | RAMLS0_to_LS7
|
||||
.cinit : > RAMM0
|
||||
.switch : > RAMM0
|
||||
.reset : > RESET, TYPE = DSECT /* not used, */
|
||||
|
||||
.stack : > RAMGS0
|
||||
#if defined(__TI_EABI__)
|
||||
.bss : > RAMLS0_to_LS7
|
||||
.bss:output : > RAMLS0_to_LS7
|
||||
.init_array : > RAMM0
|
||||
.const : > RAMGS0
|
||||
.data : > RAMD0
|
||||
.sysmem : > RAMD1
|
||||
#else
|
||||
.pinit : > RAMM0
|
||||
.ebss : > RAMLS0_to_LS7
|
||||
.econst : > RAMLS0_to_LS7
|
||||
.esysmem : > RAMLS0_to_LS7
|
||||
#endif
|
||||
|
||||
ramgs0 : > RAMGS0, type=NOINIT
|
||||
ramgs1 : > RAMGS1, type=NOINIT
|
||||
|
||||
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM, type=NOINIT
|
||||
MSGRAM_CPU_TO_CM > CPUTOCMRAM, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU > CMTOCPURAM, type=NOINIT
|
||||
|
||||
/* The following section definition are for SDFM examples */
|
||||
Filter_RegsFile : > RAMGS0
|
||||
Filter1_RegsFile : > RAMGS1, fill=0x1111
|
||||
Filter2_RegsFile : > RAMGS2, fill=0x2222
|
||||
Filter3_RegsFile : > RAMGS3, fill=0x3333
|
||||
Filter4_RegsFile : > RAMGS4, fill=0x4444
|
||||
Difference_RegsFile : >RAMGS5, fill=0x3333
|
||||
|
||||
.TI.ramfunc : {} > RAMM0
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
MEMORY
|
||||
{
|
||||
/* BEGIN is used for the "boot to SARAM" bootloader mode */
|
||||
BEGIN : origin = 0x000000, length = 0x000002
|
||||
BOOT_RSVD : origin = 0x000002, length = 0x0001AE /* Part of M0, BOOT rom will use this for stack */
|
||||
RAMM0 : origin = 0x0001B0, length = 0x000250
|
||||
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
|
||||
RAMD0 : origin = 0x00C000, length = 0x000800
|
||||
RAMD1 : origin = 0x00C800, length = 0x000800
|
||||
RAMLS0_to_LS7 : origin = 0x008000, length = 0x004000
|
||||
/* RAMLS0 : origin = 0x008000, length = 0x000800 */
|
||||
/* RAMLS1 : origin = 0x008800, length = 0x000800 */
|
||||
/* RAMLS2 : origin = 0x009000, length = 0x000800 */
|
||||
/* RAMLS3 : origin = 0x009800, length = 0x000800 */
|
||||
/* RAMLS4 : origin = 0x00A000, length = 0x000800 */
|
||||
/* RAMLS5 : origin = 0x00A800, length = 0x000800 */
|
||||
/* RAMLS6 : origin = 0x00B000, length = 0x000800 */
|
||||
/* RAMLS7 : origin = 0x00B800, length = 0x000800 */
|
||||
RAMGS0 : origin = 0x00D000, length = 0x001000
|
||||
RAMGS1 : origin = 0x00E000, length = 0x001000
|
||||
RAMGS2 : origin = 0x00F000, length = 0x001000
|
||||
RAMGS3 : origin = 0x010000, length = 0x001000
|
||||
RAMGS4 : origin = 0x011000, length = 0x001000
|
||||
RAMGS5 : origin = 0x012000, length = 0x001000
|
||||
RAMGS6 : origin = 0x013000, length = 0x001000
|
||||
RAMGS7 : origin = 0x014000, length = 0x001000
|
||||
RAMGS8 : origin = 0x015000, length = 0x001000
|
||||
RAMGS9 : origin = 0x016000, length = 0x001000
|
||||
RAMGS10 : origin = 0x017000, length = 0x001000
|
||||
RAMGS11 : origin = 0x018000, length = 0x001000
|
||||
RAMGS12 : origin = 0x019000, length = 0x001000
|
||||
RAMGS13 : origin = 0x01A000, length = 0x001000
|
||||
RAMGS14 : origin = 0x01B000, length = 0x001000
|
||||
RAMGS15 : origin = 0x01C000, length = 0x001000
|
||||
|
||||
/* Flash sectors */
|
||||
FLASH0 : origin = 0x080000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH1 : origin = 0x082000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH2 : origin = 0x084000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH3 : origin = 0x086000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH4 : origin = 0x088000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH5 : origin = 0x090000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH6 : origin = 0x098000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH7 : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH8 : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH9 : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */
|
||||
FLASH10 : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH11 : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH12 : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */
|
||||
FLASH13 : origin = 0x0BE000, length = 0x002000 /* on-chip Flash */
|
||||
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
|
||||
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
|
||||
|
||||
CPUTOCMRAM : origin = 0x039000, length = 0x000800
|
||||
CMTOCPURAM : origin = 0x038000, length = 0x000800
|
||||
|
||||
CANA_MSG_RAM : origin = 0x049000, length = 0x000800
|
||||
CANB_MSG_RAM : origin = 0x04B000, length = 0x000800
|
||||
RESET : origin = 0x3FFFC0, length = 0x000002
|
||||
}
|
||||
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
codestart : > BEGIN
|
||||
.text : >> RAMD0 | RAMD1 | RAMLS0_to_LS7
|
||||
.cinit : > RAMM0
|
||||
.switch : > RAMM0
|
||||
.reset : > RESET, TYPE = DSECT /* not used, */
|
||||
|
||||
.stack : > RAMGS0
|
||||
#if defined(__TI_EABI__)
|
||||
.bss : > RAMLS0_to_LS7
|
||||
.bss:output : > RAMLS0_to_LS7
|
||||
.init_array : > RAMM0
|
||||
.const : > RAMGS0
|
||||
.data : > RAMD0
|
||||
.sysmem : > RAMGS1
|
||||
/* changed location of sysmem from RAMD1 to RAMGS1 */
|
||||
#else
|
||||
.pinit : > RAMM0
|
||||
.ebss : > RAMLS0_to_LS7
|
||||
.econst : > RAMLS0_to_LS7
|
||||
.esysmem : > RAMLS0_to_LS7
|
||||
#endif
|
||||
|
||||
ramgs0 : > RAMGS0, type=NOINIT
|
||||
ramgs1 : > RAMGS1, type=NOINIT
|
||||
|
||||
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM, type=NOINIT
|
||||
MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM, type=NOINIT
|
||||
MSGRAM_CPU_TO_CM > CPUTOCMRAM, type=NOINIT
|
||||
MSGRAM_CM_TO_CPU > CMTOCPURAM, type=NOINIT
|
||||
|
||||
/* The following section definition are for SDFM examples */
|
||||
Filter_RegsFile : > RAMGS0
|
||||
Filter1_RegsFile : > RAMGS1, fill=0x1111
|
||||
Filter2_RegsFile : > RAMGS2, fill=0x2222
|
||||
Filter3_RegsFile : > RAMGS3, fill=0x3333
|
||||
Filter4_RegsFile : > RAMGS4, fill=0x4444
|
||||
Difference_RegsFile : >RAMGS5, fill=0x3333
|
||||
|
||||
.TI.ramfunc : {} > RAMM0
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
//===========================================================================
|
||||
// End of file.
|
||||
//===========================================================================
|
||||
*/
|
||||
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
FOR ALL EXAMPLES
|
||||
|
||||
Please first refer to the EtherCAT Slave Controller User Guide (under docs) for usage instructions.
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cm_cia402_solution"
|
||||
device="Generic CortexM4 Device"
|
||||
cgtVersion="20.2.6.LTS"
|
||||
products="C2000WARE"
|
||||
endianness="little"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=RAM --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --stack_size=0x200 --heap_size=0x1000 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --stack_size=0x200 --heap_size=0x1000 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cm_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/startup_cm.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/cm.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/cm.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cm_echoback_solution"
|
||||
device="Generic CortexM4 Device"
|
||||
cgtVersion="20.2.6.LTS"
|
||||
products="C2000WARE"
|
||||
endianness="little"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=RAM --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cm_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/startup_cm.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/cm.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/cm.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cm_foe_download"
|
||||
device="Generic CortexM4 Device"
|
||||
cgtVersion="20.2.6.LTS"
|
||||
products="C2000WARE"
|
||||
endianness="little"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=RAM --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=ETHERCAT_STACK --define=_FLASH --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cm_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cm.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/startup_cm.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/cm.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/cm.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cm_pdi_hal_test_app"
|
||||
device="Generic CortexM4 Device"
|
||||
cgtVersion="20.2.6.LTS"
|
||||
products="C2000WARE"
|
||||
endianness="little"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=DEBUG --define=RAM --define=PDI_HAL_TEST --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib_cm -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -mv7M4 --float_support=none -me --verbose_diagnostics --gen_func_subsections=on --embedded_constants=off --define=DEBUG --define=_FLASH --define=PDI_HAL_TEST --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT/pdi_test_app.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cm_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/cmd/2838x_RAM_lnk_cm.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/cmd/2838x_FLASH_lnk_cm.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/startup_cm.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/cm.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/cm.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/ccs/Debug/driverlib_cm.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib_cm/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: pdi_test_app.c
|
||||
//
|
||||
// TITLE: EtherCAT PDI (Processor Data Interface) example for F2838x CM
|
||||
//
|
||||
// F2838x CM PDI Interface Test App
|
||||
//
|
||||
// This example tests the F2838x CM EtherCAT PDI and demonstrates usage of the
|
||||
// EtherCAT CM HAL drivers. The example should be run on a F2838x controlCARD.
|
||||
//
|
||||
// External Connections
|
||||
// The controlCARD RJ45 port 0 is connected to PC running TwinCAT master
|
||||
//
|
||||
// Watch Variables
|
||||
// ESC_escRegs (ESC stands for EtherCAT Slave Controller) data structure will
|
||||
// be constantly updated to show the latest values of the specified ESC
|
||||
// registers
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: F2838x EtherCAT Software v2.02.00.00 $
|
||||
// $Release Date: Tue Oct 29 00:56:49 IST 2024 $
|
||||
// $Copyright:
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "ethercat_slave_cm_hal.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main()
|
||||
{
|
||||
uint16_t initStatus;
|
||||
|
||||
//
|
||||
// Initialize CM and HAL interface
|
||||
//
|
||||
initStatus = ESC_initHW();
|
||||
|
||||
//
|
||||
// Loop and signal error if initHW returns failure
|
||||
//
|
||||
if(initStatus == ESC_HW_INIT_FAIL)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Toggle Error
|
||||
//
|
||||
ESC_signalFail();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Setup and perform PDI Test
|
||||
//
|
||||
ESC_setupPDITestInterface();
|
||||
|
||||
//
|
||||
// Update local RAM with ESC register values for debugging
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
ESC_debugUpdateESCRegLogs();
|
||||
HAL_performDelay();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cpu1_allocate_ecat_to_cm"
|
||||
device="Generic C28xx Device"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=DEBUG --define=RAM --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --entry_point code_start --stack_size=0x200 --heap_size=0x200 " />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=DEBUG --define=_FLASH --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --entry_point code_start --stack_size=0x200 --heap_size=0x200 " />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT/f2838x_cpu1_allocate_ecat_to_cm.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+430
@@ -0,0 +1,430 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: f2838x_cpu1_allocate_ecat_to_cm.c
|
||||
//
|
||||
// TITLE: Allocating the EtherCAT Peripheral to CM Core.
|
||||
//
|
||||
// F2838x EtherCAT Setup and Allocation to CM
|
||||
//
|
||||
// This example sets up the F2838x CPU1 device, enables and configures
|
||||
// the EtherCAT peripheral then allocates it to the CM. The CM is then
|
||||
// configured to boot to RAM or FLASH and released from reset.
|
||||
//
|
||||
// Important: Before running this example, refer to the EtherCAT Slave
|
||||
// Controller User Guide in C2000Ware for the proper
|
||||
// setup/execution procedure of this example
|
||||
//
|
||||
// External Connections
|
||||
// None
|
||||
//
|
||||
// Watch Variables
|
||||
// None
|
||||
//
|
||||
//###########################################################################
|
||||
// $TI Release: F2838x EtherCAT Software v2.02.00.00 $
|
||||
// $Release Date: Tue Oct 29 00:56:49 IST 2024 $
|
||||
// $Copyright:
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "device.h"
|
||||
|
||||
//
|
||||
// Defines
|
||||
//
|
||||
#define ESCSS_LOOP_TIMEOUT 0x300U
|
||||
#define ALLOCATE_TO_CM 0x1U
|
||||
#define ESC_USE_INT_PHY_CLK 0x1U
|
||||
|
||||
#define BOOT_KEY 0x5A000000UL
|
||||
#define CM_BOOT_FREQ_125MHZ 0x7D00U
|
||||
#define BOOTMODE_BOOT_TO_WAIT 0x0U
|
||||
#define BOOTMODE_BOOT_TO_RAM 0x5U
|
||||
#define BOOTMODE_BOOT_TO_FLASH 0x3U
|
||||
|
||||
#define CCARD_LED_1_GPIO 31U
|
||||
#define CCARD_LED_2_GPIO 34U
|
||||
#define CCARD_ECAT_RUN_LED_GPIO 146U
|
||||
#define CCARD_ECAT_ERR_LED_GPIO 145U
|
||||
|
||||
//
|
||||
// Function Prototypes
|
||||
//
|
||||
void setupESCGPIOs(void);
|
||||
void configureAndReleaseCMToWait(void);
|
||||
void releaseCMToApplication(void);
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main(void)
|
||||
{
|
||||
//
|
||||
// Disable the watchdog
|
||||
//
|
||||
SysCtl_disableWatchdog();
|
||||
|
||||
#ifdef _FLASH
|
||||
//
|
||||
// Copy time critical code and flash setup code to RAM. This includes the
|
||||
// following functions: Flash_initModule();
|
||||
//
|
||||
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
|
||||
// are created by the linker. Refer to the device .cmd file.
|
||||
//
|
||||
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
|
||||
|
||||
//
|
||||
// Call Flash Initialization to setup flash waitstates. This function must
|
||||
// reside in RAM.
|
||||
//
|
||||
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Verify the XTAL crystal frequency.
|
||||
//
|
||||
#warn "IMPORTANT: F2838x EtherCAT software is now built for XTAL source of 25MHz. Refer to the EtherCAT Software User Guide for more information"
|
||||
if(!Device_verifyXTAL(DEVICE_OSCSRC_FREQ / 1000000))
|
||||
{
|
||||
//
|
||||
// The actual XTAL frequency does not match DEVICE_OSCSRC_FREQ!!
|
||||
// Please check the XTAL frequency used.
|
||||
//
|
||||
// Note that the latest F2838x controlCARDs (Rev.B and later) have been
|
||||
// updated to use 25MHz XTAL by default. If you have an older 20MHz XTAL
|
||||
// controlCARD (E1, E2, or Rev.A), refer to the controlCARD
|
||||
// documentation on steps to reconfigure the controlCARD from 20MHz to
|
||||
// 25MHz.
|
||||
//
|
||||
ESTOP0;
|
||||
|
||||
//
|
||||
// Set LED GPIOs to output mode
|
||||
//
|
||||
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED1, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setDirectionMode(DEVICE_GPIO_PIN_LED2, GPIO_DIR_MODE_OUT);
|
||||
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Toggle controlCARD LEDs and delay
|
||||
//
|
||||
GPIO_togglePin(DEVICE_GPIO_PIN_LED1);
|
||||
GPIO_togglePin(DEVICE_GPIO_PIN_LED2);
|
||||
|
||||
DEVICE_DELAY_US((uint32_t)(50000));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Set up device clock
|
||||
//
|
||||
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
|
||||
|
||||
//
|
||||
// Make sure the LSPCLK divider is set to the default (divide by 4)
|
||||
//
|
||||
SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_4);
|
||||
|
||||
//
|
||||
// Turn on all peripherals and initialize GPIOs
|
||||
//
|
||||
Device_enableAllPeripherals();
|
||||
Device_initGPIO();
|
||||
|
||||
//
|
||||
// Setup AUX Clock for ECAT and CM
|
||||
// Configured to 500MHz raw ((25 * 20 IMULT) /1)
|
||||
//
|
||||
SysCtl_setAuxClock(SYSCTL_AUXPLL_ENABLE | SYSCTL_AUXPLL_OSCSRC_XTAL |
|
||||
SYSCTL_AUXPLL_IMULT(20) | SYSCTL_AUXPLL_FMULT_0 |
|
||||
SYSCTL_AUXPLL_DIV_1);
|
||||
|
||||
//
|
||||
// Setup GPIOs for EtherCAT
|
||||
//
|
||||
setupESCGPIOs();
|
||||
|
||||
//
|
||||
// Allocate Ethercat to CM
|
||||
//
|
||||
SysCtl_allocateSharedPeripheral(SYSCTL_PALLOCATE_ETHERCAT,
|
||||
ALLOCATE_TO_CM);
|
||||
|
||||
//
|
||||
// Setup CM clocks and release from reset to Wait Boot Mode
|
||||
//
|
||||
configureAndReleaseCMToWait();
|
||||
|
||||
//
|
||||
// Setup EtherCAT Clocks
|
||||
//
|
||||
// Aux = 500MHz and use /5 to get 100MHz for ECAT IP
|
||||
// (There is a built in /4 to get 25MHz for PHY when using
|
||||
// internal clocking for PHY)
|
||||
//
|
||||
SysCtl_setECatClk(SYSCTL_ECATCLKOUT_DIV_5, SYSCTL_SOURCE_AUXPLL,
|
||||
ESC_USE_INT_PHY_CLK);
|
||||
|
||||
//
|
||||
// Set boot mode to RAM or Flash and release from Wait Boot Mode
|
||||
//
|
||||
releaseCMToApplication();
|
||||
|
||||
//
|
||||
// Wait Forever
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Additional CPU1 actions can be added here
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// setupESCGPIOs - Setup EtherCAT GPIOs
|
||||
//
|
||||
// Note: These are configured for the F2838x controlCARD. For
|
||||
// more pin mapping details refer to the GPIO chapter of the
|
||||
// F2838x Technical Reference Manual.
|
||||
//
|
||||
void
|
||||
setupESCGPIOs(void)
|
||||
{
|
||||
//
|
||||
// PHY CLK
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_154_ESC_PHY_CLK);
|
||||
|
||||
//
|
||||
// PHY Reset
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_155_ESC_PHY_RESETN);
|
||||
|
||||
//
|
||||
// I2C for EEPROM
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_150_ESC_I2C_SDA);
|
||||
GPIO_setQualificationMode(150, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPadConfig(150, GPIO_PIN_TYPE_PULLUP);
|
||||
GPIO_setPinConfig(GPIO_151_ESC_I2C_SCL);
|
||||
GPIO_setQualificationMode(151, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPadConfig(151, GPIO_PIN_TYPE_PULLUP);
|
||||
|
||||
//
|
||||
// P0 TX and RX DATA
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_158_ESC_TX0_DATA0);
|
||||
GPIO_setQualificationMode(158, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_159_ESC_TX0_DATA1);
|
||||
GPIO_setQualificationMode(159, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_160_ESC_TX0_DATA2);
|
||||
GPIO_setQualificationMode(160, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_161_ESC_TX0_DATA3);
|
||||
GPIO_setQualificationMode(161, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_165_ESC_RX0_DATA0);
|
||||
GPIO_setQualificationMode(165, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_166_ESC_RX0_DATA1);
|
||||
GPIO_setQualificationMode(166, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_167_ESC_RX0_DATA2);
|
||||
GPIO_setQualificationMode(167, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_168_ESC_RX0_DATA3);
|
||||
GPIO_setQualificationMode(168, GPIO_QUAL_ASYNC);
|
||||
|
||||
//
|
||||
// P0 TX Enable, RX DV, RX ERR
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_156_ESC_TX0_ENA);
|
||||
GPIO_setQualificationMode(156, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_162_ESC_RX0_DV);
|
||||
GPIO_setQualificationMode(162, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_164_ESC_RX0_ERR);
|
||||
GPIO_setPadConfig(164, GPIO_PIN_TYPE_STD);
|
||||
|
||||
//
|
||||
// P0 TX and RX Clk
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_157_ESC_TX0_CLK);
|
||||
GPIO_setQualificationMode(157, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_163_ESC_RX0_CLK);
|
||||
GPIO_setQualificationMode(163, GPIO_QUAL_ASYNC);
|
||||
|
||||
//
|
||||
// P0 Linkstatus and Link Active LED
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_148_ESC_PHY0_LINKSTATUS);
|
||||
GPIO_setPadConfig(148, GPIO_PIN_TYPE_STD);
|
||||
GPIO_setPinConfig(GPIO_143_ESC_LED_LINK0_ACTIVE);
|
||||
GPIO_setQualificationMode(143, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPadConfig(143, GPIO_PIN_TYPE_INVERT);
|
||||
|
||||
//
|
||||
// P0+P1 MDIO CLK and Data
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_152_ESC_MDIO_CLK);
|
||||
GPIO_setPinConfig(GPIO_153_ESC_MDIO_DATA);
|
||||
|
||||
//
|
||||
// P1 TX and RX DATA
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_131_ESC_TX1_DATA0);
|
||||
GPIO_setQualificationMode(131, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_132_ESC_TX1_DATA1);
|
||||
GPIO_setQualificationMode(132, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_134_ESC_TX1_DATA2);
|
||||
GPIO_setQualificationMode(134, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_135_ESC_TX1_DATA3);
|
||||
GPIO_setQualificationMode(135, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_139_ESC_RX1_DATA0);
|
||||
GPIO_setQualificationMode(139, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_140_ESC_RX1_DATA1);
|
||||
GPIO_setQualificationMode(140, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_141_ESC_RX1_DATA2);
|
||||
GPIO_setQualificationMode(141, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_142_ESC_RX1_DATA3);
|
||||
GPIO_setQualificationMode(142, GPIO_QUAL_ASYNC);
|
||||
|
||||
//
|
||||
// P1 TX Enable, RX DV, RX ERR
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_129_ESC_TX1_ENA);
|
||||
GPIO_setQualificationMode(129, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_136_ESC_RX1_DV);
|
||||
GPIO_setQualificationMode(136, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_138_ESC_RX1_ERR);
|
||||
GPIO_setPadConfig(138, GPIO_PIN_TYPE_STD);
|
||||
|
||||
//
|
||||
// P1 TX and RX Clk
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_130_ESC_TX1_CLK);
|
||||
GPIO_setQualificationMode(130, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPinConfig(GPIO_137_ESC_RX1_CLK);
|
||||
GPIO_setQualificationMode(137, GPIO_QUAL_ASYNC);
|
||||
|
||||
//
|
||||
// P1 Linkstatus and Link Active LED
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_149_ESC_PHY1_LINKSTATUS);
|
||||
GPIO_setPadConfig(149, GPIO_PIN_TYPE_PULLUP);
|
||||
GPIO_setPinConfig(GPIO_144_ESC_LED_LINK1_ACTIVE);
|
||||
GPIO_setQualificationMode(144, GPIO_QUAL_ASYNC);
|
||||
GPIO_setPadConfig(144, GPIO_PIN_TYPE_INVERT);
|
||||
|
||||
//
|
||||
// Sync and Latch
|
||||
//
|
||||
// Note these GPIOs aren't required for EtherCAT
|
||||
// operation and are configured here for demonstration,
|
||||
// analysis, and debug purposes
|
||||
//
|
||||
GPIO_setPinConfig(GPIO_125_ESC_LATCH0);
|
||||
GPIO_setPinConfig(GPIO_126_ESC_LATCH1);
|
||||
GPIO_setPinConfig(GPIO_127_ESC_SYNC0);
|
||||
GPIO_setPinConfig(GPIO_128_ESC_SYNC1);
|
||||
GPIO_setDirectionMode(127, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setDirectionMode(128, GPIO_DIR_MODE_OUT);
|
||||
|
||||
//
|
||||
// Allocate controlCARD LEDS to CM
|
||||
//
|
||||
GPIO_setDirectionMode(CCARD_ECAT_RUN_LED_GPIO, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setDirectionMode(CCARD_ECAT_ERR_LED_GPIO, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(CCARD_ECAT_RUN_LED_GPIO, GPIO_CORE_CM);
|
||||
GPIO_setMasterCore(CCARD_ECAT_ERR_LED_GPIO, GPIO_CORE_CM);
|
||||
GPIO_setDirectionMode(CCARD_LED_1_GPIO, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setDirectionMode(CCARD_LED_2_GPIO, GPIO_DIR_MODE_OUT);
|
||||
GPIO_setMasterCore(CCARD_LED_1_GPIO, GPIO_CORE_CM);
|
||||
GPIO_setMasterCore(CCARD_LED_2_GPIO, GPIO_CORE_CM);
|
||||
}
|
||||
|
||||
//
|
||||
// configureAndReleaseCMToWait - Configure CM clocks, set boot mode to wait,
|
||||
// and release from reset
|
||||
//
|
||||
void
|
||||
configureAndReleaseCMToWait(void)
|
||||
{
|
||||
//
|
||||
// Configuring CM to run at 125MHz (AUX Raw = 500MHz)
|
||||
//
|
||||
SysCtl_setCMClk(SYSCTL_CMCLKOUT_DIV_4, SYSCTL_SOURCE_AUXPLL);
|
||||
|
||||
//
|
||||
// Configure CM boot up configurations and boot mode as wait boot
|
||||
//
|
||||
IPC_setBootMode(IPC_CPU1_L_CM_R,
|
||||
(BOOT_KEY | CM_BOOT_FREQ_125MHZ | BOOTMODE_BOOT_TO_WAIT));
|
||||
|
||||
//
|
||||
// Set IPC flag (required for boot)
|
||||
//
|
||||
IPC_setFlagLtoR(IPC_CPU1_L_CM_R, IPC_FLAG0);
|
||||
|
||||
//
|
||||
// Release CM from reset
|
||||
//
|
||||
SysCtl_controlCMReset(SYSCTL_CORE_DEACTIVE);
|
||||
}
|
||||
|
||||
//
|
||||
// releaseCMToApplication - Set CM boot mode to Flash or RAM, then release from
|
||||
// wait boot mode
|
||||
//
|
||||
void
|
||||
releaseCMToApplication(void)
|
||||
{
|
||||
//
|
||||
// Configure CM boot up configurations and boot mode
|
||||
//
|
||||
#ifdef _FLASH
|
||||
IPC_setBootMode(IPC_CPU1_L_CM_R,
|
||||
(BOOT_KEY | CM_BOOT_FREQ_125MHZ | BOOTMODE_BOOT_TO_FLASH));
|
||||
#else
|
||||
IPC_setBootMode(IPC_CPU1_L_CM_R,
|
||||
(BOOT_KEY | CM_BOOT_FREQ_125MHZ | BOOTMODE_BOOT_TO_RAM));
|
||||
#endif
|
||||
|
||||
//
|
||||
// Set IPC flag (required for leaving wait boot mode)
|
||||
//
|
||||
IPC_setFlagLtoR(IPC_CPU1_L_CM_R, IPC_FLAG0);
|
||||
}
|
||||
|
||||
//
|
||||
// End of file
|
||||
//
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cpu1_cia402_solution"
|
||||
device="Generic C28xx Device"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu64 --define=ETHERCAT_STACK --define=RAM --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --entry_point code_start --stack_size=0x200 --heap_size=0x1000 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu64 --define=ETHERCAT_STACK --define=_FLASH --define=CPU1 --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --entry_point code_start --stack_size=0x200 --heap_size=0x1000 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cpu1_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cpu1_cia402.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cpu1_cia402.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cpu1_echoback_solution"
|
||||
device="Generic C28xx Device"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=ETHERCAT_STACK --define=RAM --define=CPU1 --diag_warning=225 --diag_suppress=10063 --diag_suppress=770 --display_error_number" linkerBuildOptions="--define=RAM --entry_point code_start --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=ETHERCAT_STACK --define=_FLASH --define=CPU1 --diag_warning=225 --diag_suppress=10063 --diag_suppress=770 --display_error_number" linkerBuildOptions="--define=_FLASH --entry_point code_start --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cpu1_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cpu1_foe_download_solution"
|
||||
device="Generic C28xx Device"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=ETHERCAT_STACK --define=RAM --define=CPU1 --diag_warning=225 --diag_suppress=10063 --diag_suppress=770 --display_error_number" linkerBuildOptions="--define=RAM --entry_point code_start --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${EXAMPLE_ROOT} -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=ETHERCAT_STACK --define=_FLASH --define=CPU1 --diag_warning=225 --diag_suppress=10063 --diag_suppress=770 --display_error_number" linkerBuildOptions="--define=_FLASH --entry_point code_start --stack_size=0x200 --heap_size=0x200 --rom_model" />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cpu1_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_RAM_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/cmd/2838x_FLASH_lnk_ecat_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
<projectSpec>
|
||||
<project
|
||||
name="f2838x_cpu1_pdi_hal_test_app"
|
||||
device="Generic C28xx Device"
|
||||
cgtVersion="22.6.0.LTS"
|
||||
products="C2000WARE"
|
||||
outputFormat="ELF"
|
||||
launchWizard="False"
|
||||
linkerCommandFile=""
|
||||
>
|
||||
|
||||
<configuration name="RAM" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=DEBUG --define=RAM --define=CPU1 --define=PDI_HAL_TEST --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=RAM --entry_point code_start --stack_size=0x200 --heap_size=0x200 " />
|
||||
<configuration name="FLASH" compilerBuildOptions="--opt_level=2 -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT}/f2838x/driverlib -I${C2000WARE_DEVICE_SUPPORT_ROOT}/f2838x/common/include -I${ETHERCAT_ROOT}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --define=DEBUG --define=_FLASH --define=CPU1 --define=PDI_HAL_TEST --diag_warning=225 --diag_suppress=10063 --display_error_number" linkerBuildOptions="--define=_FLASH --entry_point code_start --stack_size=0x200 --heap_size=0x200 " />
|
||||
|
||||
<pathVariable name="C2000WARE_DEVICE_SUPPORT_ROOT" path="../../../../../../../device_support/" scope="project" />
|
||||
<pathVariable name="C2000WARE_DLIB_ROOT" path="../../../../../../../driverlib/" scope="project" />
|
||||
<pathVariable name="ETHERCAT_ROOT" path="../../../" scope="project" />
|
||||
<pathVariable name="EXAMPLE_ROOT" path="../" scope="project" />
|
||||
|
||||
<file action="copy" path="EXAMPLE_ROOT/pdi_test_app.c" targetDirectory="" />
|
||||
<file action="copy" path="ETHERCAT_ROOT/source/ethercat_slave_cpu1_hal.c" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/targetConfigs/TMS320F28388D.ccxml" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/cmd/2838x_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="RAM" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/cmd/2838x_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="FLASH" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/f2838x_codestartbranch.asm" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/driverlib.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/include/device.h" targetDirectory="device" />
|
||||
<file action="copy" path="C2000WARE_DEVICE_SUPPORT_ROOT/f2838x/common/source/device.c" targetDirectory="device" />
|
||||
<file action="link" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/ccs/Debug/driverlib.lib" targetDirectory="" />
|
||||
<file action="copy" path="C2000WARE_DLIB_ROOT/f2838x/driverlib/" targetDirectory="device" excludeFromBuild="True" />
|
||||
|
||||
</project>
|
||||
</projectSpec>
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: pdi_test_app.c
|
||||
//
|
||||
// TITLE: EtherCAT PDI (Processor Data Interface) example for F2838x CPU1
|
||||
//
|
||||
// F2838x CPU1 PDI Interface Test App
|
||||
//
|
||||
// This example tests the F2838x CPU1 EtherCAT PDI and demonstrates usage of
|
||||
// the EtherCAT CPU1 HAL drivers. The example should be run on a F2838x
|
||||
// controlCARD.
|
||||
//
|
||||
// External Connections
|
||||
// The controlCARD RJ45 port 0 is connected to PC running TwinCAT master
|
||||
//
|
||||
// Watch Variables
|
||||
// ESC_escRegs (ESC stands for EtherCAT Slave Controller) data structure will
|
||||
// be constantly updated to show the latest values of the specified ESC
|
||||
// registers
|
||||
//
|
||||
//#############################################################################
|
||||
// $TI Release: F2838x EtherCAT Software v2.02.00.00 $
|
||||
// $Release Date: Tue Oct 29 00:56:49 IST 2024 $
|
||||
// $Copyright:
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//#############################################################################
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "ethercat_slave_cpu1_hal.h"
|
||||
|
||||
//
|
||||
// Main
|
||||
//
|
||||
void main()
|
||||
{
|
||||
uint16_t initStatus;
|
||||
|
||||
//
|
||||
// Initialize CPU1 and HAL interface
|
||||
//
|
||||
initStatus = ESC_initHW();
|
||||
|
||||
//
|
||||
// Loop and signal error if initHW returns failure
|
||||
//
|
||||
if(initStatus == ESC_HW_INIT_FAIL)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
//
|
||||
// Toggle Error
|
||||
//
|
||||
ESC_signalFail();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Setup and perform PDI Test
|
||||
//
|
||||
ESC_setupPDITestInterface();
|
||||
|
||||
//
|
||||
// Update local RAM with ESC register values for debugging
|
||||
//
|
||||
while(1)
|
||||
{
|
||||
ESC_debugUpdateESCRegLogs();
|
||||
DEVICE_DELAY_US((uint32_t)(50000));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">␍
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">␍
|
||||
<head>␍
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />␍
|
||||
<meta http-equiv="Content-Style-Type" content="text/css" />␍
|
||||
<meta name="generator" content="pandoc" />␍
|
||||
<title>Manifest File</title>␍
|
||||
<style type="text/css">code{white-space: pre;}</style>␍
|
||||
<link href="data:text/css;charset=utf-8,%0A%0A%0A%0A%40font%2Dface%20%7B%0Afont%2Dfamily%3A%20%27Open%20Sans%27%3B%0Afont%2Dstyle%3A%20normal%3B%0Afont%2Dweight%3A%20400%3B%0Asrc%3A%20url%28%27data%3Afont%2Fwoff2%3Bbase64%2Cd09GMgABAAAAADzUABIAAAAAhjgAADxwAAEZmgAAAAAAAAAAAAAAAAAAAAAAAAAAGhYbDBx0BmAAgUwIgSIJjzQREAqBpESBjUIBNgIkA4ZsE70QC4M8AAQgBYIyB4QoDIIJG8J3CQg7WxX5j0PthLRbJVvedpUoKlTzFUWwcUCG52fZ%2F%2F%2F%2F%2F3lJxxAlWAMiaNd12%2F9PqJmJKW5iyEExieloQ9KxVuZAQ07T1g7vfgVloomBA%2FUEiuEMCGVsPBsLc9rD3dPKhTisOejgNULCLyjxoeYlBGuZsjRKads6GS6b8QRDIttvKSa68bAbLrwP31TZsuGVyrv7lPcTS4bG9tKpUh76wlIon84X%2FsDUs5lHxlTP%2Fif%2BNs2eosU%2Fnf%2FBfw%2FriGqqb%2BffLOvzVA9JiiYPkV3xr7qrZ%2Fbum4pAxULkIPkZgBBQJu%2F2AG2zs1GxcgYq2FMQpj1RETESsbAKmzJyopiJzNnDKkTX5pwurDm2%2Fl%2BkLvK%2F%2Bx%2FAP6A2ZgrZRvjS1KSQBer9XuGyk3Iw3zfX%2B1eWZFmG4CQDj7CYnr8CXBV4ueyfuup7tsiSJbYtuxH%2FjmfaSz7qPupZoCCZ%2BkF0QXRpQIvhcQTov6omea3KKY0pFP4oK73IomFDl%2BISgLSDg2T3m9LqWHnZhsdUX6Zbs2x9S8bARE7Ay%2By7Qf%2FnllVniRftubDauc4suapKNQPzE8citiadRhUeQAB2Or6gcE01zLrqvv3azJyYfdvFLJRBRNN%2BrORtiKb4r90jEQolkS9CXdeapUUtovJYdjvKac7KcpzMaA1l%2FuGrT4aVVrGvMVAuLrBgPpJTtAv0AsQv4mpVYhTdrISsR3HVOUDRuJh4nIdPy752XK3pgwsJHaOiCfRBCMYnBZa2NQIs0MJBCLKQcLAUFiLHsSb1NBwDuVM%2B%2BS0pbMpCb4wnNT80UzMTE9QxNEqUXUj%2BXtWyBRikfCGFLhWNnelMh67A%2Bx%2BBHyAogRS0C1I6L0lJt9RGUJGUzgZAjQekU04ENxHSBYHaRMdLMVd257vKTeW69pbnoi9NTzZ4puUyQp2QCOOWBcHlBVHZINQPsqpeQjArJqPxaQKweFrTR1P%2Fk%2BXq%2B%2FE66DKZ2KGI2ZjJZNOIfxEploB4nMfYbCEuPnLbpwkSihwCCsbniQTAguiPVErkU4mUNL%2BUgcJFiymBc06kZQAgwjK%2Bx5hwzplJMQDIJhWEDSTOGJKlWpoIMEUadBm6RwiOj8PFkZ74BMmB3NPHvuQZdmtwhPKxaCIC1O5pSECsQvXqWxLjy0SwLDAMtWW45JcEf9qVQU4AAOvKcpvthncBrrn3f6P2TFH5pL6ErAoIPAgbyH0bD2BVQtHJQvXeU9iytiHI6oIFw3FX7KYd%2Fws48OV6eVger6oIUYdoQXQh%2BhBbCAZCg0ws5P%2F%2F30%2BhOw99btm1DAYcrQBRhWi8jM0FaH419ud9hVS%2F0ut62vSv6Q%2FT11%2BiySYajVNbtUV%2Fb5%2FexPSeyXTDklT41IpZiv4R2m3Dfcp9KWoG9CMAOmZLgoOTwv9t%2FXjG7O9no%2FSNV51dlkUn2AXcpNQTLI0adKlSGjJgNWg3YlhoCCEQH%2BDv5%2Bvj7eXp4Y5zw7piXJyd0I6nHeztbG2srSxPIeDmZidNDQ30YVA9XR1tprpw1uhWsieLKhwIhGlDCFAphITMFTNSlJXCvFS7BnGYV1RMYWUSk86rwpJKpWQBZbBSCbm2Z1laCiZ6RfcBbuU87snz7Dx7R5L4WZIjvKrod%2BrtYCMx9O8mwhLRGcX3ibFESNJCqbD2cGBXU%2FncuJtPLlOhOxfmmcPUG5mPZuIouu1w9CKPimlUnXUEk4VEgpJLUlkHBxWtYuH7JsyXkXXj7AS4sDsaU8uIxeWw2Z6h9iA3uWnrBnnWSoOFDnWyWxohn666Da3a54egEGCM4tGe%2Fq6VLupikmKFCY7LkmodtkTc48IxKTyS9g%2BEon9%2FU0Gfmor%2F91YEWgYeaf9eEUU9e7fPaySLVll%2FZPSApEe2n04%2F31YHDfx09bMcma9lC2vvLpFPB%2FysabdbsZqgVGlqkCjKQZaCw9RL5J8Wfq78fbpRRBgkAAxoN%2B77EOTWB8wGH4agD%2FWBsmqI94A%2BFBiQym357qjcbDkjVNVS8mFxqGkbhEW5Q0rbxes%2B9DWsbK1TFiIP2X%2Fhky3m5JlDhoxIiRi5oUREAgQUJuwkwnKXsPYD82bP2nAFm5nLbZFniAVCw4pU%2Bqg9HOyqPE6GeWwEVpAL1OD4ReXMWGnlZg8RK1l6TAzjjnw3zNBtlCkyLGpSVg1rGp%2BrMhHlAiC6HaUwo4ZUViqrXkR1biihit4A5P8VJcWHBXYcMDHm%2BVEtaISkshedHnqp6MBKe1ILH2yAviHdNTbXS94mvwv%2FXjJusom6TmqUVBr6dCPYTMTqM4WFYrEPaeGMiEBczEg9JsYNFvESiiy%2BaBSdP6UREzNPxAMb5yCrnRydl5oLRghNYHpYqm5Mgj6bGcLtSEgUSpzEqZvZQFUoCd%2F491qYH9vIUigQkxnUr0rZ1DjE2gzGWOAk0qO4y%2BJrS01dMjSQ4BtaLQQN1jAHBNY3Z6by%2BicjUAwNoFPEHxGQX4a1QACbwPpnIaq0UdSymS9t3E1qlrFMKJ%2FBEWWA%2FWb4dE4kRd6bmY5kiLfD64zt8%2BWeHB%2BcZTDDLXesW9PnCSGUaC%2FE0%2Fg8RZElPKlHYd4R7O5c%2FqbimL%2BpNfRGnjFI1Yl%2BT0jLaWSclz9Gb1iMoXN8hCL0wWchLqS69sXHGrHBDM6USOEEjrLDEcJdS7xNCJA%2Fn3BSiMbMyQ2EY0xIu4G4X%2BP7uAO45rs8N8kzl2cvL4xlqOUwSd5HLl85EA942MMMthyFVM0aP%2BLaJViU0jrK0n3ILadidX5Df0hDFXwCIWJ0r4T58QM6uleTuOxYSd5zM7DK9LQcKM%2BQeJzGwd2LDM6BRtSKpoM5txsh5UZ5vkuBS74pKpYGVnlVvQ5o%2BQbwNE%2B9qX3yYO35Jmz%2Bn5HIpUfJ2vyfcGnkNDFvIWM3%2Bl0SAJ48tws8taOvAL%2BPojsDoRsZILghY5rGbIwyhURLrWp55YC9KERyteUrrJvBxgK83RyXPcVHMCoV1zkeyAymKLA4qBuCE17rUFLPeFWiZKX9NFIPkWfjuZHm4voKGHuz5gt7xXpTvCZPhpARHTMjea8%2FwnPKhOSEpZhhrY3kuKgm88Euz4ZRsxiLqrUUXDCM2Sh%2FKjJmOI83BylGUktaOGk4F61UfJ35fCC5yHDGsBjkhYxBFaw8KhGxVNLhVakk7yq4dSzlWFZijCc1zkeTkYwYnyJoLlobOWOUa2uxks1KRCtDLiVjk7zikMsiyxS%2FO%2BRxwCZCqTBKXOZTycx5EuMsI%2Fy25wHe4lzgXyOx2rgm%2FVNMKc6TRgCgiHfgRiM%2FFYcSvBA7nUJ2UqhAvL6znIECFAsKRIF0WBJkLQgKX9nAKe6KytVSyscM%2FYoBzpAcZ0LQDwAHwYTaxCTnK7Eg7dJpjEys%2BmX%2BymSpJybTABwIUK3FISB%2BvfEPpaYfX6dhYCS%2FArvbXpMxAOujddHcKCy9oAuosBwO%2Fd66aodBZ6D7bZbgOVjxhKzQcG9DNEl3hATNHPFDklxcc4NylfRkG88t2VfSoUwj1nL97IcKprRrU0xLaftUQLvKqBE0YCLFJ3XjQTVlx5kKoTYQIvTnMDpYqQumFfIquUaT3%2BTlFnBAUcDaS6Ykgm4D6mHZ3T5LS7ASqCHVNII69RkiqGYX8m%2BKFuRyLBfKpASn%2BovFuh8NjOEFNgt3km%2FK1AYKDnTQbKHVKfxpUg74CJVZ%2FQzVmPSrAGHPRrKIU8EQJywFPBHiZyoRp9ZiqatfCUYZAy10RUjDNhY0ApFk%2FRCyRru7v1GbH2EdpTUYrJNxdP9Ib3%2BKy%2BLdDlcvu7brITIlW20bGBWyvH0bbUTBXw42%2BLKEajBc93Xyvzg460i8KDqQpbI8P3hvRfdjuH3yYpVuP7ea3AJpxwwZtyHxnXa%2FnKVrKjEQL0ouoeIxVpsuMrmtKoWLpgAemjUmg13xepWbjuhaStVsQCvFIriQZRKfAWu5xpjxjqLR%2B92hNWoQUpec70wOSdjJSPAalndek2pgvd9VjXFyCq44wwNIpqzRTtwaEINuYuVywyQb9DmkDnaB%2BQq%2FKBrBntgVwLySNWNI3LTiTgU3U4wpJTHRMn%2BLtfsYleDP1XfFrU2cbdHOGW1GMxq7WE17UZzrbpJsXeX1zvkSyQmmvmRPyMTrQqFtbSYuvTlGSycJKvDElm2kcqatiRtM%2BXAOliz6XR6Ql9bpw5unABUyOZmgUjozRPHLFnqBm%2FwT1OcWK8qbpMEwmn6fkxQEFdGYoZxDwFdZbaHVC%2FztMekCVCMn9lawhkKL7TRk45pkUC%2B5tZSrFzs5CgqwTej3T7yWhaE5gLHwn%2B0h%2B1rVeqVTATVL7Tx7iWvUzv%2FJv4Af1N%2B6fX3rQ6vzx0zd7AM9pZGZ08pB7ixFyHMPMxRekmvLine truncated
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">␍
|
||||
␍
|
||||
</head><body>␍
|
||||
<header id="tiHeader">␍
|
||||
<div class="top">␍
|
||||
<ul>␍
|
||||
<li id="top_logo">␍
|
||||
<a href="http://www.ti.com">␍
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARgAAAAkCAMAAABln9XcAAAAYFBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMAAAAAAAAAADMAADMAAAAAAAAAAAAAADMAADMAADMAADMAADMAADMAADMAADMAADMAADMAADMAAAAAADMAAC6smRcAAAAHnRSTlMAv0CAEO/fMGCfz0Agj4C/cK9Q32MQnzCPIK/PUO9FOfcdAAAFOElEQVRo3u2Z3XqbMAyGBf53IAHSJu3asfu/y9n6wVCcbd1O+jzjOyAUVFl+LUtOC4d+r8sP0gUOHWA+Deb7AagK5jV9nuHQDsx7+nyHQzswp/P5/AqHNmDeTie4n9LlRHqGtbTaqoV/kGtR8LWFYFBXuKbEeeafTrCWn7ca4R/kTfJgevjaKmC+ZSYvpyqYcf4gDX+lglnBF1cBc85Mns41MHpWmUSbJoQLPVkPfyv289V30grMKTO5f6uB6aZlQooetP8LmLdUbjOTVIBvBUzRBoyZFwWgTwMw0GeSXlWhKeanIfodGEe/D+ywAfBoq+wE01w0tnIXm0HLth4AyMM40rgkhS9hLurpmZOB5yHMRRNAF0x20497MHyuu1LTJjBPvwCj7SwyoIPUHEVvGVGHt30huMsYR3GTQ6shFNt+U89cuTeOyLQARGbkMRh8jszqdYQW0LERMgMuQxnKLT8CnlhEVwLzDoC1d0F1fQwGR4oZhVMpIB2RfA6m5+hkSaFLhhlBmE1lKzU4I+Kn8iyjSy9DmouNk9boxPXJN+ZN2yqcJ6YTkOKsOA9s6Z4NuY4a0NvEBtgv0sDTHBxmkdZTNDnYQUM3mDwH4BJb9JpgcZ7wk9vzYzAqj47yA6280dBjKGhmIkeqGBA446pgMlO0U9mWS5nxOAu26gPIuD0+aguYhsFIDjULmBKhZ4OoCUzyB+JDRy+GuunxW5FoV3vLg9+AKRq4EvDcwxzyk5YMR6LV6RqYiEnOYIpt10EBAw7KuHUwjaGA3GyaAmY9XkRgCKaTEKitpAC4EeCLpx2YV6y910+BcXilhTKcG6DN7DRuX0ntfmIqOzBKIRkEM6CtEtsCBhgMVRddA6OoqIVZfQDTNjSejhSRuCw+cJsFj4taI/Odz71/CsY0TRPnZmHBgSAMi1MwelWmm7YOBgImeQajTbGtgnE9FusaGFoInegIGImQwVCNVRUwvRRpVSdzoXPvn4JhNVC8RyDFnDoTl9UUKMtXwVC2xR4nXmx3YFjWQxUM8k14AxQwJAFDZPwOjExGJiAFeHfu/dRWGhhMZ2Z5BY56txFqbhjxrdF1MJjkhn7ZKbbdg7GNTc8VPADT5fFtsv+wlRSDkW1dAQPah1jWg9pz0TvW3pfPgQEnSYKuW27log5YXcC3VTCgmSrLjWK73Uo0s1AHU/qRgCkRChjwFTAFjikx3Da1Nx9t4H6+fAqMJKPROVMtpUpssrAeNA5I8TEY2f5RbG0dDE1+KpPCwQYG0/KSV7sS24cKGBWkGhQwVFCu5+v6PMc5c305wZ+A0bEFh+EOtJ5+Nsv0LARTTqSuCqb4DWaS2c5dFUxL57SOENCDFsHIeBUwOjoBA2EDhm+CLmBWKXMDeMbvAqwLYnmCovrJ17ZZg7W584zSs32Kry/1eJpSfJPG7RG3fryA4SRX4Itt86BdYxpSy/GJ3WSRBYJBHxswcYlwAaOXxPWrdm0HB92AW190vrxI6tyBlDv3HksBbjuAzs6LlEuDDfLWjAv3IRu70k9KwuiRzqEtXlG5XXfFthMHoxaQtpMi33c6lq9O5K7FlNFiioaiAUK+CJl2CWHiMiXy9a/Y385ZaSe93aEu36CSr5UmvHqAvhH5lXEY+pgxKA0isXR4FeYKYPS9zbaD3owGbrmDbqSc8di9bOjEneNqwabNStpLUIgWwawD7X3DvvZaH1/enuHQOmVEdzjEKsfg4x9uO10FzPF/pQdVBg5tdTvAPNAbgTl60k7yR/BDH3W6XX9c/mswPwGgceILR4q+4gAAAABJRU5ErkJggg==" />␍
|
||||
</a>␍
|
||||
</li>␍
|
||||
</ul>␍
|
||||
</div>␍
|
||||
<div class="nav">␍
|
||||
</div>␍
|
||||
</header><div id="content">␍
|
||||
<h2 id="ProductName">␍
|
||||
<!-- @Start Product -->␍
|
||||
F2838x EtherCAT Software Manifest␍
|
||||
<!-- @End Product -->␍
|
||||
</h2>␍
|
||||
␍
|
||||
<h4 id="ReleaseDate">␍
|
||||
<!-- @Start Date -->␍
|
||||
09-28-2018␍
|
||||
<!-- @End Date -->␍
|
||||
</h4>␍
|
||||
␍
|
||||
␍
|
||||
<h4 id="SRASID">␍
|
||||
<!-- @Start Date -->␍
|
||||
Manifest ID - SRAS00004858␍
|
||||
<!-- @End Date -->␍
|
||||
</h4>␍
|
||||
</div><div id="content">␍
|
||||
<h4>Legend</h4>␍
|
||||
<p>(explanation of the fields in the Manifest Table below)</p>␍
|
||||
<table>␍
|
||||
<tbody>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Software Name </b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
The name of the application or file␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Version</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
Version of the application or file␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>License Type</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
Type of license(s) under which TI will be providing␍
|
||||
software to the licensee (e.g. BSD-3-Clause, GPL-2.0, TI Text File License, TI␍
|
||||
Commercial License). The license could be under Commercial terms or Open Source. See Open Source Reference License Disclaimer in␍
|
||||
the Disclaimers Section. Whenever possible, TI will use an <a href="http://spdx.org/licenses/"> SPDX Short Identifier </a> for an Open Source␍
|
||||
License. TI Commercial license terms are not usually included in the manifest and are conveyed through a variety ␍
|
||||
of means such as a clickwrap license upon install, ␍
|
||||
a signed license agreement and so forth.␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Location</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
The directory name and path on the media or a specific file where the Software is located. Typically fully qualified path names ␍
|
||||
are not used and instead the relevant top level directory of the application is given. ␍
|
||||
A notation often used in the manifests is [as installed]/directory/*. Note that the asterisk implies that all␍
|
||||
files under that directory are licensed as the License Type field denotes. Any exceptions to this will ␍
|
||||
generally be denoted as [as installed]/directory/* except as noted below which means as shown in subsequent rows of ␍
|
||||
the manifest.␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Delivered As</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
This field will either be “Source”, “Binary” or “Source␍
|
||||
and Binary” and is the primary form the content of the Software is delivered␍
|
||||
in. If the Software is delivered in an archive format, this field␍
|
||||
applies to the contents of the archive. If the word Limited is used␍
|
||||
with Source, as in “Limited Source” or “Limited Source and Binary” then␍
|
||||
only portions of the Source for the application are provided.␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Modified by TI</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
This field will either be “Yes” or “No”. A “Yes” means␍
|
||||
TI has made changes to the Software. A “No” means TI has not made any␍
|
||||
changes. Note: This field is not applicable for Software “Obtained␍
|
||||
from” TI.␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
<tr>␍
|
||||
<td>␍
|
||||
<b>Obtained from</b>␍
|
||||
</td>␍
|
||||
<td>␍
|
||||
This field specifies from where or from whom TI obtained␍
|
||||
the Software. It may be a URL to an Open Source site, a 3<sup>rd</sup>␍
|
||||
party licensor, or TI. See Links Disclaimer in the Disclaimers␍
|
||||
Section.␍
|
||||
</td>␍
|
||||
</tr>␍
|
||||
</tbody>␍
|
||||
</table>␍
|
||||
</div><div id="content">␍
|
||||
<h3>Disclaimers</h3>␍
|
||||
<h4>Export Control Classification Number (ECCN)</h4>␍
|
||||
<p>Any use of ECCNs listed in the Manifest is at the user’s risk␍
|
||||
and without recourse to TI. Your␍
|
||||
company, as the exporter of record, is responsible for determining the␍
|
||||
correct classification of any item at␍
|
||||
the time of export. Any export classification by TI of Software is for␍
|
||||
TI’s internal use only and shall not be construed as a representation␍
|
||||
or warranty␍
|
||||
regarding the proper export classification for such Software or whether␍
|
||||
an export␍
|
||||
license or other documentation is required for exporting such Software</p>␍
|
||||
<h3>Links in the Manifest</h3>␍
|
||||
<p>Any␍
|
||||
links appearing on this Manifest␍
|
||||
(for example in the “Obtained from” field) were verified at the time␍
|
||||
the Manifest was created. TI makes no guarantee that any listed links␍
|
||||
will␍
|
||||
remain active in the future.</p>␍
|
||||
<h3>Open Source License References</h3>␍
|
||||
<p>Your company is responsible for confirming the␍
|
||||
applicable license terms for any open source Software␍
|
||||
listed in this Manifest that was not “Obtained from” TI. Any open␍
|
||||
source license␍
|
||||
specified in this Manifest for Software that was␍
|
||||
not “Obtained from” TI is for TI’s internal use only and shall not be␍
|
||||
construed as a representation or warranty regarding the proper open␍
|
||||
source license terms␍
|
||||
for such Software.</p>␍
|
||||
</div><div id="content">␍
|
||||
<h4>Export Information</h4>␍
|
||||
<p>ECCN for Software included in this release:</p>␍
|
||||
3D991␍
|
||||
</div><div id="content">␍
|
||||
<!-- h3>Manifest Table</h3 -->␍
|
||||
|
||||
<table>
|
||||
<tbody>
|
||||
|
||||
<h2>
|
||||
F2838x EtherCAT Software Manifest Table
|
||||
</h2>
|
||||
|
||||
|
||||
<p>
|
||||
|
||||
See the Legend above for a description of these columns.
|
||||
|
||||
</p>
|
||||
|
||||
<table id="targetpackages" name="targetpackages">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><b>Software Name</b></td>
|
||||
<td><b>Version</b></td>
|
||||
<td><b>License Type</b></td>
|
||||
<td><b>Delivered As</b></td>
|
||||
<td><b>Modified by TI</b></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td id="name" name="name" rowspan="2">
|
||||
EtherCAT HAL Drivers and Examples
|
||||
</td>
|
||||
<td id="version" name="version" rowspan="2">
|
||||
v2.02.00.00
|
||||
</td>
|
||||
<td id="license" name="license" rowspan="2">
|
||||
BSD
|
||||
</td>
|
||||
<td id="delivered" name="delivered" rowspan="2">
|
||||
Source
|
||||
</td>
|
||||
<td id="modified" name="modified" rowspan="2">
|
||||
Yes
|
||||
</td>
|
||||
<td><b>Location</b></td>
|
||||
<td id="location" name="location">
|
||||
[Installed at]/*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><b>Obtained from</b></td>
|
||||
<td id="obtained" name="obtained">
|
||||
Texas Instruments
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</p>
|
||||
</p>
|
||||
<p>
|
||||
␍
|
||||
</div><div id="content">␍
|
||||
<h4>Credits</h4>␍
|
||||
<BR> <BR><BR><BR><BR>␍
|
||||
</div><div id="content">␍
|
||||
<h4>Licenses</h4>␍
|
||||
<BR><h3><b> F2838x EtherCAT Software Licenses </b></h3><BR> <BR><BR><BR><BR><BR><BR>␍
|
||||
</div>␍
|
||||
<footer id="tiFooter">␍
|
||||
<p>TI is a global semiconductor design and manufacturing company. Innovate␍
|
||||
with 100,000+ analog ICs and embedded processors, along with software, tools␍
|
||||
and the industry's largest sales/support staff.</p>␍
|
||||
</footer>␍
|
||||
</body></html>
|
||||
@@ -0,0 +1,773 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ethercat_slave_cm_hal.h
|
||||
//
|
||||
// TITLE: CM EtherCAT HAL Driver.
|
||||
//
|
||||
// This contains the macros and prototypes for the CM HAL APIs required by
|
||||
// EtherCAT stack as well as HAL PDI test application.
|
||||
//
|
||||
//###########################################################################
|
||||
// $TI Release: F2838x EtherCAT Software v2.02.00.00 $
|
||||
// $Release Date: Tue Oct 29 00:56:49 IST 2024 $
|
||||
// $Copyright:
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
#ifndef ETHERCAT_SLAVE_CM_HAL_H
|
||||
#define ETHERCAT_SLAVE_CM_HAL_H
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// If building with a C++ compiler, make all of the definitions in this header
|
||||
// have a C binding.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! \addtogroup esc_cm_hal_api ESC CM HAL
|
||||
//! @{
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "cm.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef ETHERCAT_STACK
|
||||
#include "ecat_def.h"
|
||||
#endif // ETHERCAT_STACK
|
||||
|
||||
//
|
||||
// ESC Registers Base Address
|
||||
//
|
||||
#define ESC_BASE 0x400A0000UL
|
||||
|
||||
//
|
||||
// ESC Register Offsets
|
||||
//
|
||||
#define ESC_O_DL_STATUS 0x0110U
|
||||
#define ESC_O_PDI_CONTROL 0x0140U
|
||||
#define ESC_O_AL_EVENTMASK 0x0204U
|
||||
#define ESC_O_EEPROM_STATUS 0x0502U
|
||||
|
||||
//
|
||||
// ESC Register Masks
|
||||
//
|
||||
#define ESC_DL_STATUS_EEPROMLOAD_M 0x1U
|
||||
#define ESC_EEPROM_STATUS_EEPROMLOAD_M 0x1000U
|
||||
|
||||
//
|
||||
// Defines for Success and Failure returns during hardware initialization
|
||||
//
|
||||
#define ESC_HW_INIT_SUCCESS 0x0U
|
||||
#define ESC_HW_INIT_FAIL 0xFFFFU
|
||||
|
||||
//
|
||||
// Typedef for ESC Memory Address Access Size
|
||||
//
|
||||
typedef uint8_t ESCMEM_ADDR;
|
||||
|
||||
//
|
||||
// Defines to EEPROM Loaded Status
|
||||
//
|
||||
#define ESC_EEPROM_SUCCESS 0x0U
|
||||
#define ESC_EEPROM_NOT_LOADED 0xFFFFU
|
||||
#define ESC_EEPROM_LOAD_ERROR 0xFFFEU
|
||||
|
||||
//
|
||||
// Defines for EtherCAT LED GPIOs (controlCARD)
|
||||
//
|
||||
#define ESC_RUN_LED_GPIO 146U
|
||||
#define ESC_ERR_LED_GPIO 145U
|
||||
|
||||
#ifdef PDI_HAL_TEST
|
||||
//
|
||||
// ESC PDI Control ASYNC Value
|
||||
//
|
||||
#define ESC_PDI_CONTROL_ASYNC16 0x8U
|
||||
|
||||
//
|
||||
// ESC PDI RAM Start and End Address Offsets
|
||||
//
|
||||
#define ESC_PDI_RAM_START_ADDRESS_OFFSET 0x1000U
|
||||
#define ESC_PDI_RAM_END_ADDRESS_OFFSET 0x4FFFU
|
||||
|
||||
//
|
||||
// Defines for controlCARD LED GPIOs
|
||||
//
|
||||
#define CCARD_LED_1_GPIO 31U
|
||||
#define CCARD_LED_2_GPIO 34U
|
||||
|
||||
//
|
||||
// HAL Test Application Defines
|
||||
//
|
||||
#define ESC_HAL_TEST_DEBUG_REGS_LENGTH 20U
|
||||
#define ESC_HAL_TEST_BLOCK_LENGTH 40U
|
||||
|
||||
//
|
||||
// Read/Write Block Test Status
|
||||
//
|
||||
#define ESC_HAL_BLOCK_TEST_PASS 0x0U
|
||||
#define ESC_HAL_BLOCK_TEST_FAIL 0xFFFFU
|
||||
|
||||
//
|
||||
// HAL Test Application Structure
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
uint16_t address;
|
||||
uint16_t data;
|
||||
} ESC_DebugRegisters;
|
||||
|
||||
//
|
||||
// Extern CM HAL Delay Function
|
||||
//
|
||||
extern void HAL_performDelay(void);
|
||||
|
||||
#endif // PDI_HAL_TEST
|
||||
|
||||
//
|
||||
// Enable and Disable Global Interrupts
|
||||
//
|
||||
extern uint32_t _disable_IRQ();
|
||||
extern uint32_t _enable_IRQ();
|
||||
|
||||
//
|
||||
// Stack Functions
|
||||
//
|
||||
#ifdef ETHERCAT_STACK
|
||||
extern void Sync0_Isr(void);
|
||||
extern void PDI_Isr(void);
|
||||
extern void Sync1_Isr(void);
|
||||
#endif // ETHERCAT_STACK
|
||||
|
||||
//
|
||||
// HAL function prototypes
|
||||
//
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Gets the Current Timer Value
|
||||
//!
|
||||
//! This function returns the current timer counter value from the CPU timer.
|
||||
//!
|
||||
//! \return Returns the 1's compliment of the timer counter register value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_getTimer(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Clears the Timer Value
|
||||
//!
|
||||
//! This function resets the timer counter.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_clearTimer(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Get the Timer Increment Value
|
||||
//!
|
||||
//! This function returns a constant value of 125000UL for the timer increment
|
||||
//! value as the CPU timer is configured to run at 125MHz.
|
||||
//!
|
||||
//! \return Returns a constant value depending on the max frequency of the
|
||||
//! CPU timer
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_timerIncPerMilliSec(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads the ESC Data into Local Buffer
|
||||
//!
|
||||
//! \param pData is the pointer to the local destination buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function is used to access the ESC registers and the DPRAM area. The
|
||||
//! function reads the requested number of bytes from the ESC address and copies
|
||||
//! the data into the data buffer specified.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_readBlockISR(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads the ESC Data into Local Buffer with Interrupts Disabled
|
||||
//!
|
||||
//! \param pData is the pointer to the local destination buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function is used to access the ESC registers and the DPRAM area with
|
||||
//! interrupts disabled. The function disables interrupts, reads the requested
|
||||
//! number of bytes from the ESC address, copies the data into the data buffer
|
||||
//! specified, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_readBlock(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads two 16-bit words from ESC Memory
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function reads two 16-bit words from the specified ESC address.
|
||||
//!
|
||||
//! \return Returns two 16-bit words
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_readDWordISR(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads two 16-bit words from ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, then reads two 16-bit words from the
|
||||
//! specified ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return Returns two 16-bit words
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_readDWord(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one 16-bit word from ESC Memory
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function reads one 16-bit word from the specified ESC address.
|
||||
//!
|
||||
//! \return Returns 16-bit word value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_readWordISR(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one 16-bit word from ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, reads one 16-bit word from the specified
|
||||
//! ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return Returns 16-bit word value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_readWord(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one byte from ESC Memory
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//!
|
||||
//! This function reads one byte from the specified ESC address.
|
||||
//!
|
||||
//! \return Returns byte value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint8_t ESC_readByteISR(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one byte from ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//!
|
||||
//! This function disables interrupts, reads one byte from the specified ESC
|
||||
//! address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return Returns byte value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint8_t ESC_readByte(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes the Local Buffer Data into the ESC Memory
|
||||
//!
|
||||
//! \param pData is the pointer to the local source buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function writes the requested number of bytes from the data buffer and
|
||||
//! into the specified ESC addresses.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeBlockISR(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes the Local Buffer Data into the ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param pData is the pointer to the local source buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function disables interrupts, writes the requested number of bytes
|
||||
//! from the data buffer into the specified ESC addresses, and re-enables
|
||||
//! interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeBlock(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes two 16-bit words into ESC Memory
|
||||
//!
|
||||
//! \param dWordValue is the local 32-bit variable which contains the value
|
||||
//! that needs to be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function writes two 16-bit words from \e dWordValue to the ESC
|
||||
//! address.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeDWordISR(uint32_t dWordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes two 16-bit words into ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param dWordValue is the local 32-bit variable which contains the value
|
||||
//! that needs to be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, writes two 16-bit words from
|
||||
//! \e dWordValue to the ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeDWord(uint32_t dWordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes one 16-bit word into ESC Memory
|
||||
//!
|
||||
//! \param wordValue is the local 16-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function writes one 16-bit word from \e wordValue into the specified
|
||||
//! ESC address.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeWordISR(uint16_t wordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes one 16-bit word into ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param wordValue is the local 16-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, writes one 16-bit word from \e wordValue
|
||||
//! into the specified ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeWord(uint16_t wordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Write one byte into ESC Memory
|
||||
//!
|
||||
//! \param byteValue is the local 8-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//!
|
||||
//! This function writes one byte from \e byteValue into the specified ESC
|
||||
//! address.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeByteISR(uint8_t byteValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Write one byte into ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param byteValue is the local 8-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//!
|
||||
//! This function disables interrupts, writes one byte from \e byteValue into
|
||||
//! the specified ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeByte(uint8_t byteValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Updates the EtherCAT Run and Error LEDs
|
||||
//!
|
||||
//! \param runLed is the EtherCAT run LED state
|
||||
//! \param errLed is the EtherCAT error LED state
|
||||
//!
|
||||
//! This function updates the EtherCAT run and error LEDS (or EtherCAT status
|
||||
//! LED).
|
||||
//!
|
||||
//! \note This is configured to use the LED GPIOs for the controlCARD.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_setLed(uint8_t runLed, uint8_t errLed);
|
||||
|
||||
#ifdef PDI_HAL_TEST
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Setup and run tests on the PDI Interface
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to perform a test of the PDI
|
||||
//! interface. The function reads the PDI control registers, initializes an
|
||||
//! array of registers that needs to be read from ESC and also performs read
|
||||
//! write tests on all of the RAM in ESC using the HAL API.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_setupPDITestInterface(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reloads local RAM with ESC register Values
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to perform a load of pre-set ESC
|
||||
//! registers in a loop by using PDI interface.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugUpdateESCRegLogs(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Adds ESC Register Address to be read to RAM for Debug
|
||||
//!
|
||||
//! \param address is the ESC register or memory address that needs to be read
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to add a register to the pre-set
|
||||
//! array of registers that are ready by the ESC_debugUpdateESCRegLogs()
|
||||
//! function using the PDI interface.
|
||||
//!
|
||||
//! \note Only 16-bit reads are provided by the reference code.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugAddESCRegsAddress(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Initializes ESC Register Read Log Array
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to and initializes the registers
|
||||
//! read log array to default 0xFFFF. This is called once during init time or
|
||||
//! user can call it after every update to reset the previous read values in
|
||||
//! the array.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugInitESCRegLogs(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Signal Pass Status on ControlCARD LEDs
|
||||
//!
|
||||
//! This function provides a PASS signature on the LED GPIOs when the tests
|
||||
//! complete successfully.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_signalPass(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Signal Fail Status on ControlCARD LEDs
|
||||
//!
|
||||
//! This function provides a FAIL signature on the LED GPIOs when the tests
|
||||
//! complete successfully.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_signalFail(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Sets up the ControlCARD GPIOs for LEDs
|
||||
//!
|
||||
//! This function sets up the LED GPIOs that are used to signal the PASS/FAIL
|
||||
//! conditions.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_passFailSignalSetup(void);
|
||||
|
||||
#endif // PDI_HAL_TEST
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Checks if EEPROM was Loaded
|
||||
//!
|
||||
//! This function checks if the EEPROM load happened properly or not. The
|
||||
//! function reads the EEPROM LOADED register bit in the DL register as no
|
||||
//! proper EEPROM loaded IO signal is available. Recommended to be called by
|
||||
//! applications during start up and after an EEPROM reload happens.
|
||||
//!
|
||||
//! \note ESC RAM access via PDI is blocked until EEPROM happens correctly.
|
||||
//!
|
||||
//! \return Returns \b ESC_EEPROM_SUCCESS if EEPROM loaded successfully,
|
||||
//! \b ESC_EEPROM_NOT_LOADED if EEPROM not loaded as per the ESC DL register
|
||||
//! status, and \b ESC_EEPROM_LOAD_ERROR if EEPROM ESC control status register
|
||||
//! indicates that EEPROM is not loaded and device information not available.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_loadedCheckEEPROM(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reset the ESC
|
||||
//!
|
||||
//! This function resets the ESC peripheral.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_resetESC(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Hold ESC in Reset
|
||||
//!
|
||||
//! This function holds the ESC peripheral in reset.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_holdESCInReset(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Release ESC from Reset
|
||||
//!
|
||||
//! This function de-activates the ESC peripheral reset signal and brings ESC
|
||||
//! out of reset.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_releaseESCReset(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Initializes the Device for EtherCAT
|
||||
//!
|
||||
//! This function initializes the host controller, interrupts, SYNC signals,
|
||||
//! PDI, and other necessary peripherals.
|
||||
//!
|
||||
//! \return Returns \b ESC_HW_INIT_SUCCESS if initialization was successful and
|
||||
//! \b ESC_HW_INIT_FAIL if an error occurred during initialization
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_initHW(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Releases the Device Resources
|
||||
//!
|
||||
//! This function releases the allocated device resources.
|
||||
//!
|
||||
//! \note Implementation of this function is left to the end user and
|
||||
//! currently performs no action.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_releaseHW(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Layer Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT application/PDI
|
||||
//! interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationLayerHandler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Sync 0 Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT SYNC0 interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationSync0Handler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Sync 1 Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT SYNC1 interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationSync1Handler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Close the Doxygen group.
|
||||
//! @}
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Mark the end of the C bindings section for C++ compilers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ETHERCAT_SLAVE_CM_HAL_H
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
@@ -0,0 +1,712 @@
|
||||
//###########################################################################
|
||||
//
|
||||
// FILE: ethercat_slave_cpu1_hal.h
|
||||
//
|
||||
// TITLE: C28.CPU1 EtherCAT HAL Driver.
|
||||
//
|
||||
//###########################################################################
|
||||
// $TI Release: F2838x EtherCAT Software v2.02.00.00 $
|
||||
// $Release Date: Tue Oct 29 00:56:49 IST 2024 $
|
||||
// $Copyright:
|
||||
// Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions
|
||||
// are met:
|
||||
//
|
||||
// Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
//
|
||||
// Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
//
|
||||
// Neither the name of Texas Instruments Incorporated nor the names of
|
||||
// its contributors may be used to endorse or promote products derived
|
||||
// from this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// $
|
||||
//###########################################################################
|
||||
|
||||
#ifndef ETHERCAT_SLAVE_CPU1_HAL_H
|
||||
#define ETHERCAT_SLAVE_CPU1_HAL_H
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// If building with a C++ compiler, make all of the definitions in this header
|
||||
// have a C binding.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! \addtogroup esc_cpu1_hal_api ESC CPU1 HAL
|
||||
//! @{
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
//
|
||||
// Included Files
|
||||
//
|
||||
#include "device.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef ETHERCAT_STACK
|
||||
#include "ecat_def.h"
|
||||
#endif // ETHERCAT_STACK
|
||||
|
||||
//
|
||||
// ESC Registers Base Address
|
||||
//
|
||||
#define ESC_BASE 0x50000UL
|
||||
|
||||
//
|
||||
// ESC Register Offsets
|
||||
//
|
||||
#define ESC_O_DL_STATUS 0x0110U
|
||||
#define ESC_O_PDI_CONTROL 0x0140U
|
||||
#define ESC_O_AL_EVENTMASK 0x0204U
|
||||
#define ESC_O_EEPROM_STATUS 0x0502U
|
||||
|
||||
//
|
||||
// ESC Register Masks
|
||||
//
|
||||
#define ESC_DL_STATUS_EEPROMLOAD_M 0x1U
|
||||
#define ESC_EEPROM_STATUS_EEPROMLOAD_M 0x1000U
|
||||
|
||||
//
|
||||
// Defines for Success and Failure returns during hardware initialization
|
||||
//
|
||||
#define ESC_HW_INIT_SUCCESS 0x0U
|
||||
#define ESC_HW_INIT_FAIL 0xFFFFU
|
||||
|
||||
//
|
||||
// Masking Defines
|
||||
//
|
||||
#define ESC_M_MSB 0xFF00U
|
||||
#define ESC_M_LSB 0xFFU
|
||||
|
||||
//
|
||||
// ESC Clock Config
|
||||
//
|
||||
#define ESC_USE_INT_PHY_CLK 0x1U
|
||||
|
||||
//
|
||||
// Typedef for ESC Memory Address Access Size
|
||||
//
|
||||
typedef uint16_t ESCMEM_ADDR;
|
||||
|
||||
//
|
||||
// Defines to EEPROM Loaded Status
|
||||
//
|
||||
#define ESC_EEPROM_SUCCESS 0x0U
|
||||
#define ESC_EEPROM_NOT_LOADED 0xFFFFU
|
||||
#define ESC_EEPROM_LOAD_ERROR 0xFFFEU
|
||||
|
||||
//
|
||||
// Defines for EtherCAT LED GPIOs (controlCARD)
|
||||
//
|
||||
#define ESC_RUN_LED_GPIO 146U
|
||||
#define ESC_ERR_LED_GPIO 145U
|
||||
|
||||
#ifdef PDI_HAL_TEST
|
||||
//
|
||||
// ESC PDI Control ASYNC Value
|
||||
//
|
||||
#define ESC_PDI_CONTROL_ASYNC16 0x8U
|
||||
|
||||
//
|
||||
// ESC PDI RAM Start and End Address Offsets
|
||||
//
|
||||
#define ESC_PDI_RAM_START_ADDRESS_OFFSET 0x1000U
|
||||
#define ESC_PDI_RAM_END_ADDRESS_OFFSET 0x4FFFU
|
||||
|
||||
//
|
||||
// Defines for controlCARD LED GPIOs
|
||||
//
|
||||
#define CCARD_LED_1_GPIO 31U
|
||||
#define CCARD_LED_2_GPIO 34U
|
||||
|
||||
//
|
||||
// HAL Test Application Defines
|
||||
//
|
||||
#define ESC_HAL_TEST_DEBUG_REGS_LENGTH 20U
|
||||
#define ESC_HAL_TEST_BLOCK_LENGTH 40U
|
||||
|
||||
//
|
||||
// Read/Write Block Test Status
|
||||
//
|
||||
#define ESC_HAL_BLOCK_TEST_PASS 0x0U
|
||||
#define ESC_HAL_BLOCK_TEST_FAIL 0xFFFFU
|
||||
|
||||
//
|
||||
// HAL Test Application Structure
|
||||
//
|
||||
typedef struct
|
||||
{
|
||||
uint16_t address;
|
||||
uint16_t data;
|
||||
} ESC_DebugRegisters;
|
||||
|
||||
#endif // PDI_HAL_TEST
|
||||
|
||||
//
|
||||
// Stack Functions
|
||||
//
|
||||
#ifdef ETHERCAT_STACK
|
||||
extern void Sync0_Isr(void);
|
||||
extern void PDI_Isr(void);
|
||||
extern void Sync1_Isr(void);
|
||||
#endif // ETHERCAT_STACK
|
||||
|
||||
//
|
||||
// HAL function prototypes
|
||||
//
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Gets the Current Timer Value
|
||||
//!
|
||||
//! This function returns the current timer counter value from the CPU timer.
|
||||
//!
|
||||
//! \return Returns the 1's compliment of the timer counter register value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_getTimer(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Clears the Timer Value
|
||||
//!
|
||||
//! This function resets the timer counter.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_clearTimer(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Get the Timer Increment Value
|
||||
//!
|
||||
//! This function returns a constant value of 200000UL for the timer increment
|
||||
//! value as the CPU timer is configured to run at 200MHz.
|
||||
//!
|
||||
//! \return Returns a constant value depending on the max frequency of the
|
||||
//! CPU timer
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_timerIncPerMilliSec(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads the ESC Data into Local Buffer
|
||||
//!
|
||||
//! \param pData is the pointer to the local destination buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function is used to access the ESC registers and the DPRAM area. The
|
||||
//! function reads the requested number of bytes from the ESC address and copies
|
||||
//! the data into the data buffer specified.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_readBlockISR(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads the ESC Data into Local Buffer with Interrupts Disabled
|
||||
//!
|
||||
//! \param pData is the pointer to the local destination buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function is used to access the ESC registers and the DPRAM area with
|
||||
//! interrupts disabled. The function disables interrupts, reads the requested
|
||||
//! number of bytes from the ESC address, copies the data into the data buffer
|
||||
//! specified, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_readBlock(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads two 16-bit words from ESC Memory
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function reads two 16-bit words from the specified ESC address.
|
||||
//!
|
||||
//! \return Returns two 16-bit words
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_readDWordISR(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads two 16-bit words from ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, then reads two 16-bit words from the
|
||||
//! specified ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return Returns two 16-bit words
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint32_t ESC_readDWord(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one 16-bit word from ESC Memory
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function reads one 16-bit word from the specified ESC address..
|
||||
//!
|
||||
//! \return Returns 16-bit word value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_readWordISR(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reads one 16-bit word from ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, reads one 16-bit word from the specified
|
||||
//! ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return Returns 16-bit word value
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_readWord(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes the Local Buffer Data into the ESC Memory
|
||||
//!
|
||||
//! \param pData is the pointer to the local source buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function writes the requested number of bytes from the data buffer and
|
||||
//! into the specified ESC addresses.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeBlockISR(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes the Local Buffer Data into the ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param pData is the pointer to the local source buffer.
|
||||
//! (Type of pointer depends on the host controller architecture,
|
||||
//! detailed in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param address is the EtherCAT slave controller offset address which
|
||||
//! specifies the offset within the ESC memory area in bytes.
|
||||
//! (Only valid addresses are used depending on ESC 8 bit, 16 bit, or
|
||||
//! 32 bit access specified in ecat_def.h or the Slave Stack Code Tool)
|
||||
//! \param len is the access size in bytes
|
||||
//!
|
||||
//! This function disables interrupts, writes the requested number of bytes
|
||||
//! from the data buffer into the specified ESC addresses, and re-enables
|
||||
//! interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeBlock(ESCMEM_ADDR *pData, uint16_t address,
|
||||
uint16_t len);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes two 16-bit words into ESC Memory
|
||||
//!
|
||||
//! \param dWordValue is the local 32-bit variable which contains the value
|
||||
//! that needs to be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function writes two 16-bit words from \e DWordValue to the ESC
|
||||
//! address.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeDWordISR(uint32_t dWordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes two 16-bit words into ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param dWordValue is the local 32-bit variable which contains the value
|
||||
//! that needs to be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 32-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, writes two 16-bit words from
|
||||
//! \e DWordValue to the ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeDWord(uint32_t dWordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes one 16-bit word into ESC Memory
|
||||
//!
|
||||
//! \param wordValue is the local 16-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function writes one 16-bit word from \e WordValue into the specified
|
||||
//! ESC address.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeWordISR(uint16_t wordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Writes one 16-bit word into ESC Memory with interrupts disabled
|
||||
//!
|
||||
//! \param wordValue is the local 16-bit variable which contains the value to
|
||||
//! be written.
|
||||
//! \param address is the EtherCAT slave controller offset address in bytes.
|
||||
//! This must be a valid 16-bit aligned address boundary.
|
||||
//!
|
||||
//! This function disables interrupts, writes one 16-bit word from \e WordValue
|
||||
//! into the specified ESC address, and re-enables interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_writeWord(uint16_t wordValue, uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Updates the EtherCAT Run and Error LEDs
|
||||
//!
|
||||
//! \param runLed is the EtherCAT run LED state
|
||||
//! \param errLed is the EtherCAT error LED state
|
||||
//!
|
||||
//! This function updates the EtherCAT run and error LEDS (or EtherCAT status
|
||||
//! LED).
|
||||
//!
|
||||
//! \note This is configured to use the LED GPIOs for the controlCARD.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_setLed(uint16_t runLed, uint16_t errLed);
|
||||
|
||||
#ifdef PDI_HAL_TEST
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Setup and run tests on the PDI Interface
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to perform a test of the PDI
|
||||
//! interface. The function reads the PDI control registers, initializes an
|
||||
//! array of registers that needs to be read from ESC and also performs read
|
||||
//! write tests on all of the RAM in ESC using the HAL API.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_setupPDITestInterface(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reloads local RAM with ESC register Values
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to perform a load of pre-set ESC
|
||||
//! registers in a loop by using PDI interface.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugUpdateESCRegLogs(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Adds ESC Register Address to be read to RAM for Debug
|
||||
//!
|
||||
//! \param address is the ESC register or memory byte address that needs to be
|
||||
//! read
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to add a register to the pre-set
|
||||
//! array of registers that are ready by the ESC_debugUpdateESCRegLogs()
|
||||
//! function using the PDI interface.
|
||||
//!
|
||||
//! \note Only 16-bit reads are provided by the reference code.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugAddESCRegsAddress(uint16_t address);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Initializes ESC Register Read Log Array
|
||||
//!
|
||||
//! This function is optional for the non-HAL API Test application use cases
|
||||
//! and is available for applications or users to and initializes the registers
|
||||
//! read log array to default 0xFFFF. This is called once during init time or
|
||||
//! user can call it after every update to reset the previous read values in
|
||||
//! the array.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_debugInitESCRegLogs(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Signal Pass Status on ControlCARD LEDs
|
||||
//!
|
||||
//! This function provides a PASS signature on the LED GPIOs when the tests
|
||||
//! complete successfully.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_signalPass(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Signal Fail Status on ControlCARD LEDs
|
||||
//!
|
||||
//! This function provides a FAIL signature on the LED GPIOs when the tests
|
||||
//! complete successfully.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_signalFail(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Sets up the ControlCARD GPIOs for LEDs
|
||||
//!
|
||||
//! This function sets up the LED GPIOs that are used to signal the PASS/FAIL
|
||||
//! conditions.
|
||||
//!
|
||||
//! \note This function is tied to the controlCARD as in the GPIOs used as
|
||||
//! per the controlCARD hardware design.
|
||||
//!
|
||||
//! \note This function is only relevant for the HAL API Test application.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_passFailSignalSetup(void);
|
||||
|
||||
#endif // PDI_HAL_TEST
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Checks if EEPROM was Loaded
|
||||
//!
|
||||
//! This function checks if the EEPROM load happened properly or not. The
|
||||
//! function reads the EEPROM LOADED register bit in the DL register as no
|
||||
//! proper EEPROM loaded IO signal is available. Recommended to be called by
|
||||
//! applications during start up and after an EEPROM reload happens.
|
||||
//!
|
||||
//! \note ESC RAM access via PDI is blocked until EEPROM happens correctly.
|
||||
//!
|
||||
//! \return Returns \b ESC_EEPROM_SUCCESS if EEPROM loaded successfully,
|
||||
//! \b ESC_EEPROM_NOT_LOADED if EEPROM not loaded as per the ESC DL register
|
||||
//! status, and \b ESC_EEPROM_LOAD_ERROR if EEPROM ESC control status register
|
||||
//! indicates that EEPROM is not loaded and device information not available.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_loadedCheckEEPROM(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Reset the ESC
|
||||
//!
|
||||
//! This function resets the ESC peripheral.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_resetESC(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Hold ESC in Reset
|
||||
//!
|
||||
//! This function holds the ESC peripheral in reset.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_holdESCInReset(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Release ESC from Reset
|
||||
//!
|
||||
//! This function de-activates the ESC peripheral reset signal and brings ESC
|
||||
//! out of reset.
|
||||
//!
|
||||
//! \return None.
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_releaseESCReset(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Initializes the Device for EtherCAT
|
||||
//!
|
||||
//! This function initializes the host controller, interrupts, SYNC signals,
|
||||
//! PDI, and other necessary peripherals.
|
||||
//!
|
||||
//! \return Returns \b ESC_HW_INIT_SUCCESS if initialization was successful and
|
||||
//! \b ESC_HW_INIT_FAIL if an error occurred during initialization
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern uint16_t ESC_initHW(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Releases the Device Resources
|
||||
//!
|
||||
//! This function releases the allocated device resources.
|
||||
//!
|
||||
//! \note Implementation of this function is left to the end user and
|
||||
//! currently performs no action.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
extern void ESC_releaseHW(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Layer Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT application/PDI
|
||||
//! interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationLayerHandler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Sync 0 Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT SYNC0 interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationSync0Handler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
//! Application Sync 1 Handler
|
||||
//!
|
||||
//! This function is the interrupt handler for EtherCAT SYNC1 interrupts.
|
||||
//!
|
||||
//! \return None
|
||||
//
|
||||
//*****************************************************************************
|
||||
__interrupt void ESC_applicationSync1Handler(void);
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Close the Doxygen group.
|
||||
//! @}
|
||||
//
|
||||
//*****************************************************************************
|
||||
|
||||
//*****************************************************************************
|
||||
//
|
||||
// Mark the end of the C bindings section for C++ compilers.
|
||||
//
|
||||
//*****************************************************************************
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ETHERCAT_SLAVE_CPU1_HAL_H
|
||||
|
||||
//
|
||||
// End of File
|
||||
//
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user