Update repo

This commit is contained in:
hangpersonal committed 2026-08-30 23:04:35 -07:00
1 parent 749dab5721
commit ce65a0f59a
14950 files changed
+4408250 -1

No files matched your search

@@ -0,0 +1,191 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
CLA1_DMA_MSGRAM : origin = 0x001680, length = 0x000080
DMA_CLA1_MSGRAM : origin = 0x001700, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.data : > RAMLS4
.sysmem : > RAMLS4
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMLS4
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
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
dclfuncs : > FLASH1, ALIGN(8)
/* CLA specific sections */
#if defined(__TI_EABI__)
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(Cla1funcsLoadStart),
LOAD_END(Cla1funcsLoadEnd),
RUN_START(Cla1funcsRunStart),
LOAD_SIZE(Cla1funcsLoadSize),
ALIGN(8)
#else
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
ALIGN(8)
#endif
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1ToDmaMsgRAM : > CLA1_DMA_MSGRAM, type=NOINIT
DmaToCla1MsgRAM : > DMA_CLA1_MSGRAM, type=NOINIT
Cla1DataRam : >> RAMLS0 | RAMLS1
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
cla_shared : > RAMLS1
#if defined(__TI_EABI__)
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize)
#else
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize)
#endif
#if defined(__TI_EABI__)
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,191 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
CLA1_DMA_MSGRAM : origin = 0x001680, length = 0x000080
DMA_CLA1_MSGRAM : origin = 0x001700, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.data : > RAMLS4
.sysmem : > RAMLS4
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMLS4
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
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
dclfuncs : > FLASH1, ALIGN(8)
/* CLA specific sections */
#if defined(__TI_EABI__)
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(Cla1funcsLoadStart),
LOAD_END(Cla1funcsLoadEnd),
RUN_START(Cla1funcsRunStart),
LOAD_SIZE(Cla1funcsLoadSize),
ALIGN(8)
#else
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
ALIGN(8)
#endif
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1ToDmaMsgRAM : > CLA1_DMA_MSGRAM, type=NOINIT
DmaToCla1MsgRAM : > DMA_CLA1_MSGRAM, type=NOINIT
Cla1DataRam : >> RAMLS0 | RAMLS1
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
cla_shared : > RAMLS1
#if defined(__TI_EABI__)
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize)
#else
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize)
#endif
#if defined(__TI_EABI__)
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,140 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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(8)
#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(8)
#endif
/* Allocate IQ math areas: */
IQmath : > FLASH1, PAGE = 0, ALIGN(8) /* Math Code */
IQmathTables : > FLASH2, PAGE = 0, ALIGN(8)
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,188 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.data : > RAMLS4
.sysmem : > RAMLS4
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMLS4
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
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 */
Filter1_RegsFile : > RAMLS6
Filter2_RegsFile : > RAMLS6
Filter3_RegsFile : > RAMLS7
Filter4_RegsFile : > RAMLS7
/* CLA specific sections */
#if defined(__TI_EABI__)
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(Cla1funcsLoadStart),
LOAD_END(Cla1funcsLoadEnd),
RUN_START(Cla1funcsRunStart),
LOAD_SIZE(Cla1funcsLoadSize),
ALIGN(8)
#else
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
ALIGN(8)
#endif
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1DataRam : >> RAMLS0 | RAMLS1
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
#if defined(__TI_EABI__)
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize)
#else
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize)
#endif
#if defined(__TI_EABI__)
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,188 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.data : > RAMLS4
.sysmem : > RAMLS4
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMLS4
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
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 */
Filter1_RegsFile : > RAMLS6
Filter2_RegsFile : > RAMLS6
Filter3_RegsFile : > RAMLS7
Filter4_RegsFile : > RAMLS7
/* CLA specific sections */
#if defined(__TI_EABI__)
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(Cla1funcsLoadStart),
LOAD_END(Cla1funcsLoadEnd),
RUN_START(Cla1funcsRunStart),
LOAD_SIZE(Cla1funcsLoadSize),
ALIGN(8)
#else
Cla1Prog : LOAD = FLASH4,
RUN = RAMLS5,
LOAD_START(_Cla1funcsLoadStart),
LOAD_END(_Cla1funcsLoadEnd),
RUN_START(_Cla1funcsRunStart),
LOAD_SIZE(_Cla1funcsLoadSize),
ALIGN(8)
#endif
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1DataRam : >> RAMLS0 | RAMLS1
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
#if defined(__TI_EABI__)
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(Cla1ConstRunStart),
LOAD_START(Cla1ConstLoadStart),
LOAD_SIZE(Cla1ConstLoadSize)
#else
.const_cla : LOAD = FLASH2,
RUN = RAMLS1,
RUN_START(_Cla1ConstRunStart),
LOAD_START(_Cla1ConstLoadStart),
LOAD_SIZE(_Cla1ConstLoadSize)
#endif
#if defined(__TI_EABI__)
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#else
.TI.ramfunc : {} LOAD = FLASH3,
RUN = RAMD0,
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
LOAD_END(_RamfuncsLoadEnd),
RUN_START(_RamfuncsRunStart),
RUN_SIZE(_RamfuncsRunSize),
RUN_END(_RamfuncsRunEnd),
ALIGN(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,143 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
ramgs0 : > RAMGS0, type=NOINIT
ramgs1 : > RAMGS1, type=NOINIT
/* Sine Table */
SINTBL : > FLASH6
/* Data Log */
DLOG : > RAMGS3
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(8)
#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(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,87 @@
MEMORY
{
/* Flash sectors */
CMBANK0_RESETISR : origin = 0x00200000, length = 0x00000008 /* Boot to Flash Entry Point */
CMBANK0_SECTOR0 : origin = 0x00200008, length = 0x00003FF7
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
*/
SxRAM : origin = 0x20000808, length = 0x0000F7F8
E0RAM : origin = 0x20010000, length = 0x00003FFF
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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, ALIGN(16)
.vftable : > CMBANK0_SECTOR0, ALIGN(16) /* Application placed vector table in Flash*/
.vtable : > SxRAM /* Application placed vector table in RAM*/
.text : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.cinit : > CMBANK0_SECTOR0, ALIGN(16)
.pinit : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.switch : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.sysmem : > SxRAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.esysmem : > C1RAM
.data : > SxRAM
.bss : > SxRAM
.const : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
.TI.ramfunc : {} LOAD = CMBANK0_SECTOR0,
RUN = C0RAM,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(16)
/* The following section definition are for DCSM dual core examples */
ZONE1_RAM : > C0RAM
UNSECURE_RAM : > C1RAM
CSMKEY_RAM : > SxRAM
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,79 @@
MEMORY
{
/* Flash sectors */
CMBANK0_RESETISR : origin = 0x00200000, length = 0x00000008 /* Boot to Flash Entry Point */
CMBANK0_SECTOR0 : origin = 0x00200008, length = 0x00003FF8
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 = 0x00002000
C0RAM : origin = 0x1FFFE000, length = 0x00002000
BOOT_RSVD : origin = 0x20000000, length = 0x00000800 /* Part of S0, BOOT rom will use this for stack */
S0RAM : origin = 0x20000800, length = 0x00003800
S1RAM : origin = 0x20004000, length = 0x00004000
S2RAM : origin = 0x20008000, length = 0x00004000
S3RAM : origin = 0x2000C000, length = 0x00004000
E0RAM : origin = 0x20010000, length = 0x00004000
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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, ALIGN(16)
.vftable : > CMBANK0_SECTOR0, ALIGN(16) /* Application placed vector table in Flash*/
.vtable : > S0RAM /* Application placed vector table in RAM*/
.text : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.cinit : > CMBANK0_SECTOR0, ALIGN(16)
.pinit : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.switch : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
.TI.ramfunc : {} LOAD = CMBANK0_SECTOR0,
RUN = C0RAM,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(16)
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,137 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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(8)
#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(8)
#endif
}
/*
//===========================================================================
// 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 = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD0 : origin = 0x00C000, length = 0x000800
RAMD1 : origin = 0x00C800, length = 0x000800
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1_4 : origin = 0x008800, length = 0x002000
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMLS1_4
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS5
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS1_4
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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 = RAMLS6 | RAMLS7,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(8)
#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(8)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,157 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
EMIF1_CS0n : origin = 0x80000000, length = 0x10000000
EMIF1_CS2n : origin = 0x00100000, length = 0x00100000
EMIF1_CS0_CS2n : origin = 0x00200000, length = 0x00100000
EMIF1_CS3n : origin = 0x00300000, length = 0x00080000
EMIF1_CS4n : origin = 0x00380000, length = 0x00060000
EMIF2_CS0n : origin = 0x90000000, length = 0x10000000
EMIF2_CS2n : origin = 0x00002000, length = 0x00001000
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
ramgs0 : > RAMGS0, type=NOINIT
ramgs1 : > RAMGS1, type=NOINIT
#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(8)
#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(8)
#endif
#if defined(__TI_EABI__)
xintffuncs : LOAD = FLASH3,
RUN = EMIF1_CS2n,
LOAD_START(XintffuncsLoadStart),
LOAD_END(XintffuncsLoadEnd),
RUN_START(XintffuncsRunStart)
#else
xintffuncs : LOAD = FLASH3,
RUN = EMIF1_CS2n,
LOAD_START(_XintffuncsLoadStart),
LOAD_END(_XintffuncsLoadEnd),
RUN_START(_XintffuncsRunStart)
#endif
emif_cs0_nonfar : > EMIF1_CS0_CS2n
.farbss : > EMIF1_CS0n
.farconst : > EMIF1_CS0n
.em1_cs0 : > EMIF1_CS0n
.em1_cs2 : > EMIF1_CS2n | EMIF1_CS0_CS2n
.em1_cs3 : > EMIF1_CS3n
.em1_cs4 : > EMIF1_CS4n
.em2_cs0 : > EMIF2_CS0n
.em2_cs2 : > EMIF2_CS2n
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,139 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001A7 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001A9, length = 0x000257
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
CPUTOCMRAM : origin = 0x039000, length = 0x000800
CMTOCPURAM : origin = 0x038000, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.bss:cio : > RAMLS3
.data : > RAMLS2
.sysmem : > RAMM1
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMM1
.cio : > RAMLS3
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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(8)
#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(8)
#endif
/* The following section definition are for DCSM dual core examples */
ZONE1_RAM : > RAMLS4
UNSECURE_RAM : > RAMLS6
CSMKEY_RAM : > RAMD0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,155 @@
MEMORY
{
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 20012000
GROUP { /* GROUP memory ranges for crc/checksum of entire flash */
#endif
#endif
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
/* 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 = 0x001FF0 /* on-chip Flash */
DO_NOT_USE_FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 20012000
} crc(_ccs_flash_checksum, algorithm=C28_CHECKSUM_16)
#endif
#endif
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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(8)
#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(8)
#endif
/* crc/checksum section configured as COPY section to avoid including in executable */
.TI.memcrc : type = COPY
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,83 @@
MEMORY
{
/* Flash sectors */
CMBANK0_RESETISR : origin = 0x00200000, length = 0x00000008 /* Boot to Flash Entry Point */
CMBANK0_SECTOR0 : origin = 0x00200008, length = 0x00003FF7
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 = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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, ALIGN(16)
.vftable : > CMBANK0_SECTOR0, ALIGN(16) /* Application placed vector table in Flash*/
.vtable : > S0RAM /* Application placed vector table in RAM*/
.text : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1 | CMBANK0_SECTOR2, ALIGN(16)
.cinit : > CMBANK0_SECTOR2, ALIGN(16)
.pinit : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.switch : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1 | CMBANK0_SECTOR2, ALIGN(16)
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
.TI.ramfunc : {} LOAD = CMBANK0_SECTOR0,
RUN = C0RAM,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(16)
/* The following section definition are for DCSM dual core examples */
ZONE1_RAM : > C0RAM
UNSECURE_RAM : > C1RAM
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,171 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : >> RAMLS5 | RAMLS6
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
SHARERAMGS0 : > RAMGS0, type=NOINIT
SHARERAMGS1 : > RAMGS1, type=NOINIT
SHARERAMGS2 : > RAMGS2, type=NOINIT
SHARERAMGS3 : > RAMGS3, type=NOINIT
SHARERAMGS4 : > RAMGS4, type=NOINIT
SHARERAMGS5 : > RAMGS5, type=NOINIT
SHARERAMGS6 : > RAMGS6, type=NOINIT
SHARERAMGS7 : > RAMGS7, type=NOINIT
SHARERAMGS8 : > RAMGS8, type=NOINIT
SHARERAMGS9 : > RAMGS9, type=NOINIT
SHARERAMGS10 : > RAMGS10, type=NOINIT
SHARERAMGS11 : > RAMGS11, type=NOINIT
SHARERAMGS12 : > RAMGS12, type=NOINIT
SHARERAMGS13 : > RAMGS13, type=NOINIT
SHARERAMGS14 : > RAMGS14, type=NOINIT
SHARERAMGS15 : > RAMGS15, type=NOINIT
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(8)
#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(8)
#endif
/* Following section is for MEMCFG examples*/
#if defined(__TI_EABI__)
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(isrfuncLoadStart),
LOAD_END(isrfuncLoadEnd),
RUN_START(isrfuncRunStart),
LOAD_SIZE(isrfuncLoadSize)
#else
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(_isrfuncLoadStart),
LOAD_END(_isrfuncLoadEnd),
RUN_START(_isrfuncRunStart),
LOAD_SIZE(_isrfuncLoadSize)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,171 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001A7 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001A9, length = 0x000257
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
CPUTOCMRAM : origin = 0x039000, length = 0x000800
CMTOCPURAM : origin = 0x038000, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
}
SECTIONS
{
codestart : > BEGIN, ALIGN(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS3
.bss:output : > RAMLS3
.bss:cio : > RAMLS3
.data : > RAMLS2
.sysmem : > RAMM1
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS3
.esysmem : > RAMM1
.cio : > RAMLS3
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#endif
SHARERAMGS0 : > RAMGS0, type=NOINIT
SHARERAMGS1 : > RAMGS1, type=NOINIT
SHARERAMGS2 : > RAMGS2, type=NOINIT
SHARERAMGS3 : > RAMGS3, type=NOINIT
SHARERAMGS4 : > RAMGS4, type=NOINIT
SHARERAMGS5 : > RAMGS5, type=NOINIT
SHARERAMGS6 : > RAMGS6, type=NOINIT
SHARERAMGS7 : > RAMGS7, type=NOINIT
SHARERAMGS8 : > RAMGS8, type=NOINIT
SHARERAMGS9 : > RAMGS9, type=NOINIT
SHARERAMGS10 : > RAMGS10, type=NOINIT
SHARERAMGS11 : > RAMGS11, type=NOINIT
SHARERAMGS12 : > RAMGS12, type=NOINIT
SHARERAMGS13 : > RAMGS13, type=NOINIT
SHARERAMGS14 : > RAMGS14, type=NOINIT
SHARERAMGS15 : > RAMGS15, type=NOINIT
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, type=NOINIT
Filter2_RegsFile : > RAMGS2, type=NOINIT
Filter3_RegsFile : > RAMGS3, type=NOINIT
Filter4_RegsFile : > RAMGS4, type=NOINIT
Difference_RegsFile : >RAMGS5, type=NOINIT
#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(8)
#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(8)
#endif
/* Following section is for MEMCFG examples*/
#if defined(__TI_EABI__)
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS14,
LOAD_START(isrfuncLoadStart),
LOAD_END(isrfuncLoadEnd),
RUN_START(isrfuncRunStart),
LOAD_SIZE(isrfuncLoadSize)
#else
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS14,
LOAD_START(_isrfuncLoadStart),
LOAD_END(_isrfuncLoadEnd),
RUN_START(_isrfuncRunStart),
LOAD_SIZE(_isrfuncLoadSize)
#endif
/* The following section definition are for DCSM dual core examples */
ZONE1_RAM : > RAMLS4
UNSECURE_RAM : > RAMLS6
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,80 @@
MEMORY
{
/* Flash sectors */
CMBANK0_SECURERESET : origin = 0x00200000, length = 0x00000004 /* Boot to Secure Flash Entry Point */
CMBANK0_SECTOR0 : origin = 0x00200004, length = 0x00003FFC
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 = 0x00002000
C0RAM : origin = 0x1FFFE000, length = 0x00002000
BOOT_RSVD : origin = 0x20000000, length = 0x00000800 /* Part of S0, BOOT rom will use this for stack */
S0RAM : origin = 0x20000800, length = 0x00003800
S1RAM : origin = 0x20004000, length = 0x00004000
S2RAM : origin = 0x20008000, length = 0x00004000
S3RAM : origin = 0x2000C000, length = 0x00004000
E0RAM : origin = 0x20010000, length = 0x00004000
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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
{
.secureReset : > CMBANK0_SECURERESET
.resetisr : > CMBANK0_SECTOR0, ALIGN(16)
.vftable : > CMBANK0_SECTOR0, ALIGN(16) /* Application placed vector table in Flash*/
.vtable : > S0RAM /* Application placed vector table in RAM*/
.text : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.cinit : > CMBANK0_SECTOR0, ALIGN(16)
.pinit : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.switch : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
.TI.ramfunc : {} LOAD = CMBANK0_SECTOR0,
RUN = C0RAM,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(16)
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,141 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
CLA1_DMA_MSGRAM : origin = 0x001680, length = 0x000080
DMA_CLA1_MSGRAM : origin = 0x001700, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMM0 | RAMD0 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMLS3
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS4
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS4
.data : > RAMLS4
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : > RAMLS4
.econst : > RAMLS4
.esysmem : > RAMLS4
#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
dclfuncs : > RAMLS3
/* CLA specific sections */
Cla1Prog : > RAMLS5
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1ToDmaMsgRAM : > CLA1_DMA_MSGRAM, type=NOINIT
DmaToCla1MsgRAM : > DMA_CLA1_MSGRAM, type=NOINIT
Cla1DataRam : >> RAMLS0 | RAMLS1
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
.const_cla : > RAMLS1
cla_shared : > RAMLS1
.TI.ramfunc : {} > RAMM0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,140 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
CLA1_DMA_MSGRAM : origin = 0x001680, length = 0x000080
DMA_CLA1_MSGRAM : origin = 0x001700, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMM0 | RAMD0 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMLS3
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS4
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS4
.data : > RAMLS4
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : > RAMLS4
.econst : > RAMLS4
.esysmem : > RAMLS4
#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
dclfuncs : > RAMLS3
/* CLA specific sections */
Cla1Prog : > RAMLS5
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
Cla1ToDmaMsgRAM : > CLA1_DMA_MSGRAM, type=NOINIT
DmaToCla1MsgRAM : > DMA_CLA1_MSGRAM, type=NOINIT
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
.const_cla : > RAMLS1
cla_shared : > RAMLS1
.TI.ramfunc : {} > RAMM0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,114 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD0 : origin = 0x00C000, length = 0x000800
RAMD1 : origin = 0x00C800, length = 0x000800
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1_LS2 : origin = 0x008800, length = 0x001000
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1_LS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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
/* Allocate IQ math areas: */
IQmath : > RAMLS0, PAGE = 0 /* Math Code */
IQmathTables : > RAMLS1_LS2, PAGE = 0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,138 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMM0 | RAMD0 | RAMD1 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMLS3
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS4
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS4
.data : > RAMLS4
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : > RAMLS4
.econst : > RAMLS4
.esysmem : > RAMLS4
#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 */
Filter1_RegsFile : > RAMLS6
Filter2_RegsFile : > RAMLS6
Filter3_RegsFile : > RAMLS7
Filter4_RegsFile : > RAMLS7
/* CLA specific sections */
Cla1Prog : > RAMLS5
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
.const_cla : > RAMLS1
.TI.ramfunc : {} > RAMM0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,138 @@
CLA_SCRATCHPAD_SIZE = 0x100;
--undef_sym=__cla_scratchpad_end
--undef_sym=__cla_scratchpad_start
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
CLA1_MSGRAMLOW : origin = 0x001480, length = 0x000080
CLA1_MSGRAMHIGH : origin = 0x001500, length = 0x000080
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMM0 | RAMD0 | RAMD1 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMLS3
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS4
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS4
.data : > RAMLS4
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : > RAMLS4
.econst : > RAMLS4
.esysmem : > RAMLS4
#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 */
Filter1_RegsFile : > RAMLS6
Filter2_RegsFile : > RAMLS6
Filter3_RegsFile : > RAMLS7
Filter4_RegsFile : > RAMLS7
/* CLA specific sections */
Cla1Prog : > RAMLS5
CLADataLS0 : > RAMLS0
CLADataLS1 : > RAMLS1
Cla1ToCpuMsgRAM : > CLA1_MSGRAMLOW, type=NOINIT
CpuToCla1MsgRAM : > CLA1_MSGRAMHIGH, type=NOINIT
/* CLA C compiler sections */
//
// Must be allocated to memory the CLA has write access to
//
CLAscratch :
{ *.obj(CLAscratch)
. += CLA_SCRATCHPAD_SIZE;
*.obj(CLAscratch_end) } > RAMLS1
.scratchpad : > RAMLS1
.bss_cla : > RAMLS1
.const_cla : > RAMLS1
.TI.ramfunc : {} > RAMM0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,113 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD01 : origin = 0x00C000, length = 0x001000
RAMLS02 : origin = 0x008000, length = 0x001800
RAMLS3 : origin = 0x009800, length = 0x000800
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS56 : origin = 0x00A800, length = 0x001000
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 : >> RAMD01 | RAMLS02 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS56
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS56
.data : > RAMLS56
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS56
.econst : > RAMLS56
.esysmem : > RAMLS56
#endif
ramgs0 : > RAMGS0
ramgs1 : > RAMGS1
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM
MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM
MSGRAM_CPU_TO_CM > CPUTOCMRAM
MSGRAM_CM_TO_CPU > CMTOCPURAM
/* 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
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0
#else
ramfuncs : > RAMM0
#endif
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,117 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#endif
ramgs0 : > RAMGS0, type=NOINIT
ramgs1 : > RAMGS1, type=NOINIT
/* Sine Table */
SINTBL : > RAMGS2
/* Data Log */
DLOG : > RAMGS3
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.
//===========================================================================
*/
@@ -0,0 +1,74 @@
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 */
/*
S0RAM : origin = 0x20000808, length = 0x000037F8
S1RAM : origin = 0x20004000, length = 0x00003FFF
S2RAM : origin = 0x20008000, length = 0x00003FFF
S3RAM : origin = 0x2000C000, length = 0x00003FFF
*/
/* Combined S0RAM, S1RAM, S2RAM and S3RAM */
SxRAM : origin = 0x20000808, length = 0x0000F7F8
E0RAM : origin = 0x20010000, length = 0x00003FFF
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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 : > SxRAM /* Application placed vector table */
.text : > SxRAM
.TI.ramfunc : > C0RAM
.cinit : > C0RAM
.pinit : > C0RAM
.switch : > C0RAM
.sysmem : > SxRAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : > C1RAM
.esysmem : > C1RAM
.data : > SxRAM
.bss : > SxRAM
.const : > C1RAM
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,97 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD01 : origin = 0x00C000, length = 0x001000
RAMLS02 : origin = 0x008000, length = 0x001800
RAMLS3 : origin = 0x009800, length = 0x000800
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS56 : origin = 0x00A800, length = 0x001000
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
RAMGS101112 : origin = 0x017000, length = 0x003000
RAMGS13 : origin = 0x01A000, length = 0x001000
RAMGS14 : origin = 0x01B000, length = 0x001000
RAMGS15 : origin = 0x01C000, length = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 : >> RAMD01 | RAMLS02 | RAMLS3 | RAMGS101112
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : >> RAMLS56 | RAMLS7 | RAMGS101112
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS56
.data : >> RAMLS56 | RAMLS7 | RAMGS101112
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS56
.econst : > RAMLS56
.esysmem : > RAMLS56
#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
.TI.ramfunc : {} > RAMM0
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,140 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD01 : origin = 0x00C000, length = 0x001000
RAMLS02 : origin = 0x008000, length = 0x001800
RAMLS3 : origin = 0x009800, length = 0x000800
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS56 : origin = 0x00A800, length = 0x001000
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
EMIF1_CS0n : origin = 0x80000000, length = 0x10000000
EMIF1_CS2n : origin = 0x00100000, length = 0x00100000
EMIF1_CS0_CS2n : origin = 0x00200000, length = 0x00100000
EMIF1_CS3n : origin = 0x00300000, length = 0x00080000
EMIF1_CS4n : origin = 0x00380000, length = 0x00060000
EMIF2_CS0n : origin = 0x90000000, length = 0x10000000
EMIF2_CS2n : origin = 0x00002000, length = 0x00001000
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMD01 | RAMLS02 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS56
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS56
.data : > RAMLS56
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS56
.econst : > RAMLS56
.esysmem : > RAMLS56
#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
/* Sections for EMIF example */
#if defined(__TI_EABI__)
xintffuncs : LOAD = RAMM0,
RUN = EMIF1_CS2n,
LOAD_START(XintffuncsLoadStart),
LOAD_END(XintffuncsLoadEnd),
RUN_START(XintffuncsRunStart)
#else
xintffuncs : LOAD = RAMM0,
RUN = EMIF1_CS2n,
LOAD_START(_XintffuncsLoadStart),
LOAD_END(_XintffuncsLoadEnd),
RUN_START(_XintffuncsRunStart)
#endif
emif_cs0_nonfar : > EMIF1_CS0_CS2n
.farbss : > EMIF1_CS0n
.farconst : > EMIF1_CS0n
.em1_cs0 : > EMIF1_CS0n
.em1_cs2 : > EMIF1_CS2n | EMIF1_CS0_CS2n
.em1_cs3 : > EMIF1_CS3n
.em1_cs4 : > EMIF1_CS4n
.em2_cs0 : > EMIF2_CS0n
.em2_cs2 : > EMIF2_CS2n
/* 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.
//===========================================================================
*/
@@ -0,0 +1,149 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0_1 : origin = 0x0001B1, length = 0x000640
//RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMM0_1
.switch : > RAMM0_1
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM0_1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0_1
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0_1
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#endif
SHARERAMGS0 : > RAMGS0, type=NOINIT
SHARERAMGS1 : > RAMGS1, type=NOINIT
SHARERAMGS2 : > RAMGS2, type=NOINIT
SHARERAMGS3 : > RAMGS3, type=NOINIT
SHARERAMGS4 : > RAMGS4, type=NOINIT
SHARERAMGS5 : > RAMGS5, type=NOINIT
SHARERAMGS6 : > RAMGS6, type=NOINIT
SHARERAMGS7 : > RAMGS7, type=NOINIT
SHARERAMGS8 : > RAMGS8, type=NOINIT
SHARERAMGS9 : > RAMGS9, type=NOINIT
SHARERAMGS10 : > RAMGS10, type=NOINIT
SHARERAMGS11 : > RAMGS11, type=NOINIT
SHARERAMGS12 : > RAMGS12, type=NOINIT
SHARERAMGS13 : > RAMGS13, type=NOINIT
SHARERAMGS14 : > RAMGS14, type=NOINIT
SHARERAMGS15 : > RAMGS15, type=NOINIT
ramgs0 : > RAMGS0, type=NOINIT
ramgs1 : > RAMGS1, type=NOINIT
.cpu1tocpu2RAM > CPU1TOCPU2RAM, type=NOINIT
.cpu2tocpu1RAM > CPU2TOCPU1RAM, type=NOINIT
.cputocmRAM > CPUTOCMRAM, type=NOINIT
.cmtocpuRAM > CMTOCPURAM, 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
.TI.ramfunc : {} > RAMM0_1
/* 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
/* Following section is for MEMCFG examples*/
#if defined(__TI_EABI__)
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(isrfuncLoadStart),
LOAD_END(isrfuncLoadEnd),
RUN_START(isrfuncRunStart),
LOAD_SIZE(isrfuncLoadSize)
#else
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(_isrfuncLoadStart),
LOAD_END(_isrfuncLoadEnd),
RUN_START(_isrfuncRunStart),
LOAD_SIZE(_isrfuncLoadSize)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,70 @@
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 = 0x00002000
C0RAM : origin = 0x1FFFE000, length = 0x00002000
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 */
S0RAM : origin = 0x20000808, length = 0x000037F8
S1RAM : origin = 0x20004000, length = 0x00004000
S2RAM : origin = 0x20008000, length = 0x00004000
S3RAM : origin = 0x2000C000, length = 0x00004000
E0RAM : origin = 0x20010000, length = 0x00004000
CPU1TOCMMSGRAM0 : origin = 0x20080000, length = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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 : > S0RAM /* Application placed vector table */
.text : >> S0RAM | S1RAM
.TI.ramfunc : > C0RAM
.cinit : > C0RAM
.pinit : > C0RAM
.switch : > C0RAM
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : > C1RAM
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : > C1RAM
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -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 = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5 | RAMLS6
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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.
//===========================================================================
*/
@@ -0,0 +1,101 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD0 : origin = 0x00C000, length = 0x000800
RAMD1 : origin = 0x00C800, length = 0x000800
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1_4 : origin = 0x008800, length = 0x002000
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_14 : origin = 0x014000, length = 0x008000
RAMGS15 : origin = 0x01C000, length = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS6 | RAMLS7 | RAMGS6 | RAMGS15
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMLS1_4
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS5
.init_array : > RAMM0
.const : > RAMLS5 | RAMLS6 | RAMGS7_14
.data : > RAMLS5
.sysmem : > RAMLS1_4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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.
//===========================================================================
*/
@@ -0,0 +1,143 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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
EMIF1_CS0n : origin = 0x80000000, length = 0x10000000
EMIF1_CS2n : origin = 0x00100000, length = 0x00100000
EMIF1_CS0_CS2n : origin = 0x00200000, length = 0x00100000
EMIF1_CS3n : origin = 0x00300000, length = 0x00080000
EMIF1_CS4n : origin = 0x00380000, length = 0x00060000
EMIF2_CS0n : origin = 0x90000000, length = 0x10000000
EMIF2_CS2n : origin = 0x00002000, length = 0x00001000
}
SECTIONS
{
codestart : > BEGIN
.text : >> RAMD0 | RAMD1 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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
.TI.ramfunc : {} > RAMM0
/* Sections for EMIF example */
#if defined(__TI_EABI__)
xintffuncs : LOAD = RAMM0,
RUN = EMIF1_CS2n,
LOAD_START(XintffuncsLoadStart),
LOAD_END(XintffuncsLoadEnd),
RUN_START(XintffuncsRunStart)
#else
xintffuncs : LOAD = RAMM0,
RUN = EMIF1_CS2n,
LOAD_START(_XintffuncsLoadStart),
LOAD_END(_XintffuncsLoadEnd),
RUN_START(_XintffuncsRunStart)
#endif
emif_cs0_nonfar : > EMIF1_CS0_CS2n
.farbss : > EMIF1_CS0n
.farconst : > EMIF1_CS0n
.em1_cs0 : > EMIF1_CS0n
.em1_cs2 : > EMIF1_CS2n | EMIF1_CS0_CS2n
.em1_cs3 : > EMIF1_CS3n
.em1_cs4 : > EMIF1_CS4n
.em2_cs0 : > EMIF2_CS0n
.em2_cs2 : > EMIF2_CS2n
/* The following section definition are for SDFM examples */
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
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,112 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001A7 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001A9, length = 0x000257
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS3
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS3
.data : > RAMLS2
.sysmem : > RAMM1
#else
.pinit : > RAMM0
.ebss : > RAMLS3
.econst : > RAMLS3
.esysmem : > RAMM1
#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.
//===========================================================================
*/
@@ -0,0 +1,149 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#endif
SHARERAMGS0 : > RAMGS0, type=NOINIT
SHARERAMGS1 : > RAMGS1, type=NOINIT
SHARERAMGS2 : > RAMGS2, type=NOINIT
SHARERAMGS3 : > RAMGS3, type=NOINIT
SHARERAMGS4 : > RAMGS4, type=NOINIT
SHARERAMGS5 : > RAMGS5, type=NOINIT
SHARERAMGS6 : > RAMGS6, type=NOINIT
SHARERAMGS7 : > RAMGS7, type=NOINIT
SHARERAMGS8 : > RAMGS8, type=NOINIT
SHARERAMGS9 : > RAMGS9, type=NOINIT
SHARERAMGS10 : > RAMGS10, type=NOINIT
SHARERAMGS11 : > RAMGS11, type=NOINIT
SHARERAMGS12 : > RAMGS12, type=NOINIT
SHARERAMGS13 : > RAMGS13, type=NOINIT
SHARERAMGS14 : > RAMGS14, type=NOINIT
SHARERAMGS15 : > RAMGS15, type=NOINIT
ramgs0 : > RAMGS0, type=NOINIT
ramgs1 : > RAMGS1, type=NOINIT
.cpu1tocpu2RAM > CPU1TOCPU2RAM, type=NOINIT
.cpu2tocpu1RAM > CPU2TOCPU1RAM, type=NOINIT
.cputocmRAM > CPUTOCMRAM, type=NOINIT
.cmtocpuRAM > CMTOCPURAM, 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
.TI.ramfunc : {} > RAMM0
/* 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
/* Following section is for MEMCFG examples*/
#if defined(__TI_EABI__)
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(isrfuncLoadStart),
LOAD_END(isrfuncLoadEnd),
RUN_START(isrfuncRunStart),
LOAD_SIZE(isrfuncLoadSize)
#else
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS15,
LOAD_START(_isrfuncLoadStart),
LOAD_END(_isrfuncLoadEnd),
RUN_START(_isrfuncRunStart),
LOAD_SIZE(_isrfuncLoadSize)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,146 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001A7 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001A9, length = 0x000257
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : > RAMLS5
.econst : > RAMLS5
.esysmem : > RAMLS5
#endif
SHARERAMGS0 : > RAMGS0, type=NOINIT
SHARERAMGS1 : > RAMGS1, type=NOINIT
SHARERAMGS2 : > RAMGS2, type=NOINIT
SHARERAMGS3 : > RAMGS3, type=NOINIT
SHARERAMGS4 : > RAMGS4, type=NOINIT
SHARERAMGS5 : > RAMGS5, type=NOINIT
SHARERAMGS6 : > RAMGS6, type=NOINIT
SHARERAMGS7 : > RAMGS7, type=NOINIT
SHARERAMGS8 : > RAMGS8, type=NOINIT
SHARERAMGS9 : > RAMGS9, type=NOINIT
SHARERAMGS10 : > RAMGS10, type=NOINIT
SHARERAMGS11 : > RAMGS11, type=NOINIT
SHARERAMGS12 : > RAMGS12, type=NOINIT
SHARERAMGS13 : > RAMGS13, type=NOINIT
SHARERAMGS14 : > RAMGS14, type=NOINIT
SHARERAMGS15 : > RAMGS15, type=NOINIT
.cpu1tocpu2RAM > CPU1TOCPU2RAM, type=NOINIT
.cpu2tocpu1RAM > CPU2TOCPU1RAM, type=NOINIT
.cputocmRAM > CPUTOCMRAM, type=NOINIT
.cmtocpuRAM > CMTOCPURAM, 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
.TI.ramfunc : {} > RAMM0
/* 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
/* Following section is for MEMCFG examples*/
#if defined(__TI_EABI__)
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS14,
LOAD_START(isrfuncLoadStart),
LOAD_END(isrfuncLoadEnd),
RUN_START(isrfuncRunStart),
LOAD_SIZE(isrfuncLoadSize)
#else
isrfunc : LOAD = RAMD0 | RAMLS0 | RAMLS1 | RAMLS2 | RAMLS3 | RAMLS4,
RUN = RAMGS14,
LOAD_START(_isrfuncLoadStart),
LOAD_END(_isrfuncLoadEnd),
RUN_START(_isrfuncRunStart),
LOAD_SIZE(_isrfuncLoadSize)
#endif
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,269 @@
//#############################################################################
//
// FILE: dsp_examples_fft_lnk.cmd.cmd
//
// TITLE: Linker Command File for the DSP library examples that run
// on the F2838x platform
//
// This file includes all RAM and FLASH blocks present on the
// F2838x
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
// NOTES:
// 1. Memory blocks on F2838x are uniform (ie same physical memory) in both
// PAGE 0 and PAGE 1. That is, the same memory region should not be defined
// for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
// and/or data.
//
// Contiguous SARAM memory blocks can be combined if required to create a
// larger memory block.
//
//#############################################################################
#if (!defined(RAM) && !defined(_FLASH))
#error Requires either RAM or _FLASH to be defined, do this \
from the project properties, C2000 Linker -> Advanced Options -> \
Command File Preprocessing -> --define. Dont forget to also define the \
variable in the predefined symbols under the compiler setting.
#endif //(!defined(RAM) || !defined(_FLASH))
MEMORY
{
PAGE 0 :
// BEGIN is used for the "boot to SARAM" bootloader mode
#if defined(RAM)
BEGIN : origin = 0x000000, length = 0x000002
#elif defined(_FLASH)
BEGIN : origin = 0x080000, length = 0x000002
#endif
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMM1 : origin = 0x000400, length = 0x000400
RAMLS0 : origin = 0x008000, length = 0x000800
//RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS123 : origin = 0x008800, length = 0x001800
//RAMLS3 : origin = 0x009800, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
FLASHA : origin = 0x080002, length = 0x001FFE // on-chip Flash
FLASHC : origin = 0x084000, length = 0x002000 // on-chip Flash
FLASHD : origin = 0x086000, length = 0x002000 // on-chip Flash
FLASHE : origin = 0x088000, length = 0x008000 // on-chip Flash
FLASHF : origin = 0x090000, length = 0x008000 // on-chip Flash
FLASHG : origin = 0x098000, length = 0x008000 // on-chip Flash
PAGE 1 :
FPU : origin = 0x000F00, length = 0x000100 // FPU registers*/
// Part of M0, BOOT rom will use this for stack
BOOT_RSVD : origin = 0x000002, length = 0x000120
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS567 : origin = 0x00A800, length = 0x001800
//RAMLS6 : origin = 0x00B000, length = 0x000800
//RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS01 : origin = 0x00C000, length = 0x004000
//RAMGS1 : origin = 0x00E000, length = 0x002000
RAMGS2 : origin = 0x010000, length = 0x002000
RAMGS3 : origin = 0x012000, length = 0x002000
RAMGS4 : origin = 0x014000, length = 0x002000
FLASHB : origin = 0x082000, length = 0x002000 // on-chip Flash
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
#if defined(RAM)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0, PAGE = 0
#else
ramfuncs : > RAMM0, PAGE = 0
#endif
#endif
.text :>> RAMM0 | RAMM1 | RAMLS0 | RAMLS123,
PAGE = 0
.cinit : > RAMLS123, PAGE = 0
.switch : > RAMM0, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > RAMM0, PAGE = 0
.const : > RAMGS01, PAGE = 1
#else
.pinit : > RAMM0, PAGE = 0
.econst : > RAMGS01, PAGE = 1
#endif //__TI_EABI__
#if !defined(ROMTABLES)
#if defined(__TMS320C28XX_FPU64__)
FPU64fftTables : > RAMGS2, PAGE = 1
#else
FPUfftTables : > RAMGS2, PAGE = 1
#endif
#endif //ROMTABLES
#if defined(__TMS320C28XX_FPU64__)
FPU64mathTables : > RAMGS3, PAGE = 1
#else
FPUmathTables : > RAMGS3, PAGE = 1
#endif
#elif defined(_FLASH)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#if defined(__TI_EABI__)
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(RamfuncsRunStart),
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
PAGE = 0
#else
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#endif
#else
ramfuncs : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#endif
#endif
.text : > FLASHA, PAGE = 0
.cinit : > FLASHD, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > FLASHC, PAGE = 0
.const : > FLASHG, PAGE = 0
#else
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHG, PAGE = 0
#endif //__TI_EABI__
.switch : > FLASHC, PAGE = 0
#if !defined(ROMTABLES)
#if defined(__TMS320C28XX_FPU64__)
#if defined(__TI_EABI__)
FPU64fftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(FPU64fftTablesRunStart),
LOAD_START(FPU64fftTablesLoadStart),
LOAD_SIZE(FPU64fftTablesLoadSize),
PAGE = 1
#else
FPU64fftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(_FPU64fftTablesRunStart),
LOAD_START(_FPU64fftTablesLoadStart),
LOAD_SIZE(_FPU64fftTablesLoadSize),
PAGE = 1
#endif
#else
#if defined(__TI_EABI__)
FPUfftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(FPUfftTablesRunStart),
LOAD_START(FPUfftTablesLoadStart),
LOAD_SIZE(FPUfftTablesLoadSize),
PAGE = 1
#else
FPUfftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(_FPUfftTablesRunStart),
LOAD_START(_FPUfftTablesLoadStart),
LOAD_SIZE(_FPUfftTablesLoadSize),
PAGE = 1
#endif
#endif
#endif //ROMTABLES
#if defined(__TMS320C28XX_FPU64__)
#if defined(__TI_EABI__)
FPU64mathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(FPU64mathTablesRunStart),
LOAD_START(FPU64mathTablesLoadStart),
LOAD_SIZE(FPU64mathTablesLoadSize),
PAGE = 1
#else
FPU64mathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(_FPU64mathTablesRunStart),
LOAD_START(_FPU64mathTablesLoadStart),
LOAD_SIZE(_FPU64mathTablesLoadSize),
PAGE = 1
#endif
#else
#if defined(__TI_EABI__)
FPUmathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(FPUmathTablesRunStart),
LOAD_START(FPUmathTablesLoadStart),
LOAD_SIZE(FPUmathTablesLoadSize),
PAGE = 1
#else
FPUmathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(_FPUmathTablesRunStart),
LOAD_START(_FPUmathTablesLoadStart),
LOAD_SIZE(_FPUmathTablesLoadSize),
PAGE = 1
#endif
#endif
#endif //defined(RAM)
FpuRegsFile : > FPU, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT // not used
.stack : > RAMLS567, PAGE = 1
.data : > RAMLS567, PAGE = 1
.sysmem : > RAMLS4, PAGE = 1
#if defined(__TI_EABI__)
.bss : > RAMLS567, PAGE = 1
.bss:.cio : > RAMLS4, PAGE = 1
#else
.cio : > RAMLS4, PAGE = 1
.ebss : > RAMLS567, PAGE = 1
.esysmem : > RAMLS567, PAGE = 1
#endif //__TI_EABI__
// Example specific section
#if defined(FFT_ALIGN)
FFT_buffer_1 : > RAMGS01, PAGE = 1, ALIGN = FFT_ALIGN
#elif defined(FFT_UNALIGN)
// Create a hole of size 10 at the beginnning of the FFT_buffer_1 section,
// the linker will force the actual data to start at a new page, so you
// may see a hole > 0xA in the .map file. Note that this is done purely
// to demonstrate the unaligned FFT functions
FFT_buffer_1:{.+=0xA;}> RAMGS01, PAGE = 1
#else
#error The FFT example requires the user to either define FFT_ALIGN to \
4(double precision) * 2(complex) * size of the FFT, for double precision \
routines and 2(single precision) * 2(complex) * size of the FFT, for \
single precision routines. \
For example, for a 128 point FFT, FFT_ALIGN=1024 for DP, and FFT_ALIGN=512\
for SP. If using the unaligned version of the complex FFT, FFT_UNALIGN must be\
defined instead. FFT_ALIGN or FFT_UNALIGN is defined in the project \
properties \
C2000 Linker -> Advanced Options -> Command File Preprocessing -> --define
#endif
FFT_buffer_2 : > RAMGS4, PAGE = 1
}
//
//===========================================================================
// End of file.
//===========================================================================
//
@@ -0,0 +1,172 @@
//#############################################################################
//
// FILE: dsp_examples_filter_lnk.cmd.cmd
//
// TITLE: Linker Command File for the DSP library examples that run
// on the 28004x platform
//
// This file includes all RAM and FLASH blocks present on the
// 28004x
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
// NOTES:
// 1. In addition to this memory linker command file, add the header linker
// command file directly to the project. The header linker command file is
// required to link the peripheral structures to the proper locations within
// the memory map. This is necessary when using bit field headers over
// driverlib
//
// The header linker files are found in
// controlSUITE\device_support\f2838x(D/S)\<version>\f2838x_headers\cmd
//
// For BIOS applications add: f2838x(D/S)_Headers_BIOS_cpuX.cmd
// For nonBIOS applications add: f2838x(D/S)_Headers_nonBIOS_cpuX.cmd
//
// 2. Memory blocks on f2838x are uniform (ie same physical memory) in both
// PAGE 0 and PAGE 1. That is, the same memory region should not be defined
// for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
// and/or data.
//
// Contiguous SARAM memory blocks can be combined if required to create a
// larger memory block.
//
//#############################################################################
MEMORY
{
PAGE 0 :
// BEGIN is used for the "boot to SARAM" bootloader mode
#if defined(RAM)
BEGIN : origin = 0x000000, length = 0x000002
#elif defined(_FLASH)
BEGIN : origin = 0x080000, length = 0x000002
#endif
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMM1 : origin = 0x000400, length = 0x000400
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS23 : origin = 0x009000, length = 0x001000
//RAMLS3 : origin = 0x009800, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
FLASHA : origin = 0x080002, length = 0x001FFE // on-chip Flash
FLASHC : origin = 0x084000, length = 0x002000 // on-chip Flash
FLASHD : origin = 0x086000, length = 0x002000 // on-chip Flash
FLASHE : origin = 0x088000, length = 0x008000 // on-chip Flash
FLASHF : origin = 0x090000, length = 0x008000 // on-chip Flash
FLASHG : origin = 0x098000, length = 0x008000 // on-chip Flash
PAGE 1 :
FPU : origin = 0x000F00, length = 0x000100 // FPU registers*/
// Part of M0, BOOT rom will use this for stack
BOOT_RSVD : origin = 0x000002, length = 0x000120
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS5 : origin = 0x00A800, length = 0x000800
RAMLS6 : origin = 0x00B000, length = 0x000800
RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS0 : origin = 0x00C000, length = 0x002000
RAMGS1 : origin = 0x00E000, length = 0x002000
RAMGS2 : origin = 0x010000, length = 0x002000
RAMGS3 : origin = 0x012000, length = 0x002000
FLASHB : origin = 0x082000, length = 0x002000 // on-chip Flash
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
#if defined(RAM)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0, PAGE = 0
#else
ramfuncs : > RAMM0, PAGE = 0
#endif
#endif
.text :>> RAMLS0 | RAMLS1,
PAGE = 0
.cinit : > RAMLS23, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > RAMM0, PAGE = 0
.const : > RAMGS0, PAGE = 1
#else
.pinit : > RAMM0, PAGE = 0
.econst : > RAMGS0, PAGE = 1
#endif //__TI_EABI__
.switch : > RAMM0, PAGE = 0
#elif defined(_FLASH)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#if defined(__TI_EABI__)
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(RamfuncsRunStart),
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#else
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#else
ramfuncs : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#endif
.text : > FLASHA, PAGE = 0
.cinit : > FLASHC, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > FLASHC, PAGE = 0
.const : > FLASHB, PAGE = 1
#else
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHB, PAGE = 1
#endif //__TI_EABI__
.switch : > FLASHC, PAGE = 0
#endif //defined(RAM)
FpuRegsFile : > FPU, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT // not used
.stack : > RAMLS5, PAGE = 1
.data : > RAMGS0, PAGE = 1
.sysmem : > RAMLS4, PAGE = 1
#if defined(__TI_EABI__)
.bss : > RAMGS2, PAGE = 1
.bss:.cio : > RAMLS4, PAGE = 1
.bss:output : > RAMGS2, PAGE = 1
#else
.cio : > RAMLS4, PAGE = 1
.ebss : > RAMGS2, PAGE = 1
.esysmem : > RAMLS7, PAGE = 1
#endif //__TI_EABI__
}
//
//===========================================================================
// End of file.
//===========================================================================
//
@@ -0,0 +1,179 @@
//#############################################################################
//
// FILE: dsp_examples_filter_lnk.cmd.cmd
//
// TITLE: Linker Command File for the DSP library examples that run
// on the 28004x platform
//
// This file includes all RAM and FLASH blocks present on the
// 28004x
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
// NOTES:
// 1. In addition to this memory linker command file, add the header linker
// command file directly to the project. The header linker command file is
// required to link the peripheral structures to the proper locations within
// the memory map. This is necessary when using bit field headers over
// driverlib
//
// The header linker files are found in
// controlSUITE\device_support\f2838x(D/S)\<version>\f2838x_headers\cmd
//
// For BIOS applications add: f2838x(D/S)_Headers_BIOS_cpuX.cmd
// For nonBIOS applications add: f2838x(D/S)_Headers_nonBIOS_cpuX.cmd
//
// 2. Memory blocks on f2838x are uniform (ie same physical memory) in both
// PAGE 0 and PAGE 1. That is, the same memory region should not be defined
// for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
// and/or data.
//
// Contiguous SARAM memory blocks can be combined if required to create a
// larger memory block.
//
//#############################################################################
#if (!defined(RAM) && !defined(_FLASH))
#error Requires either RAM or _FLASH to be defined, do this \
from the project properties, C2000 Linker -> Advanced Options -> \
Command File Preprocessing -> --define. Dont forget to also define the \
variable in the predefined symbols under the compiler setting.
#endif //(!defined(RAM) || !defined(_FLASH))
MEMORY
{
PAGE 0 :
// BEGIN is used for the "boot to SARAM" bootloader mode
#if defined(RAM)
BEGIN : origin = 0x000000, length = 0x000002
#elif defined(_FLASH)
BEGIN : origin = 0x080000, length = 0x000002
#endif
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMM1 : origin = 0x000400, length = 0x000400
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS23 : origin = 0x009000, length = 0x001000
//RAMLS3 : origin = 0x009800, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
FLASHA : origin = 0x080002, length = 0x001FFE // on-chip Flash
FLASHC : origin = 0x084000, length = 0x002000 // on-chip Flash
FLASHD : origin = 0x086000, length = 0x002000 // on-chip Flash
FLASHE : origin = 0x088000, length = 0x008000 // on-chip Flash
FLASHF : origin = 0x090000, length = 0x008000 // on-chip Flash
FLASHG : origin = 0x098000, length = 0x008000 // on-chip Flash
PAGE 1 :
FPU : origin = 0x000F00, length = 0x000100 // FPU registers*/
// Part of M0, BOOT rom will use this for stack
BOOT_RSVD : origin = 0x000002, length = 0x000120
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS5 : origin = 0x00A800, length = 0x000800
RAMLS6 : origin = 0x00B000, length = 0x000800
RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS0 : origin = 0x00C000, length = 0x002000
RAMGS1 : origin = 0x00E000, length = 0x002000
RAMGS2 : origin = 0x010000, length = 0x002000
RAMGS3 : origin = 0x012000, length = 0x002000
FLASHB : origin = 0x082000, length = 0x002000 // on-chip Flash
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
#if defined(RAM)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0, PAGE = 0
#else
ramfuncs : > RAMM0, PAGE = 0
#endif
#endif
.text :>> RAMLS4 | RAMLS5 | RAMLS6 | RAMLS7,
PAGE = 1
.cinit : > RAMLS23, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > RAMM0, PAGE = 0
.const : > RAMGS0, PAGE = 1
#else
.pinit : > RAMM0, PAGE = 0
.econst : > RAMGS0, PAGE = 1
#endif //__TI_EABI__
.switch : > RAMM0, PAGE = 0
#elif defined(_FLASH)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#if defined(__TI_EABI__)
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(RamfuncsRunStart),
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#else
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#else
ramfuncs : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#endif
.text : > FLASHA, PAGE = 0
.cinit : > FLASHC, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > FLASHC, PAGE = 0
.const : > FLASHB, PAGE = 1
#else
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHB, PAGE = 1
#endif //__TI_EABI__
.switch : > FLASHC, PAGE = 0
#endif //defined(RAM)
FpuRegsFile : > FPU, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT // not used
.stack : > RAMLS5, PAGE = 1
.data : > RAMGS0, PAGE = 1
.sysmem : > RAMLS4, PAGE = 1
#if defined(__TI_EABI__)
.bss : > RAMGS2, PAGE = 1
.bss:.cio : > RAMLS4, PAGE = 1
.bss:output : > RAMGS2, PAGE = 1
#else
.cio : > RAMLS4, PAGE = 1
.ebss : > RAMGS2, PAGE = 1
.esysmem : > RAMLS7, PAGE = 1
#endif //__TI_EABI__
}
//
//===========================================================================
// End of file.
//===========================================================================
//
@@ -0,0 +1,277 @@
//#############################################################################
//
// FILE: dsp_examples_rfft_lnk.cmd.cmd
//
// TITLE: Linker Command File for the DSP library examples that run
// on the 28004x platform
//
// This file includes all RAM and FLASH blocks present on the
// 28004x
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
// NOTES:
// 1. In addition to this memory linker command file, add the header linker
// command file directly to the project. The header linker command file is
// required to link the peripheral structures to the proper locations within
// the memory map. This is necessary when using bit field headers over
// driverlib
//
// The header linker files are found in
// controlSUITE\device_support\f2838x(D/S)\<version>\f2838x_headers\cmd
//
// For BIOS applications add: f2838x(D/S)_Headers_BIOS_cpuX.cmd
// For nonBIOS applications add: f2838x(D/S)_Headers_nonBIOS_cpuX.cmd
//
// 2. Memory blocks on f2838x are uniform (ie same physical memory) in both
// PAGE 0 and PAGE 1. That is, the same memory region should not be defined
// for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
// and/or data.
//
// Contiguous SARAM memory blocks can be combined if required to create a
// larger memory block.
//
//#############################################################################
#if (!defined(RAM) && !defined(_FLASH))
#error Requires either RAM or _FLASH to be defined, do this \
from the project properties, C2000 Linker -> Advanced Options -> \
Command File Preprocessing -> --define. Dont forget to also define the \
variable in the predefined symbols under the compiler setting.
#endif //(!defined(RAM) || !defined(_FLASH))
MEMORY
{
PAGE 0 :
// BEGIN is used for the "boot to SARAM" bootloader mode
#if defined(RAM)
BEGIN : origin = 0x000000, length = 0x000002
#elif defined(_FLASH)
BEGIN : origin = 0x080000, length = 0x000002
#endif
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMM1 : origin = 0x000400, length = 0x000400
RAMLS0 : origin = 0x008000, length = 0x000800
//RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS123 : origin = 0x008800, length = 0x001800
//RAMLS3 : origin = 0x009800, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
FLASHA : origin = 0x080002, length = 0x001FFE // on-chip Flash
FLASHC : origin = 0x084000, length = 0x002000 // on-chip Flash
FLASHD : origin = 0x086000, length = 0x002000 // on-chip Flash
FLASHE : origin = 0x088000, length = 0x008000 // on-chip Flash
FLASHF : origin = 0x090000, length = 0x008000 // on-chip Flash
FLASHG : origin = 0x098000, length = 0x008000 // on-chip Flash
PAGE 1 :
FPU : origin = 0x000F00, length = 0x000100 // FPU registers*/
// Part of M0, BOOT rom will use this for stack
BOOT_RSVD : origin = 0x000002, length = 0x000120
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS567 : origin = 0x00A800, length = 0x001800
//RAMLS6 : origin = 0x00B000, length = 0x000800
//RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS01 : origin = 0x00C000, length = 0x004000
//RAMGS1 : origin = 0x00E000, length = 0x002000
RAMGS2 : origin = 0x010000, length = 0x002000
RAMGS3 : origin = 0x012000, length = 0x002000
RAMGS4 : origin = 0x014000, length = 0x002000
FLASHB : origin = 0x082000, length = 0x002000 // on-chip Flash
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
#if defined(RAM)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0, PAGE = 0
#else
ramfuncs : > RAMM0, PAGE = 0
#endif
#endif
.text :>> RAMM1 | RAMLS0 | RAMLS123,
PAGE = 0
.cinit : > RAMLS123, PAGE = 0
.switch : > RAMM0, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > RAMM0, PAGE = 0
.const : > RAMGS01, PAGE = 1
#else
.pinit : > RAMM0, PAGE = 0
.econst : > RAMGS01, PAGE = 1
#endif //__TI_EABI__
#if !defined(ROMTABLES)
//#if defined(__TMS320C28XX_FPU64__)
FPU64fftTables : > RAMGS2, PAGE = 1
//#else
// FPUfftTables : > RAMGS2, PAGE = 1
//#endif
#endif //ROMTABLES
#if defined(__TMS320C28XX_FPU64__)
FPU64mathTables : > RAMGS3, PAGE = 1
#else
FPUmathTables : > RAMGS3, PAGE = 1
#endif
#elif defined(_FLASH)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#if defined(__TI_EABI__)
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(RamfuncsRunStart),
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
PAGE = 0
#else
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#endif
#else
ramfuncs : LOAD = FLASHC,
RUN = RAMLS123,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
#endif
#endif
.text : > FLASHA, PAGE = 0
.cinit : > FLASHC, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > FLASHC, PAGE = 0
.const : > FLASHG, PAGE = 0
#else
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHG, PAGE = 0
#endif //__TI_EABI__
.switch : > FLASHC, PAGE = 0
#if !defined(ROMTABLES)
#if defined(__TMS320C28XX_FPU64__)
#if defined(__TI_EABI__)
FPU64fftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(FPU64fftTablesRunStart),
LOAD_START(FPU64fftTablesLoadStart),
LOAD_SIZE(FPU64fftTablesLoadSize),
PAGE = 1
#else
FPU64fftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(_FPU64fftTablesRunStart),
LOAD_START(_FPU64fftTablesLoadStart),
LOAD_SIZE(_FPU64fftTablesLoadSize),
PAGE = 1
#endif
#else
#if defined(__TI_EABI__)
FPUfftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(FPUfftTablesRunStart),
LOAD_START(FPUfftTablesLoadStart),
LOAD_SIZE(FPUfftTablesLoadSize),
PAGE = 1
#else
FPUfftTables : LOAD = FLASHB,
RUN = RAMGS2,
RUN_START(_FPUfftTablesRunStart),
LOAD_START(_FPUfftTablesLoadStart),
LOAD_SIZE(_FPUfftTablesLoadSize),
PAGE = 1
#endif
#endif
#endif //ROMTABLES
#if defined(__TMS320C28XX_FPU64__)
#if defined(__TI_EABI__)
FPU64mathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(FPU64mathTablesRunStart),
LOAD_START(FPU64mathTablesLoadStart),
LOAD_SIZE(FPU64mathTablesLoadSize),
PAGE = 1
#else
FPU64mathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(_FPU64mathTablesRunStart),
LOAD_START(_FPU64mathTablesLoadStart),
LOAD_SIZE(_FPU64mathTablesLoadSize),
PAGE = 1
#endif
#else
#if defined(__TI_EABI__)
FPUmathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(FPUmathTablesRunStart),
LOAD_START(FPUmathTablesLoadStart),
LOAD_SIZE(FPUmathTablesLoadSize),
PAGE = 1
#else
FPUmathTables : LOAD = FLASHB,
RUN = RAMGS3,
RUN_START(_FPUmathTablesRunStart),
LOAD_START(_FPUmathTablesLoadStart),
LOAD_SIZE(_FPUmathTablesLoadSize),
PAGE = 1
#endif
#endif
#endif //defined(RAM)
FpuRegsFile : > FPU, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT // not used
.stack : > RAMLS567, PAGE = 1
.data : > RAMLS567, PAGE = 1
.sysmem : > RAMLS4, PAGE = 1
#if defined(__TI_EABI__)
.bss : > RAMLS567, PAGE = 1
.bss:.cio : > RAMLS4, PAGE = 1
#else
.cio : > RAMLS4, PAGE = 1
.ebss : > RAMLS567, PAGE = 1
.esysmem : > RAMLS567, PAGE = 1
#endif //__TI_EABI__
// Example specific section
#if defined(FFT_ALIGN)
FFT_buffer_1 : > RAMGS01, PAGE = 1, ALIGN = FFT_ALIGN
#elif defined(FFT_UNALIGN)
// Create a hole of size 10 at the beginnning of the FFT_buffer_1 section,
// the linker will force the actual data to start at a new page, so you
// may see a hole > 0xA in the .map file. Note that this is done purely
// to demonstrate the unaligned FFT functions
FFT_buffer_1:{.+=0xA;}> RAMGS01, PAGE = 1
#else
#error The FFT example requires the user to either define FFT_ALIGN to \
4(double precision) * 1(real) * size of the FFT, for double precision \
routines and 2(single precision) * 1(real) * size of the FFT, for \
single precision routines. \.
For example, for a 128 point FFT, FFT_ALIGN=512 for DP, and FFT_ALIGN=256\
for SP. If using the unaligned version of the complex FFT, FFT_UNALIGN must be\
defined instead. FFT_ALIGN or FFT_UNALIGN is defined in the project \
properties \
C2000 Linker -> Advanced Options -> Command File Preprocessing -> --define
#endif
FFT_buffer_2 : > RAMGS4, PAGE = 1
}
//
//===========================================================================
// End of file.
//===========================================================================
//
@@ -0,0 +1,180 @@
//#############################################################################
//
// FILE: dsp_examples_vector_lnk.cmd.cmd
//
// TITLE: Linker Command File for the DSP library examples that run
// on the 28004x platform
//
// This file includes all RAM and FLASH blocks present on the
// 28004x
//
//#############################################################################
//
//
// $Copyright: Copyright (C) 2022 Texas Instruments Incorporated -
// http://www.ti.com/ ALL RIGHTS RESERVED $
//#############################################################################
// NOTES:
// 1. In addition to this memory linker command file, add the header linker
// command file directly to the project. The header linker command file is
// required to link the peripheral structures to the proper locations within
// the memory map. This is necessary when using bit field headers over
// driverlib
//
// The header linker files are found in
// controlSUITE\device_support\f2838x(D/S)\<version>\f2838x_headers\cmd
//
// For BIOS applications add: f2838x(D/S)_Headers_BIOS_cpuX.cmd
// For nonBIOS applications add: f2838x(D/S)_Headers_nonBIOS_cpuX.cmd
//
// 2. Memory blocks on f2838x are uniform (ie same physical memory) in both
// PAGE 0 and PAGE 1. That is, the same memory region should not be defined
// for both PAGE 0 and PAGE 1. Doing so will result in corruption of program
// and/or data.
//
// Contiguous SARAM memory blocks can be combined if required to create a
// larger memory block.
//
//#############################################################################
#if (!defined(RAM) && !defined(_FLASH))
#error Requires either RAM or _FLASH to be defined, do this \
from the project properties, C2000 Linker -> Advanced Options -> \
Command File Preprocessing -> --define. Dont forget to also define the \
variable in the predefined symbols under the compiler setting.
#endif //(!defined(RAM) || !defined(_FLASH))
MEMORY
{
PAGE 0 :
// BEGIN is used for the "boot to SARAM" bootloader mode
#if defined(RAM)
BEGIN : origin = 0x000000, length = 0x000002
#elif defined(_FLASH)
BEGIN : origin = 0x080000, length = 0x000002
#endif
RAMM0 : origin = 0x000122, length = 0x0002DE
RAMM1 : origin = 0x000400, length = 0x000400
RAMLS0 : origin = 0x008000, length = 0x000800
RAMLS1 : origin = 0x008800, length = 0x000800
RAMLS23 : origin = 0x009000, length = 0x001000
//RAMLS3 : origin = 0x009800, length = 0x000800
RESET : origin = 0x3FFFC0, length = 0x000002
FLASHA : origin = 0x080002, length = 0x001FFE // on-chip Flash
FLASHC : origin = 0x084000, length = 0x002000 // on-chip Flash
FLASHD : origin = 0x086000, length = 0x002000 // on-chip Flash
FLASHE : origin = 0x088000, length = 0x008000 // on-chip Flash
FLASHF : origin = 0x090000, length = 0x008000 // on-chip Flash
FLASHG : origin = 0x098000, length = 0x008000 // on-chip Flash
PAGE 1 :
FPU : origin = 0x000F00, length = 0x000100 // FPU registers*/
// Part of M0, BOOT rom will use this for stack
BOOT_RSVD : origin = 0x000002, length = 0x000120
RAMLS4 : origin = 0x00A000, length = 0x000800
RAMLS5 : origin = 0x00A800, length = 0x000800
RAMLS6 : origin = 0x00B000, length = 0x000800
RAMLS7 : origin = 0x00B800, length = 0x000800
RAMGS0 : origin = 0x00C000, length = 0x002000
RAMGS1 : origin = 0x00E000, length = 0x002000
RAMGS2 : origin = 0x010000, length = 0x002000
RAMGS3 : origin = 0x012000, length = 0x002000
FLASHB : origin = 0x082000, length = 0x002000 // on-chip Flash
}
SECTIONS
{
codestart : > BEGIN, PAGE = 0
#if defined(RAM)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : {} > RAMM0, PAGE = 0
#else
ramfuncs : > RAMM0, PAGE = 0
#endif
#endif
.text :>> RAMLS0 | RAMLS1,
PAGE = 0
.cinit : > RAMLS23, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > RAMM0, PAGE = 0
.const : > RAMGS0, PAGE = 1
#else
.pinit : > RAMM0, PAGE = 0
.econst : > RAMGS0, PAGE = 1
#endif //__TI_EABI__
.switch : > RAMM0, PAGE = 0
#elif defined(_FLASH)
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
#if defined(__TI_EABI__)
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(RamfuncsRunStart),
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#else
.TI.ramfunc : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#else
ramfuncs : LOAD = FLASHC,
RUN = RAMLS1,
RUN_START(_RamfuncsRunStart),
LOAD_START(_RamfuncsLoadStart),
LOAD_SIZE(_RamfuncsLoadSize),
PAGE = 0
{
--library=driverlib.lib<flash.obj> (.text)
}
#endif
#endif
.text : > FLASHA, PAGE = 0
.cinit : > FLASHC, PAGE = 0
#if defined(__TI_EABI__)
.init_array : > FLASHC, PAGE = 0
.const : > FLASHB, PAGE = 1
#else
.pinit : > FLASHC, PAGE = 0
.econst : > FLASHB, PAGE = 1
#endif //__TI_EABI__
.switch : > FLASHC, PAGE = 0
#endif //defined(RAM)
FpuRegsFile : > FPU, PAGE = 1
.reset : > RESET, PAGE = 0, TYPE = DSECT // not used
.stack : > RAMLS5, PAGE = 1
.data : > RAMGS0, PAGE = 1
.sysmem : > RAMLS4, PAGE = 1
#if defined(__TI_EABI__)
.bss : > RAMGS3, PAGE = 1
.bss:.cio : > RAMLS4, PAGE = 1
.bss:output : > RAMGS2, PAGE = 1
#else
.cio : > RAMLS4, PAGE = 1
.ebss : > RAMGS3, PAGE = 1
.ebss:output : > RAMGS2, PAGE = 1
.esysmem : > RAMLS7, PAGE = 1
#endif //__TI_EABI__
}
//
//===========================================================================
// End of file.
//===========================================================================
//
@@ -0,0 +1,148 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH4, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS3
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
#else
.pinit : > FLASH1, ALIGN(8)
.ebss : > RAMLS5
.esysmem : > RAMLS5
.cio : > RAMLS5
/* Initalized sections go in Flash */
.econst : >> FLASH4 | FLASH5, ALIGN(8)
#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(8)
#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(8)
#endif
#if defined(__TI_EABI__)
.delayFunc :> FLASH0,
LOAD_START(delayFuncStart),
LOAD_END(delayFuncEnd)
#else
.delayFunc :> FLASH0,
LOAD_START(_delayFuncStart),
LOAD_END(_delayFuncEnd)
#endif
.try_sect : > RAMLS7
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,122 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5 | RAMLS6
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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
#if defined(__TI_EABI__)
.delayFunc :> RAMLS0,
LOAD_START(delayFuncStart),
LOAD_END(delayFuncEnd)
#else
.delayFunc :> RAMLS0,
LOAD_START(_delayFuncStart),
LOAD_END(_delayFuncEnd)
#endif
.try_sect : > RAMLS7
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,112 @@
MEMORY
{
/* BEGIN is used for the "boot to Flash" bootloader mode */
BEGIN : origin = 0x080000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
RAMD0 : origin = 0x00C000, length = 0x000800
RAMD1 : origin = 0x00C800, length = 0x000800
RAMLS03 : origin = 0x008000, length = 0x002000
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 = 0x001FF0 /* on-chip Flash */
// FLASH13_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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(8)
.text : >> FLASH1 | FLASH2 | FLASH3 | FLASH4, ALIGN(8)
.cinit : > FLASH1, ALIGN(8)
.switch : > FLASH1, ALIGN(8)
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
.init_array : > FLASH1, ALIGN(8)
.bss : > RAMLS5
.bss:output : > RAMLS4
.bss:cio : > RAMLS5
.data : > RAMLS5
.sysmem : > RAMLS5
/* Initalized sections go in Flash */
.const : > FLASH5, ALIGN(8)
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
DataBufferSection : > RAMM0, ALIGN(8)
GROUP
{
.TI.ramfunc
{ -l F2838x_C28x_FlashAPI.lib}
} LOAD = FLASH3,
RUN = RAMLS03,
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,86 @@
MEMORY
{
/* Flash sectors */
CMBANK0_RESETISR : origin = 0x00200000, length = 0x00000008 /* Boot to Flash Entry Point */
CMBANK0_SECTOR0 : origin = 0x00200008, length = 0x00003FF7
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 = 0x00000800
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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, ALIGN(16)
.vftable : > CMBANK0_SECTOR0, ALIGN(16) /* Application placed vector table in Flash*/
.vtable : > S0RAM /* Application placed vector table in RAM*/
.text : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.cinit : > CMBANK0_SECTOR0, ALIGN(16)
.pinit : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.switch : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : >> CMBANK0_SECTOR0 | CMBANK0_SECTOR1, ALIGN(16)
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
DataBufferSection : > S3RAM, ALIGN(16)
GROUP
{
.TI.ramfunc
{ -l F2838x_CM_FlashAPI.lib}
} LOAD = CMBANK0_SECTOR0,
RUN = C0RAM,
LOAD_START(RamfuncsLoadStart),
LOAD_SIZE(RamfuncsLoadSize),
LOAD_END(RamfuncsLoadEnd),
RUN_START(RamfuncsRunStart),
RUN_SIZE(RamfuncsRunSize),
RUN_END(RamfuncsRunEnd),
ALIGN(16)
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,68 @@
/* This linker command file is to be included if user wants to use the DCSM
* feature on the device DCSM means Dual Zone Code Security Module. This
* linker command file works as an addendum to the already existing Flash/RAM
* linker command file that the project has.
* The sections in the *_dcsm_zxotp.asm source file is linked as per the
* commands given in the file
* NOTE - Once users are confident that they want to program the passwords in
* OTP, the DSECT section type can be removed.
*
*/
MEMORY
{
/* DCSM Z1 & Z2 Zone Select Contents (!!Movable!!) */
/* Z1 OTP. Z1 password locations / Flash and RAM partitioning */
DCSM_OTP_Z1_LINK : origin = 0x78000, length = 0x00006
DCSM_OTP_Z1_JLM_ENABLE : origin = 0x78006, length = 0x00002
DCSM_OTP_Z1_GPREG : origin = 0x78008, length = 0x00008
DCSM_OTP_Z1_PSWD_LOCK : origin = 0x78010, length = 0x00002
DCSM_OTP_Z1_CRC_LOCK : origin = 0x78012, length = 0x00002
DCSM_OTP_Z1_JTAG_PSWDH : origin = 0x78014, length = 0x00004
DCSM_OTP_Z1_CMAC_KEY : origin = 0x78018, length = 0x00008
DCSM_ZSEL_Z1_P0 : origin = 0x78020, length = 0x000020
/* Z2 OTP. Z2 password locations / Flash and RAM partitioning */
DCSM_OTP_Z2_LINK : origin = 0x78200, length = 0x00006
DCSM_OTP_Z2_RSVD : origin = 0x78206, length = 0x00002
DCSM_OTP_Z2_GPREG : origin = 0x78208, length = 0x00008
DCSM_OTP_Z2_PSWD_LOCK : origin = 0x78210, length = 0x00002
DCSM_OTP_Z2_CRC_LOCK : origin = 0x78212, length = 0x00002
DCSM_OTP_Z2_RSVD1 : origin = 0x78214, length = 0x0000C
DCSM_ZSEL_Z2_P0 : origin = 0x78220, length = 0x000020
}
SECTIONS
{
/* The following section definitions are for DCSM examples */
ZONE1_RAM : > RAMLS2
UNSECURE_RAM : > RAMLS4
CSMKEY_RAM : > RAMD0
/* The following section definitions are generic for DCSM */
dcsm_zsel_z1 : > DCSM_ZSEL_Z1_P0, type = DSECT
dcsm_zsel_z2 : > DCSM_ZSEL_Z2_P0, type = DSECT
dcsm_z1otp_link_pointer : > DCSM_OTP_Z1_LINK, type = DSECT
dcsm_z2otp_link_pointer : > DCSM_OTP_Z2_LINK, type = DSECT
dcsm_z1otp_jlm_enable : > DCSM_OTP_Z1_JLM_ENABLE, type = DSECT
dcsm_rsvd_z2 : > DCSM_OTP_Z2_RSVD, type = DSECT
dcsm_z1otp_gpreg : > DCSM_OTP_Z1_GPREG, type = DSECT
dcsm_z2otp_gpreg : > DCSM_OTP_Z2_GPREG, type = DSECT
dcsm_z1otp_pswd_lock : > DCSM_OTP_Z1_PSWD_LOCK, type = DSECT
dcsm_z2otp_pswd_lock : > DCSM_OTP_Z2_PSWD_LOCK, type = DSECT
dcsm_z1otp_crc_lock : > DCSM_OTP_Z1_CRC_LOCK, type = DSECT
dcsm_z2otp_crc_lock : > DCSM_OTP_Z2_CRC_LOCK, type = DSECT
dcsm_z1otp_jtag_pswdh : > DCSM_OTP_Z1_JTAG_PSWDH, type = DSECT
dcsm_rsvd1_z2 : > DCSM_OTP_Z2_RSVD1, type = DSECT
dcsm_z1otp_cmac_key : > DCSM_OTP_Z1_CMAC_KEY, type = DSECT
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,112 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5 | RAMLS6
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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
FPUmathTables : >> RAMLS6 | RAMLS7
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,112 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
/* 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 | RAMLS1 | RAMLS2 | RAMLS3
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMLS5
.bss:output : > RAMLS3
.init_array : > RAMM0
.const : > RAMLS5 | RAMLS6
.data : > RAMLS5
.sysmem : > RAMLS4
#else
.pinit : > RAMM0
.ebss : >> RAMLS5 | RAMLS6
.econst : > RAMLS5
.esysmem : > RAMLS5
#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
FPU64mathTables : > RAMGS6
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,73 @@
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 = 0x00002000
C0RAM : origin = 0x1FFFE000, length = 0x00002000
BOOT_RSVD : origin = 0x20000000, length = 0x00000800 /* Part of S0, BOOT rom will use this for stack */
S0RAM_kernelcopy : origin = 0x20000800, length = 0x00000400 /* Boot to RAM Entry Point */
S0RAM_RESETISR : origin = 0x20000C00, length = 0x00000010
S0RAM_VTABLE : origin = 0x20000C10, length = 0x000013F0
S0RAM_code : origin = 0x20002000, length = 0x00002000
S1RAM : origin = 0x20004000, length = 0x00004000
S2RAM : origin = 0x20008000, length = 0x00004000
S3RAM : origin = 0x2000C000, length = 0x00004000
E0RAM : origin = 0x20010000, length = 0x00004000
CPU1TOCMMSGRAM0_kernelcopy : origin = 0x20080000, length = 0x00000500
CPU1TOCMMSGRAM0_regular : origin = 0x20080500, length = 0x00000300
CPU1TOCMMSGRAM1 : origin = 0x20080800, length = 0x00000800
CMTOCPU1MSGRAM0 : origin = 0x20082000, length = 0x00000800
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 : > S0RAM_VTABLE /* Application placed vector table */
.text : >> S0RAM_code | S1RAM
.TI.ramfunc : > C0RAM
.cinit : > C0RAM
.pinit : > C0RAM
.switch : > C0RAM
.sysmem : > S2RAM
.stack : > C1RAM
.ebss : > C1RAM
.econst : > C1RAM
.esysmem : > C1RAM
.data : > S3RAM
.bss : > S3RAM
.const : > C1RAM
MSGRAM_CM_TO_CPU1 : > CMTOCPU1MSGRAM0, type=NOINIT
MSGRAM_CM_TO_CPU2 : > CMTOCPU2MSGRAM0, type=NOINIT
MSGRAM_CPU1_TO_CM : > CPU1TOCMMSGRAM0_regular, type=NOINIT
MSGRAM_CPU2_TO_CM : > CPU2TOCMMSGRAM0, type=NOINIT
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,108 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
//RAMGS1_code : origin = 0x00E000, length = 0x000B00
//RAMGS1_data :origin = 0xEB000, length = 0x400
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
CPU1TOCPU2RAM : origin = 0x03A000, length = 0x000800
CPU2TOCPU1RAM : origin = 0x03B000, length = 0x000800
CPUTOCMRAM_0 : origin = 0x039000, length = 0x000400
CPUTOCMRAM_1 : origin = 0x039400, length = 0x000400
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 : >>RAMGS1 | RAMGS2 | RAMGS3 | RAMGS4
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMGS5
.data : > RAMGS5
.const : > RAMGS5
.init_arry : > RAMM0
.sysmem : > RAMGS5
#else
.pinit : > RAMM0
.ebss : > RAMGS5
.econst : > RAMGS5
.esysmem : > RAMGS5
#endif
Filter_RegsFile : > RAMGS5
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : > RAMGS5
#else
ramfuncs : > RAMGS5
#endif
#endif
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM, type=NOINIT
MSGRAM_CPU2_TO_CPU1 > CPU2TOCPU1RAM, type=NOINIT
MSGRAM_CPU_TO_CM > CPUTOCMRAM_0, type=NOINIT
MSGRAM_CPU_TO_CM_COPY_TO_S0_RAM > CPUTOCMRAM_1, type=NOINIT
MSGRAM_CM_TO_CPU > CMTOCPURAM, type=NOINIT
/* The following section definition are for SDFM examples */
Filter1_RegsFile : > RAMGS10, fill=0x1111
Filter2_RegsFile : > RAMGS11, fill=0x2222
Filter3_RegsFile : > RAMGS12, fill=0x3333
Filter4_RegsFile : > RAMGS13, fill=0x4444
Difference_RegsFile : >RAMGS14, fill=0x3333
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,104 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
CPU1TOCPU2RAM_0 : origin = 0x03A000, length = 0x000400
CPU1TOCPU2RAM_1 : origin = 0x03A400, length = 0x000400
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 : >>RAMGS1 | RAMGS2 | RAMGS3 | RAMGS4
.cinit : > RAMM0
.switch : > RAMM0
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMM1
#if defined(__TI_EABI__)
.bss : > RAMGS5
.data : > RAMGS5
.const : > RAMGS5
.init_arry : > RAMM0
.sysmem : > RAMGS5
#else
.pinit : > RAMM0
.ebss : > RAMGS5
.econst : > RAMGS5
.esysmem : > RAMGS5
#endif
Filter_RegsFile : > RAMGS5
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : > RAMGS5
#else
ramfuncs : > RAMGS5
#endif
#endif
MSGRAM_CPU1_TO_CPU2 > CPU1TOCPU2RAM_0, type=NOINIT
MSGRAM_CPU1_TO_CPU2_COPY_TO_M1_RAM > CPU1TOCPU2RAM_1, 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 */
Filter1_RegsFile : > RAMGS10, fill=0x1111
Filter2_RegsFile : > RAMGS11, fill=0x2222
Filter3_RegsFile : > RAMGS12, fill=0x3333
Filter4_RegsFile : > RAMGS13, fill=0x4444
Difference_RegsFile : >RAMGS14, fill=0x3333
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,108 @@
MEMORY
{
/* BEGIN is used for the "boot to SARAM" bootloader mode */
BEGIN : origin = 0x000000, length = 0x000002
BOOT_RSVD : origin = 0x000002, length = 0x0001AF /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x0001B1, length = 0x00024F
RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */
// RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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
//RAMGS3_code : origin = 0x010000, length = 0x000A00
//RAMGS3_data : origin = 0x0010A00, length = 0x500
RAMGS4 : origin = 0x011000, length = 0x001000
RAMGS5 : origin = 0x012000, length = 0x001000
RAMGS6 : origin = 0x013000, length = 0x001000
RAMGS7_begin : origin = 0x014000, length = 0x000002
RAMGS7_code : origin = 0x014002, length = 0x000FFD
//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 = 0x000FF8
// RAMGS15_RSVD : origin = 0x01CFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */
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 : > RAMGS7_begin
.text : >> RAMGS7_code | RAMGS8
.cinit : > RAMGS6
.switch : > RAMGS6
.reset : > RESET, TYPE = DSECT /* not used, */
.stack : > RAMGS0
#if defined(__TI_EABI__)
.bss : > RAMGS0
.data : > RAMGS0
.const : > RAMGS0
.init_arry : > RAMGS6
.sysmem : > RAMGS0
#else
.pinit : > RAMGS6
.ebss : > RAMGS0
.econst : > RAMGS0
.esysmem : > RAMGS0
#endif
Filter_RegsFile : > RAMGS0
#ifdef __TI_COMPILER_VERSION__
#if __TI_COMPILER_VERSION__ >= 15009000
.TI.ramfunc : > RAMGS9
#else
ramfuncs : > RAMGS9
#endif
#endif
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 */
Filter1_RegsFile : > RAMGS10, fill=0x1111
Filter2_RegsFile : > RAMGS11, fill=0x2222
Filter3_RegsFile : > RAMGS12, fill=0x3333
Filter4_RegsFile : > RAMGS13, fill=0x4444
Difference_RegsFile : >RAMGS14, fill=0x3333
}
/*
//===========================================================================
// End of file.
//===========================================================================
*/
@@ -0,0 +1,114 @@
//#############################################################################
//
// FILE: cm.h
//
// TITLE: Communication manager setup for examples.
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "driverlib_cm.h"
//*****************************************************************************
//
// Defines related to clock configuration. This frequency will be the CM clock
// frequency driven by c28x.
//
//*****************************************************************************
#define CM_CLK_FREQ 125000000U
//*****************************************************************************
//
// Macro to call SysCtl_delay() to achieve a delay in microseconds. The macro
// will convert the desired delay in microseconds to the count value expected
// by the function. \b x is the number of microseconds to delay.
// The SysCtl_delay() function takes around 3 cycles per iteration plus 9
// cycles of overhead which needs to be accounted for when converting the
// microseconds delay into the number of delay loop iterations passed to the
// SysCtl_delay() function.
//
// Note that 3 cycles per iteration is valid if SysCtl_delay function resides
// in CxRAM. SxRAM is 2x slower than CxRAM and hence will consume 6 cycles per
// iteration.
//
//*****************************************************************************
#define DEVICE_DELAY_US(x) SysCtl_delay(((((long double)(x)) / (1000000.0L / \
(long double)CM_CLK_FREQ)) - 9.0L) / 3.0L)
//*****************************************************************************
//
// Defines, Globals, and Header Includes related to Flash Support
//
//*****************************************************************************
#ifdef _FLASH
#include <stddef.h>
extern uint16_t RamfuncsLoadStart;
extern uint16_t RamfuncsLoadEnd;
extern uint16_t RamfuncsLoadSize;
extern uint16_t RamfuncsRunStart;
extern uint16_t RamfuncsRunEnd;
extern uint16_t RamfuncsRunSize;
#define DEVICE_FLASH_WAITSTATES 2
#endif
//*****************************************************************************
//
// Defines for pin numbers and other GPIO configuration
//
//*****************************************************************************
//
// LEDs
//
#define DEVICE_GPIO_PIN_LED1 31U // GPIO number for LD2
#define DEVICE_GPIO_PIN_LED2 34U // GPIO number for LD3
//*****************************************************************************
//
// Function Prototypes
//
//*****************************************************************************
extern void CM_init(void);
extern void CM_enableAllPeripherals(void);
extern void __error__(const char *filename, uint32_t line);
@@ -0,0 +1,520 @@
//#############################################################################
//
// FILE: device.h
//
// TITLE: Device setup for examples.
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 __DEVICE_H__
#define __DEVICE_H__
#ifdef __cplusplus
extern "C"
{
#endif
//
// Included Files
//
#include "driverlib.h"
#if (!defined(CPU1) && !defined(CPU2))
#error "You must define CPU1 or CPU2 in your project properties. Otherwise, \
the offsets in your header files will be inaccurate."
#endif
#if (defined(CPU1) && defined(CPU2))
#error "You have defined both CPU1 and CPU2 in your project properties. Only \
a single CPU should be defined."
#endif
//
// Check for invalid compile flags
//
#if defined(__TMS320C28XX_TMU1__)
#error "Invalid TMU Configuration"
#endif
//*****************************************************************************
//
// Defines for pin numbers and other GPIO configuration
//
//*****************************************************************************
//
// LEDs
//
#define DEVICE_GPIO_PIN_LED1 31U // GPIO number for LD1
#define DEVICE_GPIO_PIN_LED2 34U // GPIO number for LD2
#define DEVICE_GPIO_PIN_LED3 145U // GPIO number for LD7 (EtherCAT Error LED)
#define DEVICE_GPIO_PIN_LED4 146U // GPIO number for LD8 (EtherCAT Run LED)
#define DEVICE_GPIO_CFG_LED1 GPIO_31_GPIO31 // "pinConfig" for LD1
#define DEVICE_GPIO_CFG_LED2 GPIO_34_GPIO34 // "pinConfig" for LD2
#define DEVICE_GPIO_CFG_LED3 GPIO_145_GPIO145 // "pinConfig" for LD7
#define DEVICE_GPIO_CFG_LED4 GPIO_146_GPIO146 // "pinConfig" for LD8
//
// SCI for USB-to-UART adapter on FTDI chip
//
#define DEVICE_GPIO_PIN_SCIRXDA 28U // GPIO number for SCI RX
#define DEVICE_GPIO_PIN_SCITXDA 29U // GPIO number for SCI TX
#define DEVICE_GPIO_CFG_SCIRXDA GPIO_28_SCIA_RX // "pinConfig" for SCI RX
#define DEVICE_GPIO_CFG_SCITXDA GPIO_29_SCIA_TX // "pinConfig" for SCI TX
//
// CANA
//
#define DEVICE_GPIO_PIN_CANTXA 37U // GPIO number for CANTXA
#define DEVICE_GPIO_PIN_CANRXA 36U // GPIO number for CANRXA
//
// CAN External Loopback
//
#define DEVICE_GPIO_CFG_CANRXA GPIO_36_CANA_RX // "pinConfig" for CANA RX
#define DEVICE_GPIO_CFG_CANTXA GPIO_37_CANA_TX // "pinConfig" for CANA TX
#define DEVICE_GPIO_CFG_CANRXB GPIO_10_CANB_RX // "pinConfig" for CANB RX
#define DEVICE_GPIO_CFG_CANTXB GPIO_12_CANB_TX // "pinConfig" for CANB TX
//
// MCAN
//
#define DEVICE_GPIO_CFG_MCANRXA GPIO_30_MCAN_RX // "pinConfig" for MCAN RX
#define DEVICE_GPIO_CFG_MCANTXA GPIO_31_MCAN_TX // "pinConfig" for MCAN TX
//
// FSI
//
#define DEVICE_GPIO_PIN_FSI_RXCLKA 9U // GPIO number for FSI RXCLKA
#define DEVICE_GPIO_PIN_FSI_RX0A 8U // GPIO number for FSI RX0A
#define DEVICE_GPIO_PIN_FSI_RX1A 10U // GPIO number for FSI RX1A
#define DEVICE_GPIO_PIN_FSI_RXCLKB 60U // GPIO number for FSI RXCLKB
#define DEVICE_GPIO_PIN_FSI_RX0B 58U // GPIO number for FSI RX0B
#define DEVICE_GPIO_PIN_FSI_RX1B 59U // GPIO number for FSI RX1B
#define DEVICE_GPIO_PIN_FSI_RXCLKC 14U // GPIO number for FSI RXCLKC
#define DEVICE_GPIO_PIN_FSI_RX0C 12U // GPIO number for FSI RX0C
#define DEVICE_GPIO_PIN_FSI_RX1C 13U // GPIO number for FSI RX1C
#define DEVICE_GPIO_CFG_FSI_TXCLK GPIO_27_FSITXA_CLK // "pinConfig" for FSI TXCLK
#define DEVICE_GPIO_CFG_FSI_TX0 GPIO_26_FSITXA_D0 // "pinConfig" for FSI TX0
#define DEVICE_GPIO_CFG_FSI_TX1 GPIO_25_FSITXA_D1 // "pinConfig" for FSI TX1
#define DEVICE_GPIO_CFG_FSI_RXCLKA GPIO_9_FSIRXA_CLK // "pinConfig" for FSI RXCLKA
#define DEVICE_GPIO_CFG_FSI_RX0A GPIO_8_FSIRXA_D0 // "pinConfig" for FSI RX0A
#define DEVICE_GPIO_CFG_FSI_RX1A GPIO_10_FSIRXA_D1 // "pinConfig" for FSI RX1A
#define DEVICE_GPIO_CFG_FSI_RXCLKB GPIO_60_FSIRXB_CLK // "pinConfig" for FSI RXCLKB
#define DEVICE_GPIO_CFG_FSI_RX0B GPIO_58_FSIRXB_D0 // "pinConfig" for FSI RX0B
#define DEVICE_GPIO_CFG_FSI_RX1B GPIO_59_FSIRXB_D1 // "pinConfig" for FSI RX1B
#define DEVICE_GPIO_CFG_FSI_RXCLKC GPIO_14_FSIRXC_CLK // "pinConfig" for FSI RXCLKC
#define DEVICE_GPIO_CFG_FSI_RX0C GPIO_12_FSIRXC_D0 // "pinConfig" for FSI RX0C
#define DEVICE_GPIO_CFG_FSI_RX1C GPIO_13_FSIRXC_D1 // "pinConfig" for FSI RX1C
//! --------------------------------
//! Signal | I2CA | I2CB
//! --------------------------------
//! SCL | GPIO105 | GPIO41
//! SDA | GPIO104 | GPIO40
//! --------------------------------
//I2CA GPIO pins
#define DEVICE_GPIO_PIN_SDAA 104
#define DEVICE_GPIO_PIN_SCLA 105
//I2CB GPIO pins
#define DEVICE_GPIO_PIN_SDAB 40
#define DEVICE_GPIO_PIN_SCLB 41
#define DEVICE_GPIO_CFG_SDAA GPIO_104_I2CA_SDA
#define DEVICE_GPIO_CFG_SCLA GPIO_105_I2CA_SCL
#define DEVICE_GPIO_CFG_SDAB GPIO_40_I2CB_SDA
#define DEVICE_GPIO_CFG_SCLB GPIO_41_I2CB_SCL
//*****************************************************************************
//
// Defines related to clock configuration
//
//*****************************************************************************
#ifdef USE_20MHZ_XTAL
//
// 20MHz XTAL on controlCARD. For use with SysCtl_getClock() and
// SysCtl_getAuxClock().
//
#define DEVICE_OSCSRC_FREQ 20000000U
//
// Define to pass to SysCtl_setClock(). Will configure the clock as follows:
// PLLSYSCLK = 20MHz (XTAL_OSC) * 40 (IMULT) / (2 (REFDIV) * 2 (ODIV) * 1(SYSDIV))
//
#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL | SYSCTL_IMULT(40) | \
SYSCTL_REFDIV(2) | SYSCTL_ODIV(2) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_1)
//
// 200MHz SYSCLK frequency based on the above DEVICE_SETCLOCK_CFG. Update the
// code below if a different clock configuration is used!
//
#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 40) / (2 * 2 * 1))
//
// 50MHz LSPCLK frequency based on the above DEVICE_SYSCLK_FREQ and a default
// low speed peripheral clock divider of 4. Update the code below if a
// different LSPCLK divider is used!
//
#define DEVICE_LSPCLK_FREQ (DEVICE_SYSCLK_FREQ / 4)
//
// Define to pass to SysCtl_setAuxClock(). Will configure the clock as follows:
// AUXPLLCLK = 20MHz (XTAL_OSC) * 50 (IMULT) / (2 (REFDIV) * 4 (ODIV) * 1(AUXPLLDIV) )
//
#define DEVICE_AUXSETCLOCK_CFG (SYSCTL_AUXPLL_OSCSRC_XTAL | SYSCTL_AUXPLL_IMULT(50) | \
SYSCTL_REFDIV(2U) | SYSCTL_ODIV(4U) | \
SYSCTL_AUXPLL_DIV_1 | SYSCTL_AUXPLL_ENABLE | \
SYSCTL_DCC_BASE_0)
//
// 125MHz AUXCLK frequency based on the above DEVICE_AUXSETCLOCK_CFG. Update
// the code below if a different clock configuration is used!
//
#define DEVICE_AUXCLK_FREQ ((DEVICE_OSCSRC_FREQ * 50) / (2 * 4 * 1))
#else // USE_25MHZ_XTAL
//
// 25MHz XTAL on controlCARD. For use with SysCtl_getClock() and
// SysCtl_getAuxClock().
//
#define DEVICE_OSCSRC_FREQ 25000000U
//
// Define to pass to SysCtl_setClock(). Will configure the clock as follows:
// PLLSYSCLK = 25MHz (XTAL_OSC) * 32 (IMULT) / (2 (REFDIV) * 2 (ODIV) * 1(SYSDIV))
//
#define DEVICE_SETCLOCK_CFG (SYSCTL_OSCSRC_XTAL_SE | SYSCTL_IMULT(32) | \
SYSCTL_REFDIV(2) | SYSCTL_ODIV(2) | \
SYSCTL_SYSDIV(1) | SYSCTL_PLL_ENABLE | \
SYSCTL_DCC_BASE_1)
//
// 200MHz SYSCLK frequency based on the above DEVICE_SETCLOCK_CFG. Update the
// code below if a different clock configuration is used!
//
#define DEVICE_SYSCLK_FREQ ((DEVICE_OSCSRC_FREQ * 32) / (2 * 2 * 1))
//
// 50MHz LSPCLK frequency based on the above DEVICE_SYSCLK_FREQ and a default
// low speed peripheral clock divider of 4. Update the code below if a
// different LSPCLK divider is used!
//
#define DEVICE_LSPCLK_FREQ (DEVICE_SYSCLK_FREQ / 4)
//
// Define to pass to SysCtl_setAuxClock(). Will configure the clock as follows:
// AUXPLLCLK = 25MHz (XTAL_OSC) * 40 (IMULT) / (2 (REFDIV) * 4 (ODIV) * 1(AUXPLLDIV) )
//
#define DEVICE_AUXSETCLOCK_CFG (SYSCTL_AUXPLL_OSCSRC_XTAL | SYSCTL_AUXPLL_IMULT(40) | \
SYSCTL_REFDIV(2U) | SYSCTL_ODIV(4U) | \
SYSCTL_AUXPLL_DIV_1 | SYSCTL_AUXPLL_ENABLE | \
SYSCTL_DCC_BASE_0)
//
// 125MHz AUXCLK frequency based on the above DEVICE_AUXSETCLOCK_CFG. Update
// the code below if a different clock configuration is used!
//
#define DEVICE_AUXCLK_FREQ ((DEVICE_OSCSRC_FREQ * 40) / (2 * 4 * 1))
#endif
//*****************************************************************************
//
// Macro to call SysCtl_delay() to achieve a delay in microseconds. The macro
// will convert the desired delay in microseconds to the count value expected
// by the function. \b x is the number of microseconds to delay.
//
//*****************************************************************************
#define DEVICE_DELAY_US(x) SysCtl_delay(((((long double)(x)) / (1000000.0L / \
(long double)DEVICE_SYSCLK_FREQ)) - 9.0L) / 5.0L)
//
// Defines for setting FSI clock speeds
//
#define FSI_PRESCALE_50MHZ 2U
#define FSI_PRESCALE_25MHZ 4U
#define FSI_PRESCALE_10MHZ 10U
#define FSI_PRESCALE_5MHZ 20U
//*****************************************************************************
//
// Macros related to booting CPU2 and CM. These can be used while invoking the
// functions Device_bootCPU2() and Device_bootCM().
//
// Note that the macros CM_BOOT_FREQ_125MHZ and CPU2_BOOT_FREQ_200MHZ are used
// in the functions Device_bootCM() and Device_bootCPU2() respectively. Please
// update the function and the macros if you are using a different clock
// frequency.
//
//*****************************************************************************
#ifdef CPU1
#define BOOT_KEY 0x5A000000UL
#define CM_BOOT_FREQ_125MHZ 0x7D00U
#define CPU2_BOOT_FREQ_200MHZ 0xC800U
#define BOOTMODE_BOOT_TO_FLASH_SECTOR0 0x03U
#define BOOTMODE_BOOT_TO_FLASH_SECTOR4 0x23U
#define BOOTMODE_BOOT_TO_FLASH_SECTOR8 0x43U
#define BOOTMODE_BOOT_TO_FLASH_SECTOR13 0x63U
#define BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR0 0x0AU
#define BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR4 0x2AU
#define BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR8 0x4AU
#define BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR13 0x6AU
#define BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM 0x0CU
#define BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_S0RAM 0x0CU
#define BOOTMODE_BOOT_TO_M0RAM 0x05U
#define BOOTMODE_BOOT_TO_S0RAM 0x05U
#define BOOTMODE_BOOT_TO_USEROTP 0x0BU
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_100W 0x10000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_200W 0x20000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_300W 0x30000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_400W 0x40000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_500W 0x50000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_600W 0x60000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_700W 0x70000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_800W 0x80000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_900W 0x90000U
#define BOOTMODE_IPC_MSGRAM_COPY_LENGTH_1000W 0xA0000U
#endif
//*****************************************************************************
//
// Defines, Globals, and Header Includes related to Flash Support
//
//*****************************************************************************
#ifdef _FLASH
#include <stddef.h>
#ifndef CMDTOOL
extern uint16_t RamfuncsLoadStart;
extern uint16_t RamfuncsLoadEnd;
extern uint16_t RamfuncsLoadSize;
extern uint16_t RamfuncsRunStart;
extern uint16_t RamfuncsRunEnd;
extern uint16_t RamfuncsRunSize;
#endif
#define DEVICE_FLASH_WAITSTATES 3
#endif
//*****************************************************************************
//
// Function Prototypes
//
//*****************************************************************************
//*****************************************************************************
//
//! \addtogroup device_api
//! @{
//
//*****************************************************************************
//*****************************************************************************
//
//! @brief Function to initialize the device. Primarily initializes system control to a
//! known state by disabling the watchdog, setting up the SYSCLKOUT frequency,
//! and enabling the clocks to the peripherals.
//!
//! \param None.
//! \return None.
//
//*****************************************************************************
extern void Device_init(void);
#ifdef CPU1
//*****************************************************************************
//
//! @brief Function to boot CPU2.
//!
//! \param bootmode is the mode in which CPU2 should boot.
//!
//! Available bootmodes :
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR0
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR4
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR8
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR13
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR0
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR4
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR8
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR13
//! - BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM
//! - BOOTMODE_BOOT_TO_M0RAM
//! - BOOTMODE_BOOT_TO_USEROTP
//!
//! Note that while using BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM,
//! BOOTMODE_IPC_MSGRAM_COPY_LENGTH_xxxW must be ORed with the bootmode parameter
//!
//! This function must be called after Device_init function
//! \return None.
//
//*****************************************************************************
extern void Device_bootCPU2(uint32_t bootmode);
//*****************************************************************************
//
//! @brief Function to boot CM
//!
//! \param bootmode is the mode in which CM should boot.
//!
//! Available bootmodes :
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR0
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR4
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR8
//! - BOOTMODE_BOOT_TO_FLASH_SECTOR13
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR0
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR4
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR8
//! - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR13
//! - BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_S0RAM
//! - BOOTMODE_BOOT_TO_S0RAM
//! - BOOTMODE_BOOT_TO_USEROTP
//!
//! Note that while using BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM,
//! BOOTMODE_IPC_MSGRAM_COPY_LENGTH_xxxW must be ORed with the bootmode parameter
//!
//! This function must be called after Device_init function
//! \return None.
//
//*****************************************************************************
extern void Device_bootCM(uint32_t bootmode);
//*****************************************************************************
//
//!
//! @brief Function to verify the XTAL frequency
//! \param freq is the XTAL frequency in MHz
//! \return The function return true if the the actual XTAL frequency matches with the
//! input value
//
//*****************************************************************************
extern bool Device_verifyXTAL(float freq);
#endif
//*****************************************************************************
//!
//!
//! @brief Function to turn on all peripherals, enabling reads and writes to the
//! peripherals' registers.
//!
//! Note that to reduce power, unused peripherals should be disabled.
//!
//! @param None
//! @return None
//
//*****************************************************************************
extern void Device_enableAllPeripherals(void);
//*****************************************************************************
//!
//!
//! @brief Function to disable pin locks on GPIOs.
//!
//! @param None
//! @return None
//
//*****************************************************************************
extern void Device_initGPIO(void);
//*****************************************************************************
//!
//! @brief Function to enable pullups for the unbonded GPIOs on the 176PTP package:
//! GPIOs Grp Bits
//! 95-132 C 31
//! D 31:0
//! E 4:0
//! 134-168 E 31:6
//! F 8:0
//!
//! @param None
//! @return None
//
//*****************************************************************************
extern void Device_enableUnbondedGPIOPullupsFor176Pin(void);
//*****************************************************************************
//!
//! @brief Function to enable pullups for the unbonded GPIOs on the
//! 176PTP package.
//!
//! @param None
//! @return None
//
//*****************************************************************************
extern void Device_enableUnbondedGPIOPullups(void);
//*****************************************************************************
//!
//! @brief Error handling function to be called when an ASSERT is violated
//!
//! @param *filename File name in which the error has occurred
//! @param line Line number within the file
//! @return None
//
//*****************************************************************************
extern void __error__(const char *filename, uint32_t line);
//*****************************************************************************
//
// Close the Doxygen group.
//! @}
//
//*****************************************************************************
#ifdef __cplusplus
}
#endif
#endif // __DEVICE_H__
@@ -0,0 +1,97 @@
//#############################################################################
//
// FILE: driverlib.h
//
// TITLE: C28x Driverlib Header File
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 DRIVERLIB_H
#define DRIVERLIB_H
#include "inc/hw_memmap.h"
#include "adc.h"
#include "asysctl.h"
#include "bgcrc.h"
#include "can.h"
#include "cla.h"
#include "clb.h"
#include "cmpss.h"
#include "cpu.h"
#include "cputimer.h"
#include "dac.h"
#include "dcc.h"
#include "dcsm.h"
#include "debug.h"
#include "dma.h"
#include "ecap.h"
#include "emif.h"
#include "epwm.h"
#include "eqep.h"
#include "erad.h"
#include "escss.h"
#include "flash.h"
#include "fsi.h"
#include "gpio.h"
#include "hrcap.h"
#include "hrpwm.h"
#include "i2c.h"
#include "interrupt.h"
#include "ipc.h"
#include "mcbsp.h"
#include "memcfg.h"
#include "pin_map.h"
#include "pmbus.h"
#include "sci.h"
#include "sdfm.h"
#include "spi.h"
#include "sysctl.h"
#include "usb.h"
#include "xbar.h"
//
// Include MCAN driverlib header only if bitfield header is not already included
//
#ifndef F2838x_MCAN_H
#include "mcan.h"
#endif
#include "driver_inclusive_terminology_mapping.h"
#endif // end of DRIVERLIB_H definition
@@ -0,0 +1,73 @@
//#############################################################################
//
// FILE: driverlib_cm.h
//
// TITLE: CM Driverlib Header File
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 DRIVERLIB_CM_H
#define DRIVERLIB_CM_H
#include "inc/hw_memmap.h"
#include "aes.h"
#include "can.h"
#include "cmmpu.h"
#include "cputimer.h"
#include "dcsm.h"
#include "debug.h"
#include "escss.h"
#include "ethernet.h"
#include "flash.h"
#include "gcrc.h"
#include "gpio.h"
#include "i2c.h"
#include "interrupt.h"
#include "ipc.h"
#include "mcan.h"
#include "memcfg.h"
#include "mpu.h"
#include "ssi.h"
#include "sysctl.h"
#include "systick.h"
#include "uart.h"
#include "udma.h"
#include "usb.h"
#endif // end of DRIVERLIB_CM_H definition
@@ -0,0 +1,90 @@
//###########################################################################
//
// FILE: f2838x_adc_defines.h
//
// TITLE: #defines used in ADC examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_ADC_DEFINES_H
#define F2838x_ADC_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
//definitions for specifying an ADC
//
#define ADC_ADCA 0
#define ADC_ADCB 1
#define ADC_ADCC 2
#define ADC_ADCD 3
//
// Definitions for selecting ADC resolution
//
#ifndef _DUAL_HEADERS
#define ADC_RESOLUTION_12BIT 0
#define ADC_RESOLUTION_16BIT 1
#else
#define ADC_BITRESOLUTION_12BIT 0
#define ADC_BITRESOLUTION_16BIT 1
#endif
//
// Definitions for selecting ADC signal mode
// (single-ended mode is only a valid mode for 12-bit resolution)
//
#define ADC_SIGNALMODE_SINGLE 0
#define ADC_SIGNALMODE_DIFFERENTIAL 1
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_ADC_DEFINES_H
//
// End of file
//
@@ -0,0 +1,138 @@
//#############################################################################
//
// FILE: f2838x_can_defines.h
//
// TITLE: Common defines used in CAN Test Cases
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_CAN_DEFINES_H
#define F2838x_CAN_DEFINES_H
#ifndef _DUAL_HEADERS
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// Reset Values
//
#define CAN_RESET_VALUE_ZERO 0x00000000
#define CAN_CTL_RESET_VALUE 0x00001401
#define CAN_ES_RESET_VALUE 0x00000007
#define CAN_BTR_RESET_VALUE 0x00002301
#define CAN_REL_RESET_VALUE 0xA3170504
#define CAN_RAM_INIT_RESET_VALUE 0x00000005
#define CAN_IF_CMD_RESET_VALUE 0x00000001
#define CAN_IF_MASK_RESET_VALUE 0xFFFFFFFF
//
// Register value when Peripheral Clock is Disabled
//
#define CAN_MODULE_CLK_DISABLE_VALUE 0x00000000
//
// Bit field definition of CAN_CTL register.
//
#define CAN_CTL_INIT 0x00000001 // Initialization
#define CAN_CTL_IE0 0x00000002 // Interrupt Enable 0
#define CAN_CTL_SIE 0x00000004 // Status Interrupt Enable
#define CAN_CTL_EIE 0x00000008 // Error Interrupt Enable
#define CAN_CTL_DAR 0x00000020 // Disable Automatic-Retransmission
#define CAN_CTL_CCE 0x00000040 // Configuration Change Enable
#define CAN_CTL_TEST 0x00000080 // Test Mode Enable
#define CAN_CTL_IDS 0x00000100 // Interruption Debug Support Enable
#define CAN_CTL_ABO 0x00000200 // Auto-Bus On Enable
#define CAN_CTL_PMD_S 10
#define CAN_CTL_PMD_M 0x00003C00 // Parity/SECDED Enable
#define CAN_CTL_SWR 0x00008000 // Software Reset Enable
#define CAN_CTL_INITDBG 0x00010000 // Debug Mode Status
#define CAN_CTL_IE1 0x00020000 // Interrupt Enable 1
#define CAN_CTL_DE1 0x00040000 // Enable DMA request line
#define CAN_CTL_DE2 0x00080000 // Enable DMA request line
#define CAN_CTL_DE3 0x00100000 // Enable DMA request line
//
// Bit field definition of CAN_IF1_CMD register.
//
#define CAN_IF1_CMD_MESSNUM_S 0
#define CAN_IF1_CMD_MESSNUM_M 0x000000FF // Message Number
#define CAN_IF1CMD_DMAACTIVE 0x00004000 // DMA Status
#define CAN_IF1_CMD_BUSY 0x00008000 // Busy Flag
#define CAN_IF1_CMD_DATAB 0x00010000 // Access Data B
#define CAN_IF1_CMD_DATAA 0x00020000 // Access Data A
#define CAN_IF1_CMD_TXRQSTNDAT 0x00040000 // Transmission Request Bit
#define CAN_IF1_CMD_CLRINTPND 0x00080000 // Clear Interrupt Pending Bit
#define CAN_IF1_CMD_CONTROL 0x00100000 // Access Control Bits
#define CAN_IF1_CMD_ARB 0x00200000 // Access Arbitration Bits
#define CAN_IF1_CMD_MASK 0x00400000 // Access Mask Bits
#define CAN_IF1_CMD_WR_RD 0x00800000 // Write and Read
//
// Bit field definition of CAN_IF2_CMD register.
//
#define CAN_IF2_CMD_MESSNUM_S 0
#define CAN_IF2_CMD_MESSNUM_M 0x000000FF // Message Number
#define CAN_IF2CMD_DMAACTIVE 0x00004000 // DMA Status
#define CAN_IF2_CMD_BUSY 0x00008000 // Busy Flag
#define CAN_IF2_CMD_DATAB 0x00010000 // Access Data B
#define CAN_IF2_CMD_DATAA 0x00020000 // Access Data A
#define CAN_IF2_CMD_TXRQSTNDAT 0x00040000 // Transmission Request Bit
#define CAN_IF2_CMD_CLRINTPND 0x00080000 // Clear Interrupt Pending Bit
#define CAN_IF2_CMD_CONTROL 0x00100000 // Access Control Bits
#define CAN_IF2_CMD_ARB 0x00200000 // Access Arbitration Bits
#define CAN_IF2_CMD_MASK 0x00400000 // Access Mask Bits
#define CAN_IF2_CMD_WR_RD 0x00800000 // Write and Read
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of _DUAL_HEADERS
#endif // - end of F2838x_CAN_DEFINES_H
//
// End of file
//
@@ -0,0 +1,260 @@
//###########################################################################
//
// FILE: f2838x_cla_defines.h
//
// TITLE: #defines used in CLA examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_CLA_DEFINES_H
#define F2838x_CLA_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// MCTL Register
//
#define CLA_FORCE_RESET 0x1
#define CLA_IACK_ENABLE 0x1
#define CLA_IACK_DISABLE 0x0
//
// MMEMCFG Register
//
#define CLA_CLA_SPACE 0x1
#define CLA_CPU_SPACE 0x0
//
// MIER Interrupt Enable Register
//
#define CLA_INT_ENABLE 0x1
#define CLA_INT_DISABLE 0x0
//
// Peripheral Interrupt Source Select define for DMAnCLASourceSelect Register
//
#define CLA_TRIG_NOPERPH 0
#define CLA_TRIG_ADCAINT1 1
#define CLA_TRIG_ADCAINT2 2
#define CLA_TRIG_ADCAINT3 3
#define CLA_TRIG_ADCAINT4 4
#define CLA_TRIG_ADCAEVT 5
#define CLA_TRIG_ADCBINT1 6
#define CLA_TRIG_ADCBINT2 7
#define CLA_TRIG_ADCBINT3 8
#define CLA_TRIG_ADCBINT4 9
#define CLA_TRIG_ADCBEVT 10
#define CLA_TRIG_ADCCINT1 11
#define CLA_TRIG_ADCCINT2 12
#define CLA_TRIG_ADCCINT3 13
#define CLA_TRIG_ADCCINT4 14
#define CLA_TRIG_ADCCEVT 15
#define CLA_TRIG_ADCDINT1 16
#define CLA_TRIG_ADCDINT2 17
#define CLA_TRIG_ADCDINT3 18
#define CLA_TRIG_ADCDINT4 19
#define CLA_TRIG_ADCDEVT 20
#define CLA_TRIG_XINT1 29
#define CLA_TRIG_XINT2 30
#define CLA_TRIG_XINT3 31
#define CLA_TRIG_XINT4 32
#define CLA_TRIG_XINT5 33
#define CLA_TRIG_EPWM1INT 36
#define CLA_TRIG_EPWM2INT 37
#define CLA_TRIG_EPWM3INT 38
#define CLA_TRIG_EPWM4INT 39
#define CLA_TRIG_EPWM5INT 40
#define CLA_TRIG_EPWM6INT 41
#define CLA_TRIG_EPWM7INT 42
#define CLA_TRIG_EPWM8INT 43
#define CLA_TRIG_EPWM9INT 44
#define CLA_TRIG_EPWM10INT 45
#define CLA_TRIG_EPWM11INT 46
#define CLA_TRIG_EPWM12INT 47
#define CLA_TRIG_EPWM13INT 48
#define CLA_TRIG_EPWM14INT 49
#define CLA_TRIG_EPWM15INT 50
#define CLA_TRIG_EPWM16INT 51
#define CLA_TRIG_MCANA_FEVT0 52
#define CLA_TRIG_MCANA_FEVT1 53
#define CLA_TRIG_MCANA_FEVT2 54
#define CLA_TRIG_TINT0 68
#define CLA_TRIG_TINT1 69
#define CLA_TRIG_TINT2 70
#define CLA_TRIG_MXEVTA 71
#define CLA_TRIG_MREVTA 72
#define CLA_TRIG_MXEVTB 73
#define CLA_TRIG_MREVTB 74
#define CLA_TRIG_ECAP1INT 75
#define CLA_TRIG_ECAP2INT 76
#define CLA_TRIG_ECAP3INT 77
#define CLA_TRIG_ECAP4INT 78
#define CLA_TRIG_ECAP5INT 79
#define CLA_TRIG_ECAP6INT 80
#define CLA_TRIG_ECAP7INT 81
#define CLA_TRIG_EQEP1INT 83
#define CLA_TRIG_EQEP2INT 84
#define CLA_TRIG_EQEP3INT 85
#define CLA_TRIG_ECAP6INT2 92
#define CLA_TRIG_ECAP7INT2 93
#define CLA_TRIG_SD1INT 95
#define CLA_TRIG_SD2INT 96
#define CLA_TRIG_ECATSYNC0INT 103
#define CLA_TRIG_ECATSYNC1INT 104
#define CLA_TRIG_PMBUSAINT 105
#define CLA_TRIG_SPITXINTA 109
#define CLA_TRIG_SPIRXINTA 110
#define CLA_TRIG_SPITXINTB 111
#define CLA_TRIG_SPIRXINTB 112
#define CLA_TRIG_SPITXINTC 113
#define CLA_TRIG_SPIRXINTC 114
#define CLA_TRIG_SPITXINTD 115
#define CLA_TRIG_SPIRXINTD 116
#define CLA_TRIG_CLB5INT 117
#define CLA_TRIG_CLB6INT 118
#define CLA_TRIG_CLB7INT 119
#define CLA_TRIG_CLB8INT 120
#define CLA_TRIG_CLA1CRC 121
#define CLA_TRIG_FSITXA_INT1 123
#define CLA_TRIG_FSITXA_INT2 124
#define CLA_TRIG_FSIRXA_INT1 125
#define CLA_TRIG_FSIRXA_INT2 126
#define CLA_TRIG_CLB1INT 127
#define CLA_TRIG_CLB2INT 128
#define CLA_TRIG_CLB3INT 129
#define CLA_TRIG_CLB4INT 130
#define CLA_TRIG_SD1DRINT1 143
#define CLA_TRIG_SD1DRINT2 144
#define CLA_TRIG_SD1DRINT3 145
#define CLA_TRIG_SD1DRINT4 146
#define CLA_TRIG_SD2DRINT1 147
#define CLA_TRIG_SD2DRINT2 148
#define CLA_TRIG_SD2DRINT3 149
#define CLA_TRIG_SD2DRINT4 150
#define CLA_TRIG_FSITXB_INT1 155
#define CLA_TRIG_FSITXB_INT2 156
#define CLA_TRIG_FSIRXB_INT1 157
#define CLA_TRIG_FSIRXB_INT2 158
#define CLA_TRIG_FSIRXC_INT1 159
#define CLA_TRIG_FSIRXC_INT2 160
#define CLA_TRIG_FSIRXD_INT1 161
#define CLA_TRIG_FSIRXD_INT2 162
#define CLA_TRIG_FSIRXE_INT1 163
#define CLA_TRIG_FSIRXE_INT2 164
#define CLA_TRIG_FSIRXF_INT1 165
#define CLA_TRIG_FSIRXF_INT2 166
#define CLA_TRIG_FSIRXG_INT1 167
#define CLA_TRIG_FSIRXG_INT2 168
#define CLA_TRIG_FSIRXH_INT1 169
#define CLA_TRIG_FSIRXH_INT2 170
#define Cla1ForceTask1andWait()asm(" IACK #0x0001"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT1 == 1);
#define Cla1ForceTask2andWait()asm(" IACK #0x0002"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT2 == 1);
#define Cla1ForceTask3andWait()asm(" IACK #0x0004"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT3 == 1);
#define Cla1ForceTask4andWait()asm(" IACK #0x0008"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT4 == 1);
#define Cla1ForceTask5andWait()asm(" IACK #0x0010"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT5 == 1);
#define Cla1ForceTask6andWait()asm(" IACK #0x0020"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT6 == 1);
#define Cla1ForceTask7andWait()asm(" IACK #0x0040"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT7 == 1);
#define Cla1ForceTask8andWait()asm(" IACK #0x0080"); \
asm(" RPT #3 || NOP"); \
while(Cla1Regs.MIRUN.bit.INT8 == 1);
#define Cla1ForceTask1() asm(" IACK #0x0001")
#define Cla1ForceTask2() asm(" IACK #0x0002")
#define Cla1ForceTask3() asm(" IACK #0x0004")
#define Cla1ForceTask4() asm(" IACK #0x0008")
#define Cla1ForceTask5() asm(" IACK #0x0010")
#define Cla1ForceTask6() asm(" IACK #0x0020")
#define Cla1ForceTask7() asm(" IACK #0x0040")
#define Cla1ForceTask8() asm(" IACK #0x0080")
#ifdef __cplusplus
}
#endif
#endif // - end of F2838x_CLA_DEFINES_H
//
// End of file
//
@@ -0,0 +1,130 @@
//###########################################################################
//
// FILE: f2838x_cla_typedefs.h
//
// TITLE: Variable type definitions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_CLA_TYPEDEFS_H_
#define F2838x_CLA_TYPEDEFS_H_
//
// Macros to manipulate pre-processor to generate a header file name
// at compile time that is based on the test name and can be used as
// an argument to #include
//
#define XSTRINGIZE(s) STRINGIZE(s)
#define STRINGIZE(s) #s
#define XCONCAT(x,y) CONCAT(x,y)
#define CONCAT(x,y) x##y
//
// Suppress warnings casting CLA pointers
//
#pragma diag_suppress 70,770,232
#ifdef __TMS320C28XX_CLA__
//
// For Portability, User Is Recommended To Use Following Data Type Size
// Definitions For 16-bit and 32-Bit Signed/Unsigned Integers:
//
// CLA does not support 64-bit types
// This definition is only to allow inclusion of the standard header files
// which do use 64-bit types
//
#if (!defined(F28_DATA_TYPES) && !defined(DSP28_DATA_TYPES))
#define F28_DATA_TYPES
#define DSP28_DATA_TYPES
typedef short int16;
typedef long int32;
typedef unsigned char Uint8;
typedef unsigned short Uint16;
typedef unsigned long Uint32;
typedef float float32;
typedef long double float64;
typedef struct { Uint32 low32; Uint32 high32; } Uint64;
typedef struct { int32 low32; int32 high32; } int64;
#else
#error f2838x_cla_typedefs.h must be included before f2838x_device.h or any other header \
file that redefines data types using the guard macros F28_DATA_TYPES or DSP28_DATA_TYPES
#endif //(!defined(F28_DATA_TYPES) && !defined(DSP28_DATA_TYPES))
#ifndef _TI_STD_TYPES
#define _TI_STD_TYPES
//
//These types are also defined in DSP/BIOS 5.x's <std.h> and the
//SYS/BIOS 6.x's <xdc/std.h> files. We need to protect their
//definition with the #ifndef/#define guard to avoid the duplicate
//definition warning.
//
//SYS/BIOS requires that the <xdc/std.h> file be included before
//any other .h files.
//
#endif
struct MSTF_SHADOW_BITS { // bits description
Uint16 LVF:1; // 0 Latched Overflow Flag
Uint16 LUF:1; // 1 Latched Underflow Flag
Uint16 NF:1; // 2 Negative Float Flag
Uint16 ZF:1; // 3 Zero Float Flag
Uint16 rsvd1:2; // 5:4 Reserved
Uint16 TF:1; // 6 Test Flag
Uint16 rsvd2:2; // 8:7 Reserved
Uint16 RNDF32:1; // 9 Rounding Mode
Uint16 rsvd3:1; // 10 Reserved
Uint16 MEALLOW:1; // 11 MEALLOW Status
Uint16 RPCL:4; // 15:12 Return PC: Low Portion
Uint16 RPCH:8; // 23:16 Return PC: High Portion
Uint16 rsvd4:8; // 31:24 Reserved
};
extern __cregister volatile unsigned int MSTF;
#endif //__TMS320C28XX_CLA__
#ifndef __TMS320C28XX__
#define __cregister
#endif //__TMS320C28xx__
#endif //F28X7x_CLA_TYPEDEFS_H_
//
// End of file
//
@@ -0,0 +1,140 @@
//###########################################################################
//
// FILE: f2838x_cputimers.h
//
// TITLE: F2838x Device CPUTIMERS Register Definitions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_CPUTIMERVARS_H
#define F2838x_CPUTIMERVARS_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Globals
//
struct CPUTIMER_VARS {
volatile struct CPUTIMER_REGS *RegsAddr;
Uint32 InterruptCount;
float CPUFreqInMHz;
float PeriodInUSec;
};
extern struct CPUTIMER_VARS CpuTimer0;
extern struct CPUTIMER_VARS CpuTimer1;
extern struct CPUTIMER_VARS CpuTimer2;
//
// Defines
//
//
// Start Timer:
//
#define StartCpuTimer0() CpuTimer0Regs.TCR.bit.TSS = 0
//
// Stop Timer:
//
#define StopCpuTimer0() CpuTimer0Regs.TCR.bit.TSS = 1
//
// Reload Timer With period Value:
//
#define ReloadCpuTimer0() CpuTimer0Regs.TCR.bit.TRB = 1
//
// Read 32-Bit Timer Value:
//
#define ReadCpuTimer0Counter() CpuTimer0Regs.TIM.all
//
// Read 32-Bit Period Value:
//
#define ReadCpuTimer0Period() CpuTimer0Regs.PRD.all
//
// Start Timer:
//
#define StartCpuTimer1() CpuTimer1Regs.TCR.bit.TSS = 0
#define StartCpuTimer2() CpuTimer2Regs.TCR.bit.TSS = 0
//
// Stop Timer:
//
#define StopCpuTimer1() CpuTimer1Regs.TCR.bit.TSS = 1
#define StopCpuTimer2() CpuTimer2Regs.TCR.bit.TSS = 1
//
// Reload Timer With period Value:
//
#define ReloadCpuTimer1() CpuTimer1Regs.TCR.bit.TRB = 1
#define ReloadCpuTimer2() CpuTimer2Regs.TCR.bit.TRB = 1
//
// Read 32-Bit Timer Value:
//
#define ReadCpuTimer1Counter() CpuTimer1Regs.TIM.all
#define ReadCpuTimer2Counter() CpuTimer2Regs.TIM.all
//
// Read 32-Bit Period Value:
//
#define ReadCpuTimer1Period() CpuTimer1Regs.PRD.all
#define ReadCpuTimer2Period() CpuTimer2Regs.PRD.all
//
// Function Prototypes
//
void InitCpuTimers(void);
void ConfigCpuTimer(struct CPUTIMER_VARS *Timer, float Freq, float Period);
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // end of F2838x_CPUTIMERVARS_H definition
//
// End of file
//
@@ -0,0 +1,61 @@
//###########################################################################
//
// FILE: f2838x_dac_defines.h
//
// TITLE: F2838x DAC support definitions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_DAC_DEFINES_H
#define F2838x_DAC_DEFINES_H
//
// Defines
//
#define REFERENCE_VDAC 0
#define REFERENCE_VREF 1
#define DACA 1
#define DACB 2
#define DACC 3
#endif // end of F2838x_DAC_DEFINES_H definition
//
// End of file
//
@@ -0,0 +1,274 @@
//###########################################################################
//
// FILE: f2838x_defaultisr.h
//
// TITLE: f2838x Device Default Interrupt Service Routines Definitions
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// 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 F2838X_DEFAULTISR_H
#define F2838X_DEFAULTISR_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Default Interrupt Service Routine Declarations:
// The following function prototypes are for the
// default ISR routines used with the default PIE vector table.
// This default vector table is found in the f2838x_pievect.h
// file.
//
interrupt void TIMER1_ISR(void);
interrupt void TIMER2_ISR(void);
interrupt void DATALOG_ISR(void);
interrupt void RTOS_ISR(void);
interrupt void EMU_ISR(void);
interrupt void NMI_ISR(void);
interrupt void ILLEGAL_ISR(void);
interrupt void USER1_ISR(void);
interrupt void USER2_ISR(void);
interrupt void USER3_ISR(void);
interrupt void USER4_ISR(void);
interrupt void USER5_ISR(void);
interrupt void USER6_ISR(void);
interrupt void USER7_ISR(void);
interrupt void USER8_ISR(void);
interrupt void USER9_ISR(void);
interrupt void USER10_ISR(void);
interrupt void USER11_ISR(void);
interrupt void USER12_ISR(void);
interrupt void ADCA1_ISR(void);
interrupt void ADCB1_ISR(void);
interrupt void ADCC1_ISR(void);
interrupt void XINT1_ISR(void);
interrupt void XINT2_ISR(void);
interrupt void ADCD1_ISR(void);
interrupt void TIMER0_ISR(void);
interrupt void WAKE_ISR(void);
interrupt void EPWM1_TZ_ISR(void);
interrupt void EPWM2_TZ_ISR(void);
interrupt void EPWM3_TZ_ISR(void);
interrupt void EPWM4_TZ_ISR(void);
interrupt void EPWM5_TZ_ISR(void);
interrupt void EPWM6_TZ_ISR(void);
interrupt void EPWM7_TZ_ISR(void);
interrupt void EPWM8_TZ_ISR(void);
interrupt void EPWM1_ISR(void);
interrupt void EPWM2_ISR(void);
interrupt void EPWM3_ISR(void);
interrupt void EPWM4_ISR(void);
interrupt void EPWM5_ISR(void);
interrupt void EPWM6_ISR(void);
interrupt void EPWM7_ISR(void);
interrupt void EPWM8_ISR(void);
interrupt void ECAP1_ISR(void);
interrupt void ECAP2_ISR(void);
interrupt void ECAP3_ISR(void);
interrupt void ECAP4_ISR(void);
interrupt void ECAP5_ISR(void);
interrupt void ECAP6_ISR(void);
interrupt void ECAP7_ISR(void);
interrupt void EQEP1_ISR(void);
interrupt void EQEP2_ISR(void);
interrupt void EQEP3_ISR(void);
interrupt void CLB1_ISR(void);
interrupt void CLB2_ISR(void);
interrupt void CLB3_ISR(void);
interrupt void CLB4_ISR(void);
interrupt void SPIA_RX_ISR(void);
interrupt void SPIA_TX_ISR(void);
interrupt void SPIB_RX_ISR(void);
interrupt void SPIB_TX_ISR(void);
interrupt void MCBSPA_RX_ISR(void);
interrupt void MCBSPA_TX_ISR(void);
interrupt void MCBSPB_RX_ISR(void);
interrupt void MCBSPB_TX_ISR(void);
interrupt void DMA_CH1_ISR(void);
interrupt void DMA_CH2_ISR(void);
interrupt void DMA_CH3_ISR(void);
interrupt void DMA_CH4_ISR(void);
interrupt void DMA_CH5_ISR(void);
interrupt void DMA_CH6_ISR(void);
interrupt void I2CA_ISR(void);
interrupt void I2CA_FIFO_ISR(void);
interrupt void I2CB_ISR(void);
interrupt void I2CB_FIFO_ISR(void);
interrupt void SCIC_RX_ISR(void);
interrupt void SCIC_TX_ISR(void);
interrupt void SCID_RX_ISR(void);
interrupt void SCID_TX_ISR(void);
interrupt void SCIA_RX_ISR(void);
interrupt void SCIA_TX_ISR(void);
interrupt void SCIB_RX_ISR(void);
interrupt void SCIB_TX_ISR(void);
interrupt void CANA0_ISR(void);
interrupt void CANA1_ISR(void);
interrupt void CANB0_ISR(void);
interrupt void CANB1_ISR(void);
interrupt void ADCA_EVT_ISR(void);
interrupt void ADCA2_ISR(void);
interrupt void ADCA3_ISR(void);
interrupt void ADCA4_ISR(void);
interrupt void ADCB_EVT_ISR(void);
interrupt void ADCB2_ISR(void);
interrupt void ADCB3_ISR(void);
interrupt void ADCB4_ISR(void);
interrupt void CLA1_1_ISR(void);
interrupt void CLA1_2_ISR(void);
interrupt void CLA1_3_ISR(void);
interrupt void CLA1_4_ISR(void);
interrupt void CLA1_5_ISR(void);
interrupt void CLA1_6_ISR(void);
interrupt void CLA1_7_ISR(void);
interrupt void CLA1_8_ISR(void);
interrupt void XINT3_ISR(void);
interrupt void XINT4_ISR(void);
interrupt void XINT5_ISR(void);
interrupt void MPOST_ISR(void);
interrupt void FMC_ISR(void);
interrupt void FPU_OFLOW_ISR(void);
interrupt void FPU_UFLOW_ISR(void);
interrupt void I2CA_HIGH_ISR(void);
interrupt void SYS_ERR_ISR(void);
interrupt void ECATSYNC0_ISR(void);
interrupt void ECAT_ISR(void);
interrupt void CIPC0_ISR(void);
interrupt void CIPC1_ISR(void);
interrupt void CIPC2_ISR(void);
interrupt void CIPC3_ISR(void);
interrupt void EPWM9_TZ_ISR(void);
interrupt void EPWM10_TZ_ISR(void);
interrupt void EPWM11_TZ_ISR(void);
interrupt void EPWM12_TZ_ISR(void);
interrupt void EPWM13_TZ_ISR(void);
interrupt void EPWM14_TZ_ISR(void);
interrupt void EPWM15_TZ_ISR(void);
interrupt void EPWM16_TZ_ISR(void);
interrupt void EPWM9_ISR(void);
interrupt void EPWM10_ISR(void);
interrupt void EPWM11_ISR(void);
interrupt void EPWM12_ISR(void);
interrupt void EPWM13_ISR(void);
interrupt void EPWM14_ISR(void);
interrupt void EPWM15_ISR(void);
interrupt void EPWM16_ISR(void);
interrupt void FSITXA1_ISR(void);
interrupt void FSITXA2_ISR(void);
interrupt void FSITXB1_ISR(void);
interrupt void FSITXB2_ISR(void);
interrupt void FSIRXA1_ISR(void);
interrupt void FSIRXA2_ISR(void);
interrupt void FSIRXB1_ISR(void);
interrupt void FSIRXB2_ISR(void);
interrupt void SDFM1_ISR(void);
interrupt void SDFM2_ISR(void);
interrupt void ECATRST_ISR(void);
interrupt void ECATSYNC1_ISR(void);
interrupt void SDFM1DR1_ISR(void);
interrupt void SDFM1DR2_ISR(void);
interrupt void SDFM1DR3_ISR(void);
interrupt void SDFM1DR4_ISR(void);
interrupt void SPIC_RX_ISR(void);
interrupt void SPIC_TX_ISR(void);
interrupt void SPID_RX_ISR(void);
interrupt void SPID_TX_ISR(void);
interrupt void SDFM2DR1_ISR(void);
interrupt void SDFM2DR2_ISR(void);
interrupt void SDFM2DR3_ISR(void);
interrupt void SDFM2DR4_ISR(void);
interrupt void FSIRXC1_ISR(void);
interrupt void FSIRXC2_ISR(void);
interrupt void FSIRXD1_ISR(void);
interrupt void FSIRXD2_ISR(void);
interrupt void FSIRXE1_ISR(void);
interrupt void FSIRXE2_ISR(void);
interrupt void FSIRXF1_ISR(void);
interrupt void FSIRXF2_ISR(void);
interrupt void FSIRXG1_ISR(void);
interrupt void FSIRXG2_ISR(void);
interrupt void FSIRXH1_ISR(void);
interrupt void FSIRXH2_ISR(void);
interrupt void CLB5_ISR(void);
interrupt void CLB6_ISR(void);
interrupt void CLB7_ISR(void);
interrupt void CLB8_ISR(void);
interrupt void MCANA_0_ISR(void);
interrupt void MCANA_1_ISR(void);
interrupt void MCANA_ECC_ISR(void);
interrupt void MCANA_WAKE_ISR(void);
interrupt void PMBUSA_ISR(void);
interrupt void CM_STATUS_ISR(void);
interrupt void USBA_ISR(void);
interrupt void ADCC_EVT_ISR(void);
interrupt void ADCC2_ISR(void);
interrupt void ADCC3_ISR(void);
interrupt void ADCC4_ISR(void);
interrupt void ADCD_EVT_ISR(void);
interrupt void ADCD2_ISR(void);
interrupt void ADCD3_ISR(void);
interrupt void ADCD4_ISR(void);
interrupt void CMTOCPUXIPC0_ISR(void);
interrupt void CMTOCPUXIPC1_ISR(void);
interrupt void CMTOCPUXIPC2_ISR(void);
interrupt void CMTOCPUXIPC3_ISR(void);
interrupt void CMTOCPUXIPC4_ISR(void);
interrupt void CMTOCPUXIPC5_ISR(void);
interrupt void CMTOCPUXIPC6_ISR(void);
interrupt void CMTOCPUXIPC7_ISR(void);
interrupt void ECAP6_2_ISR(void);
interrupt void ECAP7_2_ISR(void);
interrupt void CPUCRC_ISR(void);
interrupt void CLA1CRC_ISR(void);
interrupt void CLA_OVERFLOW_ISR(void);
interrupt void CLA_UNDERFLOW_ISR(void);
//
// Catch-all for PIE Reserved Locations for testing purposes:
//
interrupt void PIE_RESERVED_ISR(void); // Reserved ISR
interrupt void EMPTY_ISR(void); // Only does a return
interrupt void NOTUSED_ISR(void);
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // end of f2838x_PIEVECT_H definition
//
// End of file
//
@@ -0,0 +1,257 @@
//###########################################################################
//
// FILE: f2838x_dma_defines.h
//
// TITLE: #defines used in DMA examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_DMA_DEFINES_H
#define F2838x_DMA_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// PERINTSEL bits
//
#define DMA_ADCAINT1 1
#define DMA_ADCAINT2 2
#define DMA_ADCAINT3 3
#define DMA_ADCAINT4 4
#define DMA_ADCAEVT 5
#define DMA_ADCBINT1 6
#define DMA_ADCBINT2 7
#define DMA_ADCBINT3 8
#define DMA_ADCBINT4 9
#define DMA_ADCBEVT 10
#define DMA_ADCCINT1 11
#define DMA_ADCCINT2 12
#define DMA_ADCCINT3 13
#define DMA_ADCCINT4 14
#define DMA_ADCCEVT 15
#define DMA_ADCDINT1 16
#define DMA_ADCDINT2 17
#define DMA_ADCDINT3 18
#define DMA_ADCDINT4 19
#define DMA_ADCDEVT 20
#define DMA_XINT1 29
#define DMA_XINT2 30
#define DMA_XINT3 31
#define DMA_XINT4 32
#define DMA_XINT5 33
#define DMA_EPWM1A 36
#define DMA_EPWM1B 37
#define DMA_EPWM2A 38
#define DMA_EPWM2B 39
#define DMA_EPWM3A 40
#define DMA_EPWM3B 41
#define DMA_EPWM4A 42
#define DMA_EPWM4B 43
#define DMA_EPWM5A 44
#define DMA_EPWM5B 45
#define DMA_EPWM6A 46
#define DMA_EPWM6B 47
#define DMA_EPWM7A 48
#define DMA_EPWM7B 49
#define DMA_EPWM8A 50
#define DMA_EPWM8B 51
#define DMA_EPWM9A 52
#define DMA_EPWM9B 53
#define DMA_EPWM10A 54
#define DMA_EPWM10B 55
#define DMA_EPWM11A 56
#define DMA_EPWM11B 57
#define DMA_EPWM12A 58
#define DMA_EPWM12B 59
#define DMA_EPWM13A 60
#define DMA_EPWM13B 61
#define DMA_EPWM14A 62
#define DMA_EPWM14B 63
#define DMA_EPWM15A 64
#define DMA_EPWM15B 65
#define DMA_EPWM16A 66
#define DMA_EPWM16B 67
#define DMA_TINT0 68
#define DMA_TINT1 69
#define DMA_TINT2 70
#define DMA_MXEVTA 71
#define DMA_MREVTA 72
#define DMA_MXEVTB 73
#define DMA_MREVTB 74
#define DMA_ECAP1 75
#define DMA_ECAP2 76
#define DMA_ECAP3 77
#define DMA_ECAP4 78
#define DMA_ECAP5 79
#define DMA_ECAP6 80
#define DMA_ECAP7 81
#define DMA_SD1FLT1 95
#define DMA_SD1FLT2 96
#define DMA_SD1FLT3 97
#define DMA_SD1FLT4 98
#define DMA_SD2FLT1 99
#define DMA_SD2FLT2 100
#define DMA_SD2FLT3 101
#define DMA_SD2FLT4 102
#define DMA_SYNC_TRIGGER 103
#define DMA_SPIATX 109
#define DMA_SPIARX 110
#define DMA_SPIBTX 111
#define DMA_SPIBRX 112
#define DMA_SPICTX 113
#define DMA_SPICRX 114
#define DMA_SPIDTX 115
#define DMA_SPIDRX 116
#define DMA_CLB5INT 117
#define DMA_CLB6INT 118
#define DMA_CLB7INT 119
#define DMA_CLB8INT 120
#define DMA_FSITXA 123
#define DMA_FSIRXA 125
#define DMA_CLB1INT 127
#define DMA_CLB2INT 128
#define DMA_CLB3INT 129
#define DMA_CLB4INT 130
#define DMA_USBRX1 131
#define DMA_USBTX1 132
#define DMA_USBRX2 133
#define DMA_USBTX2 134
#define DMA_USBRX3 135
#define DMA_USBTX3 136
#define DMA_FSIRXC 143
#define DMA_FSIRXD 144
#define DMA_FSIRXE 145
#define DMA_FSIRXF 146
#define DMA_FSIRXG 147
#define DMA_FSIRXH 148
#define DMA_FSITXB 155
#define DMA_FSIRXB 157
#define DMA_CANAIF1 167
#define DMA_CANAIF2 168
#define DMA_CANAIF3 169
#define DMA_CANBIF1 170
#define DMA_CANBIF2 171
#define DMA_CANBIF3 172
//
// OVERINTE bit
//
#define OVRFLOW_DISABLE 0x0
#define OVEFLOW_ENABLE 0x1
//
// PERINTE bit
//
#define PERINT_DISABLE 0x0
#define PERINT_ENABLE 0x1
//
// CHINTMODE bits
//
#define CHINT_BEGIN 0x0
#define CHINT_END 0x1
//
// ONESHOT bits
//
#define ONESHOT_DISABLE 0x0
#define ONESHOT_ENABLE 0x1
//
// CONTINOUS bit
//
#define CONT_DISABLE 0x0
#define CONT_ENABLE 0x1
//
// SYNCE bit
//
#define SYNC_DISABLE 0x0
#define SYNC_ENABLE 0x1
//
// SYNCSEL bit
//
#define SYNC_SRC 0x0
#define SYNC_DST 0x1
//
// DATASIZE bit
//
#define SIXTEEN_BIT 0x0
#define THIRTYTWO_BIT 0x1
//
// CHINTE bit
//
#define CHINT_DISABLE 0x0
#define CHINT_ENABLE 0x1
#ifdef __cplusplus
}
#endif
#endif // - end of F2838x_DMA_DEFINES_H
//
// End of file
//
@@ -0,0 +1,321 @@
//###########################################################################
//
// FILE: f2838x_emif_defines.h
//
// TITLE: #defines used in EMIF examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_EMIF_DEFINES_H
#define F2838x_EMIF_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
//cpu1 to cpu2 message for handshaking
//
#define CPU1_CPU2_MSG 0x3fd00
//
//cpu2_to_cpu1 message ram for handshaking
//
#define CPU2_CPU1_MSG 0x3fb00
#define MSEL_EMIF1_CPU1 0x93A5CE71
#define MSEL_EMIF1_CPU2 0x93A5CE72
#define MSEL_DEF_3 0x93A5CE73
#define MSEL_DEF_0 0x93A5CE70
#define MSEL_DEF_1 0x93A5CE71
#define MSEL_DEF_2 0x93A5CE72
//
//soft reset bit register
//
#define EMIF_SOFT_PRES_REG 0x5D084
//
//Device capability/EMIF customization register
//
#define EMIF_DEV_DC_REG 0x5D014
//
// Values for ASYNC_CSx_CR Registers
//
#define EMIF_ASYNC_ASIZE_8 0x0
#define EMIF_ASYNC_ASIZE_16 0x1
#define EMIF_ASYNC_ASIZE_32 0x2
#define EMIF_ASYNC_TA_1 0x0
#define EMIF_ASYNC_TA_2 0x4
#define EMIF_ASYNC_TA_3 0x8
#define EMIF_ASYNC_TA_4 0xC
#define EMIF_ASYNC_RHOLD_1 0x00
#define EMIF_ASYNC_RHOLD_2 0x10
#define EMIF_ASYNC_RHOLD_3 0x20
#define EMIF_ASYNC_RHOLD_4 0x30
#define EMIF_ASYNC_RHOLD_5 0x40
#define EMIF_ASYNC_RHOLD_6 0x50
#define EMIF_ASYNC_RHOLD_7 0x60
#define EMIF_ASYNC_RHOLD_8 0x70
#define EMIF_ASYNC_RSTROBE_1 0x0000
#define EMIF_ASYNC_RSTROBE_2 0x0080
#define EMIF_ASYNC_RSTROBE_3 0x0100
#define EMIF_ASYNC_RSTROBE_4 0x0180
#define EMIF_ASYNC_RSTROBE_5 0x0200
#define EMIF_ASYNC_RSTROBE_6 0x0280
#define EMIF_ASYNC_RSTROBE_7 0x0300
#define EMIF_ASYNC_RSTROBE_8 0x0380
#define EMIF_ASYNC_RSTROBE_9 0x0400
#define EMIF_ASYNC_RSTROBE_10 0x0480
#define EMIF_ASYNC_RSTROBE_11 0x0500
#define EMIF_ASYNC_RSTROBE_12 0x0580
#define EMIF_ASYNC_RSTROBE_13 0x0600
#define EMIF_ASYNC_RSTROBE_14 0x0680
#define EMIF_ASYNC_RSTROBE_15 0x0700
#define EMIF_ASYNC_RSTROBE_16 0x0780
#define EMIF_ASYNC_RSTROBE_17 0x0800
#define EMIF_ASYNC_RSTROBE_18 0x0880
#define EMIF_ASYNC_RSTROBE_19 0x0900
#define EMIF_ASYNC_RSTROBE_20 0x0980
#define EMIF_ASYNC_RSTROBE_21 0x0A00
#define EMIF_ASYNC_RSTROBE_22 0x0A80
#define EMIF_ASYNC_RSTROBE_23 0x0B00
#define EMIF_ASYNC_RSTROBE_24 0x0B80
#define EMIF_ASYNC_RSTROBE_25 0x0C00
#define EMIF_ASYNC_RSTROBE_26 0x0C80
#define EMIF_ASYNC_RSTROBE_27 0x0D00
#define EMIF_ASYNC_RSTROBE_28 0x0D80
#define EMIF_ASYNC_RSTROBE_29 0x0E00
#define EMIF_ASYNC_RSTROBE_30 0x0E80
#define EMIF_ASYNC_RSTROBE_31 0x0F00
#define EMIF_ASYNC_RSTROBE_32 0x0F80
#define EMIF_ASYNC_RSTROBE_33 0x1000
#define EMIF_ASYNC_RSTROBE_34 0x1080
#define EMIF_ASYNC_RSTROBE_35 0x1100
#define EMIF_ASYNC_RSTROBE_36 0x1180
#define EMIF_ASYNC_RSTROBE_37 0x1200
#define EMIF_ASYNC_RSTROBE_38 0x1280
#define EMIF_ASYNC_RSTROBE_39 0x1300
#define EMIF_ASYNC_RSTROBE_40 0x1380
#define EMIF_ASYNC_RSTROBE_41 0x1400
#define EMIF_ASYNC_RSTROBE_42 0x1480
#define EMIF_ASYNC_RSTROBE_43 0x1500
#define EMIF_ASYNC_RSTROBE_44 0x1580
#define EMIF_ASYNC_RSTROBE_45 0x1600
#define EMIF_ASYNC_RSTROBE_46 0x1680
#define EMIF_ASYNC_RSTROBE_47 0x1700
#define EMIF_ASYNC_RSTROBE_48 0x1780
#define EMIF_ASYNC_RSTROBE_49 0x1800
#define EMIF_ASYNC_RSTROBE_50 0x1880
#define EMIF_ASYNC_RSTROBE_51 0x1900
#define EMIF_ASYNC_RSTROBE_52 0x1980
#define EMIF_ASYNC_RSTROBE_53 0x1A00
#define EMIF_ASYNC_RSTROBE_54 0x1A80
#define EMIF_ASYNC_RSTROBE_55 0x1B00
#define EMIF_ASYNC_RSTROBE_56 0x1B80
#define EMIF_ASYNC_RSTROBE_57 0x1C00
#define EMIF_ASYNC_RSTROBE_58 0x1C80
#define EMIF_ASYNC_RSTROBE_59 0x1D00
#define EMIF_ASYNC_RSTROBE_60 0x1D80
#define EMIF_ASYNC_RSTROBE_61 0x1E00
#define EMIF_ASYNC_RSTROBE_62 0x1E80
#define EMIF_ASYNC_RSTROBE_63 0x1F00
#define EMIF_ASYNC_RSTROBE_64 0x1F80
#define EMIF_ASYNC_RSETUP_1 0x0000
#define EMIF_ASYNC_RSETUP_2 0x2000
#define EMIF_ASYNC_RSETUP_3 0x4000
#define EMIF_ASYNC_RSETUP_4 0x6000
#define EMIF_ASYNC_RSETUP_5 0x8000
#define EMIF_ASYNC_RSETUP_6 0xA000
#define EMIF_ASYNC_RSETUP_7 0xC000
#define EMIF_ASYNC_RSETUP_8 0xE000
#define EMIF_ASYNC_RSETUP_9 0x10000
#define EMIF_ASYNC_RSETUP_10 0x12000
#define EMIF_ASYNC_RSETUP_11 0x14000
#define EMIF_ASYNC_RSETUP_12 0x16000
#define EMIF_ASYNC_RSETUP_13 0x18000
#define EMIF_ASYNC_RSETUP_14 0x1A000
#define EMIF_ASYNC_RSETUP_15 0x1C000
#define EMIF_ASYNC_RSETUP_16 0x1E000
#define EMIF_ASYNC_WHOLD_1 0x00000
#define EMIF_ASYNC_WHOLD_2 0x20000
#define EMIF_ASYNC_WHOLD_3 0x40000
#define EMIF_ASYNC_WHOLD_4 0x60000
#define EMIF_ASYNC_WHOLD_5 0x80000
#define EMIF_ASYNC_WHOLD_6 0xA0000
#define EMIF_ASYNC_WHOLD_7 0xC0000
#define EMIF_ASYNC_WHOLD_8 0xE0000
#define EMIF_ASYNC_WSTROBE_1 0x0000000
#define EMIF_ASYNC_WSTROBE_2 0x0100000
#define EMIF_ASYNC_WSTROBE_3 0x0200000
#define EMIF_ASYNC_WSTROBE_4 0x0300000
#define EMIF_ASYNC_WSTROBE_5 0x0400000
#define EMIF_ASYNC_WSTROBE_6 0x0500000
#define EMIF_ASYNC_WSTROBE_7 0x0600000
#define EMIF_ASYNC_WSTROBE_8 0x0700000
#define EMIF_ASYNC_WSTROBE_9 0x0800000
#define EMIF_ASYNC_WSTROBE_10 0x0900000
#define EMIF_ASYNC_WSTROBE_11 0x0A00000
#define EMIF_ASYNC_WSTROBE_12 0x0B00000
#define EMIF_ASYNC_WSTROBE_13 0x0C00000
#define EMIF_ASYNC_WSTROBE_14 0x0D00000
#define EMIF_ASYNC_WSTROBE_15 0x0E00000
#define EMIF_ASYNC_WSTROBE_16 0x0F00000
#define EMIF_ASYNC_WSTROBE_17 0x1000000
#define EMIF_ASYNC_WSTROBE_18 0x1100000
#define EMIF_ASYNC_WSTROBE_19 0x1200000
#define EMIF_ASYNC_WSTROBE_20 0x1300000
#define EMIF_ASYNC_WSTROBE_21 0x1400000
#define EMIF_ASYNC_WSTROBE_22 0x1500000
#define EMIF_ASYNC_WSTROBE_23 0x1600000
#define EMIF_ASYNC_WSTROBE_24 0x1700000
#define EMIF_ASYNC_WSTROBE_25 0x1800000
#define EMIF_ASYNC_WSTROBE_26 0x1900000
#define EMIF_ASYNC_WSTROBE_27 0x1A00000
#define EMIF_ASYNC_WSTROBE_28 0x1B00000
#define EMIF_ASYNC_WSTROBE_29 0x1C00000
#define EMIF_ASYNC_WSTROBE_30 0x1D00000
#define EMIF_ASYNC_WSTROBE_31 0x1E00000
#define EMIF_ASYNC_WSTROBE_32 0x1F00000
#define EMIF_ASYNC_WSTROBE_33 0x2000000
#define EMIF_ASYNC_WSTROBE_34 0x2100000
#define EMIF_ASYNC_WSTROBE_35 0x2200000
#define EMIF_ASYNC_WSTROBE_36 0x2300000
#define EMIF_ASYNC_WSTROBE_37 0x2400000
#define EMIF_ASYNC_WSTROBE_38 0x2500000
#define EMIF_ASYNC_WSTROBE_39 0x2600000
#define EMIF_ASYNC_WSTROBE_40 0x2700000
#define EMIF_ASYNC_WSTROBE_41 0x2800000
#define EMIF_ASYNC_WSTROBE_42 0x2900000
#define EMIF_ASYNC_WSTROBE_43 0x2A00000
#define EMIF_ASYNC_WSTROBE_44 0x2B00000
#define EMIF_ASYNC_WSTROBE_45 0x2C00000
#define EMIF_ASYNC_WSTROBE_46 0x2D00000
#define EMIF_ASYNC_WSTROBE_47 0x2E00000
#define EMIF_ASYNC_WSTROBE_48 0x2F00000
#define EMIF_ASYNC_WSTROBE_49 0x3000000
#define EMIF_ASYNC_WSTROBE_50 0x3100000
#define EMIF_ASYNC_WSTROBE_51 0x3200000
#define EMIF_ASYNC_WSTROBE_52 0x3300000
#define EMIF_ASYNC_WSTROBE_53 0x3400000
#define EMIF_ASYNC_WSTROBE_54 0x3500000
#define EMIF_ASYNC_WSTROBE_55 0x3600000
#define EMIF_ASYNC_WSTROBE_56 0x3700000
#define EMIF_ASYNC_WSTROBE_57 0x3800000
#define EMIF_ASYNC_WSTROBE_58 0x3900000
#define EMIF_ASYNC_WSTROBE_59 0x3A00000
#define EMIF_ASYNC_WSTROBE_60 0x3B00000
#define EMIF_ASYNC_WSTROBE_61 0x3C00000
#define EMIF_ASYNC_WSTROBE_62 0x3D00000
#define EMIF_ASYNC_WSTROBE_63 0x3E00000
#define EMIF_ASYNC_WSTROBE_64 0x3F00000
#define EMIF_ASYNC_WSETUP_1 0x00000000
#define EMIF_ASYNC_WSETUP_2 0x04000000
#define EMIF_ASYNC_WSETUP_3 0x08000000
#define EMIF_ASYNC_WSETUP_4 0x0C000000
#define EMIF_ASYNC_WSETUP_5 0x10000000
#define EMIF_ASYNC_WSETUP_6 0x14000000
#define EMIF_ASYNC_WSETUP_7 0x18000000
#define EMIF_ASYNC_WSETUP_8 0x1C000000
#define EMIF_ASYNC_WSETUP_9 0x20000000
#define EMIF_ASYNC_WSETUP_10 0x24000000
#define EMIF_ASYNC_WSETUP_11 0x28000000
#define EMIF_ASYNC_WSETUP_12 0x2C000000
#define EMIF_ASYNC_WSETUP_13 0x30000000
#define EMIF_ASYNC_WSETUP_14 0x34000000
#define EMIF_ASYNC_WSETUP_15 0x38000000
#define EMIF_ASYNC_WSETUP_16 0x3C000000
#define EMIF_ASYNC_EW_DISABLE 0x00000000
#define EMIF_ASYNC_EW_ENABLE 0x40000000
#define EMIF_ASYNC_SS_DISABLE 0x00000000
#define EMIF_ASYNC_SS_ENABLE 0x80000000
//
// Values for ASYNC_WCCR Register
//
#define EMIF_ASYNC_WCCR_WP_LOW 0x00000000
#define EMIF_ASYNC_WCCR_WP_HIGH 0x01000000
//
// Read mask for the registers which has reserved bits.
//
#define ASYNC_WCCR_RDMASK 0xF0FF00FF
#define SDRAM_CR_RDMASK 0xE3FF7F7F
#define SDRAM_RCR_RDMASK 0x00071FFF
#define SDRAM_TR_RDMASK 0xFF77FF70
#define SDR_EXT_TMNG_RDMASK 0x1F
#define INT_RAW_RDMASK 0x3F
#define INT_MASK_RDMASK 0x3F
#define IO_CTRL_RDMASK_RDMASK 0xFFFF
#define IO_STAT_RDMASK_RDMASK 0xF
#define NAND_FLASH_CTRL_RDMASK 0x3F3F
#define NAND_FLASH_STAT_RDMASK 0x30F0F
#define IODFT_TLECR_REG_RDMASK 0xFFFF
#define IODFT_TLGCR_REG_RDMASK 0x71FF
#define IODFT_TLAMR_REG_RDMASK 0x0FFFFFFF
#define IODFT_TLDCMR_REG_RDMASK 0x3fff3f07
#define MODEL_REL_NUM_REG_RDMASK 0xFF
#define NAND_FLASH_4BIT_ECCLR_RDMASK 0x3F
#define NAND_FLASH_4BIT_ECCx_RDMASK 0x03ff03ff
#define NAND_FLASH_ERR_ADDRx_RDMASK 0x03ff03ff
#define NAND_FLASH_ERR_VALx_RDMASK 0x03ff03ff
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_EMIF_DEFINES_H
//
// End of file
//
@@ -0,0 +1,433 @@
//###########################################################################
//
// FILE: f2838x_epwm_defines.h
//
// TITLE: #defines used in EPwm examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_EPWM_DEFINES_H
#define F2838x_EPWM_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// TBCTL (Time-Base Control) Register
//
//
// CTRMODE bits
//
#define TB_COUNT_UP 0x0
#define TB_COUNT_DOWN 0x1
#define TB_COUNT_UPDOWN 0x2
#define TB_FREEZE 0x3
//
// PHSEN bit
//
#define TB_DISABLE 0x0
#define TB_ENABLE 0x1
//
// PRDLD bit
//
#define TB_SHADOW 0x0
#define TB_IMMEDIATE 0x1
//
// HSPCLKDIV and CLKDIV bits
//
#define TB_DIV1 0x0
#define TB_DIV2 0x1
#define TB_DIV4 0x2
//
// PHSDIR bit
//
#define TB_DOWN 0x0
#define TB_UP 0x1
//
// EPWMSYNINSEL (EPWMxSYNCIN Source Select) Register
//
//
// SEL bits
//
#define SYNC_IN_SRC_DISABLE_ALL 0x0
#define SYNC_IN_SRC_SYNCOUT_EPWM1 0x1
#define SYNC_IN_SRC_SYNCOUT_EPWM2 0x2
#define SYNC_IN_SRC_SYNCOUT_EPWM3 0x3
#define SYNC_IN_SRC_SYNCOUT_EPWM4 0x4
#define SYNC_IN_SRC_SYNCOUT_EPWM5 0x5
#define SYNC_IN_SRC_SYNCOUT_EPWM6 0x6
#define SYNC_IN_SRC_SYNCOUT_EPWM7 0x7
#define SYNC_IN_SRC_SYNCOUT_EPWM8 0x8
#define SYNC_IN_SRC_SYNCOUT_EPWM9 0x9
#define SYNC_IN_SRC_SYNCOUT_EPWM10 0xA
#define SYNC_IN_SRC_SYNCOUT_EPWM11 0xB
#define SYNC_IN_SRC_SYNCOUT_EPWM12 0xC
#define SYNC_IN_SRC_SYNCOUT_EPWM13 0xD
#define SYNC_IN_SRC_SYNCOUT_EPWM14 0xE
#define SYNC_IN_SRC_SYNCOUT_EPWM15 0xF
#define SYNC_IN_SRC_SYNCOUT_EPWM16 0x10
#define SYNC_IN_SRC_SYNCOUT_ECAP1 0x11
#define SYNC_IN_SRC_SYNCOUT_ECAP2 0x12
#define SYNC_IN_SRC_SYNCOUT_ECAP3 0x13
#define SYNC_IN_SRC_SYNCOUT_ECAP4 0x14
#define SYNC_IN_SRC_SYNCOUT_ECAP5 0x15
#define SYNC_IN_SRC_SYNCOUT_ECAP6 0x16
#define SYNC_IN_SRC_SYNCOUT_ECAP7 0x17
#define SYNC_IN_SRC_INPUTXBAR_OUT5 0x18
#define SYNC_IN_SRC_INPUTXBAR_OUT6 0x19
#define SYNC_IN_SRC_ETHERCAT_SYNC0 0x1A
#define SYNC_IN_SRC_ETHERCAT_SYNC1 0x1B
//
// EPWMSYNOUTEN (EPWMxSYNCOUT Source Enable) Register
//
#define SYNC_OUT_SRC_DISABLE_ALL 0x0
#define SYNC_OUT_SRC_ENABLE_ALL 0x7F
//
// SWEN, ZEROEN, CMPBEN, CMPCEN, CMPCEN, DCAEVT1EN & DCBEVT1EN bits
//
#define SYNC_OUT_SRC_ENABLE 0x1
#define SYNC_OUT_SRC_DISABLE 0x0
//
// CMPCTL (Compare Control) Register
//
//
// LOADAMODE and LOADBMODE bits
//
#define CC_CTR_ZERO 0x0
#define CC_CTR_PRD 0x1
#define CC_CTR_ZERO_PRD 0x2
#define CC_LD_DISABLE 0x3
//
// SHDWAMODE and SHDWBMODE bits
//
#define CC_SHADOW 0x0
#define CC_IMMEDIATE 0x1
//
// AQCTLA and AQCTLB (Action Qualifier Control)
//
//
// ZRO, PRD, CAU, CAD, CBU, CBD bits
//
#define AQ_NO_ACTION 0x0
#define AQ_CLEAR 0x1
#define AQ_SET 0x2
#define AQ_TOGGLE 0x3
//
// DBCTL (Dead-Band Control) Register
//
//
// OUT MODE bits
//
#define DB_DISABLE 0x0
#define DBB_ENABLE 0x1
#define DBA_ENABLE 0x2
#define DB_FULL_ENABLE 0x3
//
// POLSEL bits
//
#define DB_ACTV_HI 0x0
#define DB_ACTV_LOC 0x1
#define DB_ACTV_HIC 0x2
#define DB_ACTV_LO 0x3
//
// IN MODE bits
//
#define DBA_ALL 0x0
#define DBB_RED_DBA_FED 0x1
#define DBA_RED_DBB_FED 0x2
#define DBB_ALL 0x3
//
// PCCTL (PWM chopper control) Register
//
//
// CHPEN bit
//
#define CHP_DISABLE 0x0
#define CHP_ENABLE 0x1
//
// CHPFREQ bits
//
#define CHP_DIV1 0x0
#define CHP_DIV2 0x1
#define CHP_DIV3 0x2
#define CHP_DIV4 0x3
#define CHP_DIV5 0x4
#define CHP_DIV6 0x5
#define CHP_DIV7 0x6
#define CHP_DIV8 0x7
//
// CHPDUTY bits
//
#define CHP1_8TH 0x0
#define CHP2_8TH 0x1
#define CHP3_8TH 0x2
#define CHP4_8TH 0x3
#define CHP5_8TH 0x4
#define CHP6_8TH 0x5
#define CHP7_8TH 0x6
//
// TZSEL (Trip Zone Select) Register
//
//
// CBCn and OSHTn bits
//
#define TZ_DISABLE 0x0
#define TZ_ENABLE 0x1
//
// TZCTL (Trip Zone Control) Register
//
//
// TZA and TZB bits
//
#define TZ_HIZ 0x0
#define TZ_FORCE_HI 0x1
#define TZ_FORCE_LO 0x2
#define TZ_NO_CHANGE 0x3
//
// TZDCSEL (Trip Zone Digital Compare) Register
//
//
// DCAEVT1, DCAEVT2, DCBEVT1, DCBEVT2 bits
//
#define TZ_EVT_DISABLE 0x0
#define TZ_DCAH_LOW 0x1
#define TZ_DCAH_HI 0x2
#define TZ_DCAL_LOW 0x3
#define TZ_DCAL_HI 0x4
#define TZ_DCAL_HI_DCAH_LOW 0x5
#define TZ_DCBH_LOW 0x1
#define TZ_DCBH_HI 0x2
#define TZ_DCBL_LOW 0x3
#define TZ_DCBL_HI 0x4
#define TZ_DCBL_HI_DCBH_LOW 0x5
//
// ETSEL (Event Trigger Select) Register
//
//
// INTSEL bits
//
#define ET_DCAEVT1SOC 0x0
#define ET_CTR_ZERO 0x1
#define ET_CTR_PRD 0x2
#define ET_CTR_PRDZERO 0x3
#define ET_CTRU_CMPA 0x4
#define ET_CTRD_CMPA 0x5
#define ET_CTRU_CMPB 0x6
#define ET_CTRD_CMPB 0x7
//
// ETPS (Event Trigger Pre-scale) Register
//
//
// INTPRD, SOCAPRD, SOCBPRD bits
//
#define ET_DISABLE 0x0
#define ET_1ST 0x1
#define ET_2ND 0x2
#define ET_3RD 0x3
//
// HRPWM (High Resolution PWM)
//
//
// HRCNFG Register
//
//
// EDGEMODE, EDGEMODEB bits
//
#define HR_DISABLE 0x0
#define HR_REP 0x1
#define HR_FEP 0x2
#define HR_BEP 0x3
//
// CTLMODE, CTLMODEB bits
//
#define HR_CMP 0x0
#define HR_PHS 0x1
//
// HRLOAD, HRLOADB bits
//
#define HR_CTR_ZERO 0x0
#define HR_CTR_PRD 0x1
#define HR_CTR_ZERO_PRD 0x2
//
// SELOUTB bit
//
#define HR_NORM_B 0x0
#define HR_INVERT_B 0x1
//
// SWAPAB bit
//
#define HR_NORM_AB 0x0
#define HR_SWAP_AB 0x1
//
// DC (Digital Compare)
//
//
// DCTRIPSEL Register
//
#define DC_TZ1 0x0
#define DC_TZ2 0x1
#define DC_TZ3 0x2
#define DC_TRIPIN1 0x0
#define DC_TRIPIN2 0x1
#define DC_TRIPIN3 0x2
#define DC_TRIPIN4 0x3
#define DC_TRIPIN5 0x4
#define DC_TRIPIN6 0x5
#define DC_TRIPIN7 0x6
#define DC_TRIPIN8 0x7
#define DC_TRIPIN9 0x8
#define DC_TRIPIN10 0x9
#define DC_TRIPIN11 0xA
#define DC_TRIPIN12 0xB
// Reserved 0xC
#define DC_TRIPIN14 0xD
#define DC_TRIPIN15 0xE
#define DC_COMBINATION 0xF
//
// DCFCTL Register
//
//
// SRCSEL bits
//
#define DC_SRC_DCAEVT1 0x0
#define DC_SRC_DCAEVT2 0x1
#define DC_SRC_DCBEVT1 0x2
#define DC_SRC_DCBEVT2 0x3
//
// PULSESEL bits
//
#define DC_PULSESEL_PRD 0x0
#define DC_PULSESEL_ZERO 0x1
#define DC_PULSESEL_ZERO_PRD 0x2
//
// BLANKE bit
//
#define DC_BLANK_DISABLE 0x0
#define DC_BLANK_ENABLE 0x1
//
// BLANKINV bit
//
#define DC_BLANK_NOTINV 0x0
#define DC_BLANK_INV 0x1
//
// DCACTL/DCBCTL Register
//
//
// EVT1SRCSEL, EVT2SRCSEL bits
//
#define DC_EVT1 0x0
#define DC_EVT2 0x0
#define DC_EVT_FLT 0x1
//
// EVT1SYNCE bit
//
#define DC_EVT_SYNC 0x0
#define DC_EVT_ASYNC 0x1
//
// EVT1SOCE bit
//
#define DC_SOC_DISABLE 0x0
#define DC_SOC_ENABLE 0x1
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_EPWM_DEFINES_H
//
// End of file
//
@@ -0,0 +1,542 @@
//###########################################################################
//
// FILE: f2838x_examples.h
//
// TITLE: F2838x Device Definitions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_EXAMPLES_H
#define F2838x_EXAMPLES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// The following are values that can be passed to the
// InitSysPll() & InitAuxPll() to select SYSPLL/AUXPLL integer multiplier
//
#define IMULT_0 0 //PLLBYPASS
#define IMULT_1 1
#define IMULT_2 2
#define IMULT_3 3
#define IMULT_4 4
#define IMULT_5 5
#define IMULT_6 6
#define IMULT_7 7
#define IMULT_8 8
#define IMULT_9 9
#define IMULT_10 10
#define IMULT_11 11
#define IMULT_12 12
#define IMULT_13 13
#define IMULT_14 14
#define IMULT_15 15
#define IMULT_16 16
#define IMULT_17 17
#define IMULT_18 18
#define IMULT_19 19
#define IMULT_20 20
#define IMULT_21 21
#define IMULT_22 22
#define IMULT_23 23
#define IMULT_24 24
#define IMULT_25 25
#define IMULT_26 26
#define IMULT_27 27
#define IMULT_28 28
#define IMULT_29 29
#define IMULT_30 30
#define IMULT_31 31
#define IMULT_32 32
#define IMULT_33 33
#define IMULT_34 34
#define IMULT_35 35
#define IMULT_36 36
#define IMULT_37 37
#define IMULT_38 38
#define IMULT_39 39
#define IMULT_40 40
#define IMULT_41 41
#define IMULT_42 42
#define IMULT_43 43
#define IMULT_44 44
#define IMULT_45 45
#define IMULT_46 46
#define IMULT_47 47
#define IMULT_48 48
#define IMULT_49 49
#define IMULT_50 50
#define IMULT_51 51
#define IMULT_52 52
#define IMULT_53 53
#define IMULT_54 54
#define IMULT_55 55
#define IMULT_56 56
#define IMULT_57 57
#define IMULT_58 58
#define IMULT_59 59
#define IMULT_60 60
#define IMULT_61 61
#define IMULT_62 62
#define IMULT_63 63
#define IMULT_64 64
#define IMULT_65 65
#define IMULT_66 66
#define IMULT_67 67
#define IMULT_68 68
#define IMULT_69 69
#define IMULT_70 70
#define IMULT_71 71
#define IMULT_72 72
#define IMULT_73 73
#define IMULT_74 74
#define IMULT_75 75
#define IMULT_76 76
#define IMULT_77 77
#define IMULT_78 78
#define IMULT_79 79
#define IMULT_80 80
#define IMULT_81 81
#define IMULT_82 82
#define IMULT_83 83
#define IMULT_84 84
#define IMULT_85 85
#define IMULT_86 86
#define IMULT_87 87
#define IMULT_88 88
#define IMULT_89 89
#define IMULT_90 90
#define IMULT_91 91
#define IMULT_92 92
#define IMULT_93 93
#define IMULT_94 94
#define IMULT_95 95
#define IMULT_96 96
#define IMULT_97 97
#define IMULT_98 98
#define IMULT_99 99
#define IMULT_100 100
#define IMULT_101 101
#define IMULT_102 102
#define IMULT_103 103
#define IMULT_104 104
#define IMULT_105 105
#define IMULT_106 106
#define IMULT_107 107
#define IMULT_108 108
#define IMULT_109 109
#define IMULT_110 110
#define IMULT_111 111
#define IMULT_112 112
#define IMULT_113 113
#define IMULT_114 114
#define IMULT_115 115
#define IMULT_116 116
#define IMULT_117 117
#define IMULT_118 118
#define IMULT_119 119
#define IMULT_120 120
#define IMULT_121 121
#define IMULT_122 122
#define IMULT_123 123
#define IMULT_124 124
#define IMULT_125 125
#define IMULT_126 126
#define IMULT_127 127
//
// The following are values that can be passed to the
// InitSysPll() & InitAuxPll() to select SYSPLL/AUXPLL Reference
// clock dividers
//
#define REFDIV_1 0
#define REFDIV_2 1
#define REFDIV_3 2
#define REFDIV_4 3
#define REFDIV_5 4
#define REFDIV_6 5
#define REFDIV_7 6
#define REFDIV_8 7
#define REFDIV_9 8
#define REFDIV_10 9
#define REFDIV_11 10
#define REFDIV_12 11
#define REFDIV_13 12
#define REFDIV_14 13
#define REFDIV_15 14
#define REFDIV_16 15
#define REFDIV_17 16
#define REFDIV_18 17
#define REFDIV_19 18
#define REFDIV_20 19
#define REFDIV_21 20
#define REFDIV_22 21
#define REFDIV_23 22
#define REFDIV_24 23
#define REFDIV_25 24
#define REFDIV_26 25
#define REFDIV_27 26
#define REFDIV_28 27
#define REFDIV_29 28
#define REFDIV_30 29
#define REFDIV_31 30
#define REFDIV_32 31
//
// The following are values that can be passed to the
// InitSysPll() & InitAuxPll() to select SYSPLL/AUXPLL Output
// clock dividers
//
#define ODIV_1 0
#define ODIV_2 1
#define ODIV_3 2
#define ODIV_4 3
#define ODIV_5 4
#define ODIV_6 5
#define ODIV_7 6
#define ODIV_8 7
#define ODIV_9 8
#define ODIV_10 9
#define ODIV_11 10
#define ODIV_12 11
#define ODIV_13 12
#define ODIV_14 13
#define ODIV_15 14
#define ODIV_16 15
#define ODIV_17 16
#define ODIV_18 17
#define ODIV_19 18
#define ODIV_20 19
#define ODIV_21 20
#define ODIV_22 21
#define ODIV_23 22
#define ODIV_24 23
#define ODIV_25 24
#define ODIV_26 25
#define ODIV_27 26
#define ODIV_28 27
#define ODIV_29 28
#define ODIV_30 29
#define ODIV_31 30
#define ODIV_32 31
//
// The following are values that can be passed to the
// InitSysPll() to select divsel for SYSPLL
//
#define PLLCLK_BY_1 0
#define PLLCLK_BY_2 1
#define PLLCLK_BY_4 2
#define PLLCLK_BY_6 3
#define PLLCLK_BY_8 4
#define PLLCLK_BY_10 5
#define PLLCLK_BY_12 6
#define PLLCLK_BY_14 7
#define PLLCLK_BY_16 8
#define PLLCLK_BY_18 9
#define PLLCLK_BY_20 10
#define PLLCLK_BY_22 11
#define PLLCLK_BY_24 12
#define PLLCLK_BY_26 13
#define PLLCLK_BY_28 14
#define PLLCLK_BY_30 15
#define PLLCLK_BY_32 16
#define PLLCLK_BY_34 17
#define PLLCLK_BY_36 18
#define PLLCLK_BY_38 19
#define PLLCLK_BY_40 20
#define PLLCLK_BY_42 21
#define PLLCLK_BY_44 22
#define PLLCLK_BY_46 23
#define PLLCLK_BY_48 24
#define PLLCLK_BY_50 25
#define PLLCLK_BY_52 26
#define PLLCLK_BY_54 27
#define PLLCLK_BY_56 28
#define PLLCLK_BY_58 29
#define PLLCLK_BY_60 30
#define PLLCLK_BY_62 31
#define PLLCLK_BY_64 32
#define PLLCLK_BY_66 33
#define PLLCLK_BY_68 34
#define PLLCLK_BY_70 35
#define PLLCLK_BY_72 36
#define PLLCLK_BY_74 37
#define PLLCLK_BY_76 38
#define PLLCLK_BY_78 39
#define PLLCLK_BY_80 40
#define PLLCLK_BY_82 41
#define PLLCLK_BY_84 42
#define PLLCLK_BY_86 43
#define PLLCLK_BY_88 44
#define PLLCLK_BY_90 45
#define PLLCLK_BY_92 46
#define PLLCLK_BY_94 47
#define PLLCLK_BY_96 48
#define PLLCLK_BY_98 49
#define PLLCLK_BY_100 50
#define PLLCLK_BY_102 51
#define PLLCLK_BY_104 52
#define PLLCLK_BY_106 53
#define PLLCLK_BY_108 54
#define PLLCLK_BY_110 55
#define PLLCLK_BY_112 56
#define PLLCLK_BY_114 57
#define PLLCLK_BY_116 58
#define PLLCLK_BY_118 59
#define PLLCLK_BY_120 60
#define PLLCLK_BY_122 61
#define PLLCLK_BY_124 62
#define PLLCLK_BY_126 63
//
// The following are values that can be passed to the
// InitAuxPll() to select divsel for AUXPLL
//
#define AUXPLLRAWCLK_BY_1 0
#define AUXPLLRAWCLK_BY_2 1
#define AUXPLLRAWCLK_BY_4 2
#define AUXPLLRAWCLK_BY_8 3
#define AUXPLLRAWCLK_BY_3 4
#define AUXPLLRAWCLK_BY_5 5
#define AUXPLLRAWCLK_BY_6 6
#define AUXPLLRAWCLK_BY_7 7
//
// The following are values that can be passed to the
// IntOsc2Sel() , XtalOscSel() to select system PLL (or) AUX PLL
//
#define SYSTEM_PLL (Uint16) 0
#define AUX_PLL (Uint16) 1
//
// The following are values that can be passed to the
// InitSysPll() , InitAuxPll() & IsPLLValid() to select clock source
//
#define INT_OSC2 0
#define XTAL_OSC 1
#define INT_OSC1 2
#define AUXCLKIN 4
#define XTAL_OSC_SE 5 // External oscillator, single-ended mode
#define INT_PLL_SYSPLL 0
#define INT_PLL_AUXPLL 1
//
// The following are values that can be passed to the
// IsPLLValid() to select DCC for PLL validation
//
#define SYSCTL_DCC_BASE0 0
#define SYSCTL_DCC_BASE1 1
#define SYSCTL_DCC_BASE2 2
//
// Specify the clock rate of the CPU (SYSCLKOUT) in nS.
//
// Take into account the input clock frequency and the PLL multiplier
// selected in step 1.
//
// Use one of the values provided, or define your own.
// The trailing L is required tells the compiler to treat
// the number as a 64-bit value.
//
// Only one statement should be uncommented.
//
// Example: 200 MHz devices:
// CLKIN is a 10 MHz crystal or internal 10 MHz oscillator
//
// In step 1 the user specified the PLL multiplier = 40 for a
// 200 MHz CPU clock (SYSCLKOUT = 200 MHz).
//
// In this case, the CPU_RATE will be 5.000L
// Uncomment the line: #define CPU_RATE 5.000L
//
#define CPU_RATE 5.00L // for a 200MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 5.263L // for a 190MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 5.556L // for a 180MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 5.882L // for a 170MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 6.250L // for a 160MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 6.667L // for a 150MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 7.143L // for a 140MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 7.692L // for a 130MHz CPU clock speed (SYSCLKOUT)
//#define CPU_RATE 8.333L // for a 120MHz CPU clock speed (SYSCLKOUT)
//
// The following pointer to a function call calibrates the ADC reference,
// DAC offset, and internal oscillators
//
#define Device_cal ((void (*)(void))((uintptr_t)0x70260))
//
// The following macro define the OTP locations where ADC INL trim values
// are stored. Use this in the AdcSetMode(...) function only
//
#define GetAdcINLTrimOTPLoc(adc) ((Uint32 *)(0x70128 + (0xC * adc)))
//
// The following pointer to a function call looks up the ADC offset trim for a
// given condition. Use this in the AdcSetMode(...) function only.
//
#define GetAdcOffsetTrimOTPLoc(adc, resolution) \
((Uint16 *)(0x70158 + adc + (4 * resolution)))
//
// TI-OTP key value expected to be programmed in trimmed device
//
#define TI_OTP_DEV_KEY_BF (0x5A5A)
//
// Macro to read the key value programmed in the device
//
#define TI_OTP_DEV_PRG_KEY_BF (*((Uint16 *)(0x70238UL)))
//
// Includes
//
#include "f2838x_globalprototypes.h" // Prototypes for global functions
// within the .c files.
#include "f2838x_cputimervars.h"
#include "f2838x_cla_defines.h" // Macros used for CLA examples.
#include "f2838x_can_defines.h" // Macros used for CAN examples.
#include "f2838x_dac_defines.h" // Macros used for DAC examples.
#include "f2838x_memctrl_defines.h" // Macros used for MEMCONFIG examples.
#include "f2838x_epwm_defines.h" // Macros used for PWM examples.
#include "f2838x_adc_defines.h" // Macros used for ADC examples.
#include "f2838x_emif_defines.h" // Macros used for EMIF examples.
#include "f2838x_gpio_defines.h" // Macros used for GPIO support code
#include "f2838x_ipc_defines.h" // Macros used for IPC support code.
#include "f2838x_pie_defines.h" // Macros used for PIE examples.
#include "f2838x_dma_defines.h" // Macros used for DMA examples.
#include "f2838x_sdfm_defines.h" // Macros used for SDFM examples.
#include "f2838x_sysctrl_defines.h" // Macros used for LPM support code
#define PARTNO_2838xPACKAGEHERE 0x00
#define CPU_FRQ_200MHZ 1
#define CPU_FRQ_150MHZ 0
#define CPU_FRQ_120MHZ 0
//
// Include files not used with F/BIOS
//
#ifndef F28_BIOS
#include "f2838x_defaultisr.h"
#endif
extern void F28x_usDelay(long LoopCount);
//
// DO NOT MODIFY THIS LINE.
//
#define DELAY_US(A) F28x_usDelay(((((long double) A * 1000.0L) / (long double)CPU_RATE) - 9.0L) / 5.0L)
//
// Timer Operations:
//
//
// Start Timer:
//
#define StartCpuTimer0() CpuTimer0Regs.TCR.bit.TSS = 0
//
// Stop Timer:
//
#define StopCpuTimer0() CpuTimer0Regs.TCR.bit.TSS = 1
//
// Reload Timer With period Value:
//
#define ReloadCpuTimer0() CpuTimer0Regs.TCR.bit.TRB = 1
//
// Read 32-Bit Timer Value:
//
#define ReadCpuTimer0Counter() CpuTimer0Regs.TIM.all
//
// Read 32-Bit Period Value:
//
#define ReadCpuTimer0Period() CpuTimer0Regs.PRD.all
//
// Start Timer:
//
#define StartCpuTimer1() CpuTimer1Regs.TCR.bit.TSS = 0
#define StartCpuTimer2() CpuTimer2Regs.TCR.bit.TSS = 0
//
// Stop Timer:
//
#define StopCpuTimer1() CpuTimer1Regs.TCR.bit.TSS = 1
#define StopCpuTimer2() CpuTimer2Regs.TCR.bit.TSS = 1
//
// Reload Timer With period Value:
//
#define ReloadCpuTimer1() CpuTimer1Regs.TCR.bit.TRB = 1
#define ReloadCpuTimer2() CpuTimer2Regs.TCR.bit.TRB = 1
//
// Read 32-Bit Timer Value:
//
#define ReadCpuTimer1Counter() CpuTimer1Regs.TIM.all
#define ReadCpuTimer2Counter() CpuTimer2Regs.TIM.all
//
// Read 32-Bit Period Value:
//
#define ReadCpuTimer1Period() CpuTimer1Regs.PRD.all
#define ReadCpuTimer2Period() CpuTimer2Regs.PRD.all
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // end of F2838x_EXAMPLES_H definition
//
// End of file
//
@@ -0,0 +1,356 @@
//###########################################################################
//
// FILE: f2838x_globalprototypes.h
//
// TITLE: Global prototypes for F2838x Examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_GLOBALPROTOTYPES_H
#define F2838x_GLOBALPROTOTYPES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Function Prototypes (Shared)
//
extern void EnableInterrupts(void);
extern void InitAPwm1Gpio(void);
extern void InitCAN(void);
extern void InitECap(void);
extern void InitECapGpio(void);
extern void InitECap1Gpio(Uint16 pin);
extern void InitECap2Gpio(Uint16 pin);
extern void InitECap3Gpio(Uint16 pin);
extern void InitECap4Gpio(Uint16 pin);
extern void InitECap5Gpio(Uint16 pin);
extern void InitECap6Gpio(Uint16 pin);
extern void InitECap7Gpio(Uint16 pin);
extern void InitEQep1Gpio(void);
extern void InitEQep2Gpio(void);
extern void InitEQep3Gpio(void);
extern void InitEPwmGpio(void);
extern void InitEPwm1Gpio(void);
extern void InitEPwm2Gpio(void);
extern void InitEPwm3Gpio(void);
extern void InitEPwm4Gpio(void);
extern void InitEPwm5Gpio(void);
extern void InitEPwm6Gpio(void);
extern void InitEPwm7Gpio(void);
extern void InitEPwm8Gpio(void);
extern void InitEPwm9Gpio(void);
extern void InitEPwm10Gpio(void);
extern void InitEPwm11Gpio(void);
extern void InitEPwm12Gpio(void);
extern void InitEPwm13Gpio(void);
extern void InitEPwm14Gpio(void);
extern void InitEPwm15Gpio(void);
extern void InitEPwm16Gpio(void);
extern void InitPeripheralClocks(void);
extern void DisablePeripheralClocks(void);
extern void InitPieCtrl(void);
extern void InitPieVectTable(void);
extern void InitSysCtrl(void);
#ifdef CPU1
extern void InitSysPll(Uint16 clock_source, Uint16 imult, Uint32 refdiv, Uint32 odiv,
Uint16 divsel, Uint32 dccbase);
extern void InitAuxPll(Uint16 clock_source, Uint16 imult, Uint32 refdiv, Uint32 odiv,
Uint16 divsel, Uint32 dccbase);
extern bool IsPLLValid(Uint32 base, Uint16 oscSource, Uint16 pllclk, Uint16 imult,
Uint16 odiv, Uint16 refdiv);
extern bool VerifyXTAL(float freq);
extern void ComputeCntrSeedValue(Uint32 base, float fclk1_0ratio, Uint32 tolerance);
#endif
#define KickDog ServiceDog // For compatibility with previous versions
extern void ServiceDog(void);
extern void DisableDog(void);
extern Uint16 CsmUnlock(void);
extern void SysIntOsc1Sel (void);
extern void SysIntOsc2Sel (void);
extern void SysXtalOscSel (void);
extern void SysXtalOscSESel (void);
extern void AuxIntOsc2Sel (void);
extern void AuxXtalOscSel (void);
extern void AuxAuxClkSel (void);
extern void AuxXtalOscSESel(void);
extern void SetDBGIER(Uint16 dbgier);
//
// CAUTION
// This function MUST be executed out of RAM. Executing it
// out of OTP/Flash will yield unpredictable results
//
extern void InitFlash(void);
extern void InitFlash_Bank0(void);
extern void InitFlash_Bank1(void);
extern void FlashOff(void);
extern void FlashOff_Bank0(void);
extern void FlashOff_Bank1(void);
extern void SeizeFlashPump(void);
extern void SeizeFlashPump_Bank0(void);
extern void SeizeFlashPump_Bank1(void);
extern void ReleaseFlashPump(void);
//
//LPM functions in f2838x_sysctrl.c
//
void IDLE();
void STANDBY();
void HALT();
//
//ADC functions
//
extern void AdcSetMode(Uint16 adc, Uint16 resolution, Uint16 signalmode);
extern void CalAdcINL(Uint16 adc);
//
// DMA Functions
//
extern void DMAInitialize(void);
//
// DMA Channel 1
//
extern void DMACH1AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH1AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH1BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH1TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH1WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH1ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH1(void);
//
// DMA Channel 2
//
extern void DMACH2AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH2AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH2BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH2TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH2WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH2ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH2(void);
//
// DMA Channel 3
//
extern void DMACH3AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH3AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH3BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH3TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH3WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH3ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH3(void);
//
// DMA Channel 4
//
extern void DMACH4AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH4AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH4BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH4TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH4WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH4ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH4(void);
//
// DMA Channel 5
//
extern void DMACH5AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH5AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH5BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH5TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH5WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH5ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH5(void);
//
// DMA Channel 6
//
extern void DMACH6AddrConfig(volatile Uint16 *DMA_Dest,
volatile Uint16 *DMA_Source);
extern void DMACH6AddrConfig32bit(volatile Uint32 *DMA_Dest,
volatile Uint32 *DMA_Source);
extern void DMACH6BurstConfig(Uint16 bsize, int16 srcbstep, int16 desbstep);
extern void DMACH6TransferConfig(Uint16 tsize, int16 srctstep, int16 deststep);
extern void DMACH6WrapConfig(Uint16 srcwsize, int16 srcwstep, Uint16 deswsize,
int16 deswstep);
extern void DMACH6ModeConfig(Uint16 persel, Uint16 perinte, Uint16 oneshot,
Uint16 cont, Uint16 synce, Uint16 syncsel,
Uint16 ovrinte, Uint16 datasize,
Uint16 chintmode,
Uint16 chinte);
extern void StartDMACH6(void);
//
//GPIO Functions
//
extern void InitGpio();
extern void GPIO_SetupPinMux(Uint16 gpioNumber, Uint16 cpu, Uint16 muxPosition);
extern void GPIO_SetupPinOptions(Uint16 gpioNumber, Uint16 output, Uint16 flags);
extern void GPIO_SetupLock(Uint16 gpioNumber, Uint16 flags);
extern void GPIO_SetupXINT1Gpio(Uint16 gpioNumber);
extern void GPIO_SetupXINT2Gpio(Uint16 gpioNumber);
extern void GPIO_SetupXINT3Gpio(Uint16 gpioNumber);
extern void GPIO_SetupXINT4Gpio(Uint16 gpioNumber);
extern void GPIO_SetupXINT5Gpio(Uint16 gpioNumber);
extern void GPIO_SelectIpcInt(Uint16 newFlag);
extern void GPIO_EnableUnbondedIOPullupsFor100Pin(void);
extern void GPIO_EnableUnbondedIOPullupsFor100Pin(void);
extern void GPIO_EnableUnbondedIOPullups(void);
Uint16 GPIO_ReadPin(Uint16 gpioNumber);
void GPIO_WritePin(Uint16 gpioNumber, Uint16 outVal);
//
// CAN Functions
//
extern void CanGpioPinMuxing(Uint32 ulBase, Uint16 canTxRxPin);
extern void CanAGpioConfig(Uint16 canaTxRxPin);
extern void CanBGpioConfig(Uint16 canbTxRxPin);
extern void CanModuleClkSelect(Uint32 ulBase, Uint16 ucSource);
//
// I2C Functions
//
extern void I2cAGpioConfig(Uint16 I2caDataClkPin);
extern void I2cBGpioConfig(Uint16 I2cbDataClkPin);
//
// McBSP functions
// McBSPA
//
extern void InitMcbspa(void);
extern void InitMcbspaInt(void);
extern void InitMcbspa8bit(void);
extern void InitMcbspa12bit(void);
extern void InitMcbspa16bit(void);
extern void InitMcbspa20bit(void);
extern void InitMcbspa24bit(void);
extern void InitMcbspa32bit(void);
extern void InitMcbspaGpio(void);
extern void delay_loop(void);
//
// McBSPB
//
extern void InitMcbspb(void);
extern void InitMcbspbInt(void);
extern void InitMcbspb8bit(void);
extern void InitMcbspb12bit(void);
extern void InitMcbspb16bit(void);
extern void InitMcbspb20bit(void);
extern void InitMcbspb24bit(void);
extern void InitMcbspb32bit(void);
extern void InitMcbspbGpio(void);
//
// Temp Sensor Functions
//
extern void InitTempSensor(float32 vrefhi_voltage);
extern int16_t GetTemperatureC(int16 sensorSample);
extern int16_t GetTemperatureK(int16 sensorSample);
//
// External symbols created by the linker cmd file
// DSP28 examples will use these to relocate code from one LOAD location
// in Flash to a different RUN location in internal
// RAM
//
extern Uint16 RamfuncsLoadStart;
extern Uint16 RamfuncsLoadEnd;
extern Uint16 RamfuncsLoadSize;
extern Uint16 RamfuncsRunStart;
extern Uint16 RamfuncsRunEnd;
extern Uint16 RamfuncsRunSize;
//
// External Boot ROM variable definitions
//
extern Uint16 EmuBMode;
extern Uint16 EmuBootPins;
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_GLOBALPROTOTYPES_H
//
// End of file
//
@@ -0,0 +1,118 @@
//###########################################################################
//
// FILE: f2838x_gpio_defines.h
//
// TITLE: F2838x GPIO support definitions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_GPIO_DEFINES_H
#define F2838x_GPIO_DEFINES_H
//
// Defines
//
//
//CPU pin masters for GPIO_SelectPinMux()
//
#define GPIO_MUX_CPU1 0x0
#define GPIO_MUX_CPU1CLA 0x1
#define GPIO_MUX_CPU2 0x2
#define GPIO_MUX_CPU2CLA 0x3
//
//Flags for GPIO_SetupPinOptions(). The qualification flags (SYNC, QUAL3,
//QUAL6, and ASYNC) take up two bits and must be in the order specified.
//
#define GPIO_INPUT 0
#define GPIO_OUTPUT 1
#define GPIO_PUSHPULL 0
#define GPIO_PULLUP (1 << 0)
#define GPIO_INVERT (1 << 1)
#define GPIO_OPENDRAIN (1 << 2)
#define GPIO_SYNC (0x0 << 4)
#define GPIO_QUAL3 (0x1 << 4)
#define GPIO_QUAL6 (0x2 << 4)
#define GPIO_ASYNC (0x3 << 4)
//
//Flags for GPIO_SetupLock().
//
#define GPIO_UNLOCK 0
#define GPIO_LOCK 1
//
//Commands for the CPU2->CPU1 GPIO configuration interrupt handler
//
#define GPIO_CMD_INIT 1L
#define GPIO_CMD_PINMUX 2L
#define GPIO_CMD_PINOPTS 3L
#define GPIO_CMD_WRITE32 4L
#define GPIO_CMD_WRITE16 5L
#define GPIO_CMD_READ32 6L
#define GPIO_CMD_READ16 7L
//
//Helpful constants for array-based access to GPIO registers
//
#define GPY_CTRL_OFFSET (0x40/2)
#define GPY_DATA_OFFSET (0x8/2)
#define GPYQSEL (0x2/2)
#define GPYMUX (0x6/2)
#define GPYDIR (0xA/2)
#define GPYPUD (0xC/2)
#define GPYINV (0x10/2)
#define GPYODR (0x12/2)
#define GPYGMUX (0x20/2)
#define GPYCSEL (0x28/2)
#define GPYLOCK (0x3C/2)
#define GPYCR (0x3E/2)
#define GPYDAT (0x0/2)
#define GPYSET (0x2/2)
#define GPYCLEAR (0x4/2)
#define GPYTOGGLE (0x6/2)
#endif // end of F2838x_GPIO_DEFINES_H definition
//
// End of file
//
@@ -0,0 +1,154 @@
//###########################################################################
//
// FILE: f2838x_ipc_defines.h
//
// TITLE: F2838x IPC support definitions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_IPC_DEFINES_H
#define F2838x_IPC_DEFINES_H
//
// Defines
//
//
// IPC Flags
//
#ifndef IPC_FLAGS_DEFINED
#define IPC_FLAGS_DEFINED
#define NO_FLAG 0x00000000 // NO FLAG
#define IPC_NO_FLAG 0x00000000 // NO FLAG
#define IPC_FLAG0 0x00000001 // IPC FLAG 0
#define IPC_FLAG1 0x00000002 // IPC FLAG 1
#define IPC_FLAG2 0x00000004 // IPC FLAG 2
#define IPC_FLAG3 0x00000008 // IPC FLAG 3
#define IPC_FLAG4 0x00000010 // IPC FLAG 4
#define IPC_FLAG5 0x00000020 // IPC FLAG 5
#define IPC_FLAG6 0x00000040 // IPC FLAG 6
#define IPC_FLAG7 0x00000080 // IPC FLAG 7
#define IPC_FLAG8 0x00000100 // IPC FLAG 8
#define IPC_FLAG9 0x00000200 // IPC FLAG 9
#define IPC_FLAG10 0x00000400 // IPC FLAG 10
#define IPC_FLAG11 0x00000800 // IPC FLAG 11
#define IPC_FLAG12 0x00001000 // IPC FLAG 12
#define IPC_FLAG13 0x00002000 // IPC FLAG 13
#define IPC_FLAG14 0x00004000 // IPC FLAG 14
#define IPC_FLAG15 0x00008000 // IPC FLAG 15
#define IPC_FLAG16 0x00010000 // IPC FLAG 16
#define IPC_FLAG17 0x00020000 // IPC FLAG 17
#define IPC_FLAG18 0x00040000 // IPC FLAG 18
#define IPC_FLAG19 0x00080000 // IPC FLAG 19
#define IPC_FLAG20 0x00100000 // IPC FLAG 20
#define IPC_FLAG21 0x00200000 // IPC FLAG 21
#define IPC_FLAG22 0x00400000 // IPC FLAG 22
#define IPC_FLAG23 0x00800000 // IPC FLAG 23
#define IPC_FLAG24 0x01000000 // IPC FLAG 24
#define IPC_FLAG25 0x02000000 // IPC FLAG 25
#define IPC_FLAG26 0x04000000 // IPC FLAG 26
#define IPC_FLAG27 0x08000000 // IPC FLAG 27
#define IPC_FLAG28 0x10000000 // IPC FLAG 28
#define IPC_FLAG29 0x20000000 // IPC FLAG 29
#define IPC_FLAG30 0x40000000 // IPC FLAG 30
#define IPC_FLAG31 0x80000000 // IPC FLAG 31
#define IPC_FLAG_ALL 0xFFFFFFFF // All IPC flags
#endif
//
//Key value used for write access to the flash pump semaphore register
//
#define IPC_PUMP_KEY 0x5a5a0000
//
// The following defines are added for legacy reasons.
// All macros are used assuming CPUxTOCPUx_IPC instance
// Usage of driverlib APIs is recommended
//
#define C1TOC2_MSG_RAM ((void *)0x3A000)
#define C2TOC1_MSG_RAM ((void *)0x3B000)
#if defined(CPU1)
#define SEND_MSG_RAM C1TOC2_MSG_RAM
#define RECV_MSG_RAM C2TOC1_MSG_RAM
#elif defined(CPU2)
#define SEND_MSG_RAM C2TOC1_MSG_RAM
#define RECV_MSG_RAM C1TOC2_MSG_RAM
#endif
#define MSG_RAM_SIZE 0x400
#if defined(CPU1)
#define IPCRtoLFlagAcknowledge(f) \
Cpu1toCpu2IpcRegs.CPU1TOCPU2IPCACK.all |= (f)
#define IPCRtoLFlagBusy(f) \
(((Cpu1toCpu2IpcRegs.CPU2TOCPU1IPCSTS.all & (f)) == 0) ? 0 : 1)
#define IPCLtoRFlagBusy(f) \
(((Cpu1toCpu2IpcRegs.CPU1TOCPU2IPCFLG.all & (f)) == 0) ? 0 : 1)
#define IPCLtoRFlagSet(f) \
Cpu1toCpu2IpcRegs.CPU1TOCPU2IPCSET.all |= (f)
#define IPCLtoRFlagClear(f) \
Cpu1toCpu2IpcRegs.CPU1TOCPU2IPCCLR.all |= (f)
#define SeizeFlashPump() \
Cpu1toCpu2IpcRegs.PUMPREQUEST.all = IPC_PUMP_KEY | 0x2
#define ReleaseFlashPump() \
Cpu1toCpu2IpcRegs.PUMPREQUEST.all = IPC_PUMP_KEY | 0x0
#elif defined(CPU2)
#define IPCRtoLFlagAcknowledge(f) \
Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCACK.all |= (f)
#define IPCRtoLFlagBusy(f) \
(((Cpu2toCpu1IpcRegs.CPU1TOCPU2IPCSTS.all & (f)) == 0) ? 0 : 1)
#define IPCLtoRFlagBusy(f) \
(((Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCFLG.all & (f)) == 0) ? 0 : 1)
#define IPCLtoRFlagSet(f) \
Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCSET.all |= (f)
#define IPCLtoRFlagClear(f) \
Cpu2toCpu1IpcRegs.CPU2TOCPU1IPCCLR.all |= (f)
#define SeizeFlashPump() \
Cpu2toCpu1IpcRegs.PUMPREQUEST.all = IPC_PUMP_KEY | 0x1
#define ReleaseFlashPump() \
Cpu2toCpu1IpcRegs.PUMPREQUEST.all = IPC_PUMP_KEY | 0x0
#endif
#endif // end of F2838x_IPC_DEFINES_H definition
//
// End of file
//
@@ -0,0 +1,100 @@
// TI File $Revision: /main/3 $
// Checkin $Date: November 10, 2009 14:05:03 $
//###########################################################################
//
// FILE: mem_wrapper_defines.h
//
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// 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.
// $
//###########################################################################
#define FPGA
//#define PASS 0xABCDABCD
//#define FAIL 0xDEADDEAD
#define TEST_DONE 0x13579BDF
#define M0_START_ADDR 0x00000
#define M1_START_ADDR 0x00400
#define D0_START_ADDR 0x0C000
#define D1_START_ADDR 0x0C800
#define LS0_START_ADDR 0x08000
#define LS1_START_ADDR 0x08800
#define LS2_START_ADDR 0x09000
#define LS3_START_ADDR 0x09800
#define LS4_START_ADDR 0x0A000
#define LS5_START_ADDR 0x0A800
#define LS6_START_ADDR 0x0B000
#define LS7_START_ADDR 0x0B800
#define GS0_START_ADDR 0x0D000
#define GS1_START_ADDR 0x0E000
#define GS2_START_ADDR 0x0F000
#define GS3_START_ADDR 0x10000
#define GS4_START_ADDR 0x11000
#define GS5_START_ADDR 0x12000
#define GS6_START_ADDR 0x13000
#define GS7_START_ADDR 0x14000
#define GS8_START_ADDR 0x15000
#define GS9_START_ADDR 0x16000
#define GS10_START_ADDR 0x17000
#define GS11_START_ADDR 0x18000
#define GS12_START_ADDR 0x19000
#define GS13_START_ADDR 0x1A000
#define GS14_START_ADDR 0x1B000
#define GS15_START_ADDR 0x1C000
#define CPU1TOCPU2MSGRAM_START_ADDR 0x3A000
#define CPU1TOCPU2MSGRAM_END_ADDR 0x3A7FF
#define CPU2TOCPU1MSGRAM_START_ADDR 0x3B000
#define CPU2TOCPU1MSGRAM_END_ADDR 0x3B7FF
#define CMTOCPU1MSGRAM_START_ADDR 0x38000
#define CMTOCPU1MSGRAM_END_ADDR 0x383FF
#define CPU1TOCMMSGRAM_START_ADDR 0x38400
#define CPU1TOCMMSGRAM_END_ADDR 0x387FF
#define CPUTOCLA1MSGRAM_START_ADDR 0x1500
#define CPUTOCLA1MSGRAM_END_ADDR 0x157F
#define CLA1TOCPUMSGRAM_START_ADDR 0x1480
#define CLA1TOCPUMSGRAM_END_ADDR 0x14FF
//===========================================================================
// End of file.
//===========================================================================
@@ -0,0 +1,76 @@
//###########################################################################
//
// FILE: f2838x_pie_defines.h
//
// TITLE: #defines used in PIE examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_PIE_DEFINES_H
#define F2838x_PIE_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
#define PIEACK_GROUP1 0x0001
#define PIEACK_GROUP2 0x0002
#define PIEACK_GROUP3 0x0004
#define PIEACK_GROUP4 0x0008
#define PIEACK_GROUP5 0x0010
#define PIEACK_GROUP6 0x0020
#define PIEACK_GROUP7 0x0040
#define PIEACK_GROUP8 0x0080
#define PIEACK_GROUP9 0x0100
#define PIEACK_GROUP10 0x0200
#define PIEACK_GROUP11 0x0400
#define PIEACK_GROUP12 0x0800
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_PIE_DEFINES_H
//
// End of file
//
@@ -0,0 +1,95 @@
//###########################################################################
//
// FILE: f2838x_sdfm_defines.h
//
// TITLE: #defines used in sdfm examples
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_SDFM_DEFINES_H
#define F2838x_SDFM_DEFINES_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines for backward compatibility
// The registers in f2838x have been renamed from prior devices to make these
// more intuitive & easy to use. Following macros are being added for
// maintaining backward compatibility as a result code ported from prior
// devices can execute as-is.
//
#define IFH1 FLT1_FLG_CEVT1
#define IFH2 FLT2_FLG_CEVT1
#define IFH3 FLT3_FLG_CEVT1
#define IFH4 FLT4_FLG_CEVT1
#define IFL1 FLT1_FLG_CEVT2
#define IFL2 FLT2_FLG_CEVT2
#define IFL3 FLT3_FLG_CEVT2
#define IFL4 FLT4_FLG_CEVT2
#define IEH EN_CEVT1
#define IEL EN_CEVT2
#define SDCMPH1 SDFLT1CMPH1
#define SDCMPH2 SDFLT2CMPH1
#define SDCMPH3 SDFLT3CMPH1
#define SDCMPH4 SDFLT4CMPH1
#define SDCMPL1 SDFLT1CMPL1
#define SDCMPL2 SDFLT2CMPL1
#define SDCMPL3 SDFLT3CMPL1
#define SDCMPL4 SDFLT4CMPL1
#define SDCMPHZ1 SDFLT1CMPHZ
#define SDCMPHZ2 SDFLT2CMPHZ
#define SDCMPHZ3 SDFLT3CMPHZ
#define SDCMPHZ4 SDFLT4CMPHZ
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_SDFM_DEFINES_H
//
// End of file
//
@@ -0,0 +1,532 @@
//###########################################################################
//
// FILE: f2838x_sdfm_drivers.h
//
// TITLE: Defines and Macros for the SDFM driver Controller
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_SDFM_DRIVERS_H
#define F2838x_SDFM_DRIVERS_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Defines
//
//
// This is used to select either SDFM module 1 & SDFM module 2
//
#define SDFM1 1 //Can be used to select SDFM module 1
#define SDFM2 2 //Can be used to select SDFM module 2
//
// Max OSR values of different modules
//
#define COMPARATOR_MAX_OSR 32 //Max OSR for comparator
#define DATA_FILTER_MAX_OSR 256 //Max OSR for Data filter
//
// Different Input Control modes
// These values can be passed as argument to Sdfm_configureInputCtrl()
//
#define MODE_0 0 //Used to select Mode0 :
//Modulator clock rate = Modulator data rate
#define MODE_1 1 //Used to select MODE1 :
//Modulator clock rate = (Modulator data rate / 2)
#define MODE_2 2 //Used to select MODE2 :
//Manchester encoded data
//(Modulator clock is encoded into data)
#define MODE_3 3 //Used to select MODE3 :
//Modulator clock rate = (2 x Modulator data rate)
//
// The following are values that can be passed to following functions
//
// (1) Sdfm_configureInputCtrl()
// (2) Sdfm_configureComparator()
// (3) Sdfm_configureData_filter()
// (4) Sdfm_configureInterrupt()
//
#define FILTER1 0x01 //Used to select filter1 for comparator or Data filter
#define FILTER2 0x02 //Used to select filter2 for comparator or Data filter
#define FILTER3 0x04 //Used to select filter3 for comparator or Data filter
#define FILTER4 0x08 //Used to select filter4 for comparator or Data filter
//
// The following are values that can be passed to Sdfm_configureData_filter()
//
#define FILTER_DISABLE 0 //Used to disable filter
#define FILTER_ENABLE 1 //Used to enable filter
//
// The following are values that can be passed to following functions
//
// (1) Sdfm_configureComparator()
// (2) Sdfm_configureData_filter()
//
#define SINCFAST 0x00 //Used to select Sincfast filter type for comparator
//or Data filter
#define SINC1 0x01 //Used to select Sinc1 filter type for comparator
//or Data filter
#define SINC2 0x02 //Used to select Sinc2 filter type for comparator
//or Data filter
#define SINC3 0x03 //Used to select Sinc3 filter type for comparator
//or Data filter
//
// Enable / Disable High-level threshold interrupt for Comparator filter output
// These values can be passed as argument to Sdfm_configureInterrupt()
//
#define IEH_DISABLE 0 //Used to disable over value interrupt to CPU
#define IEH_ENABLE 1 //Used to enable over value interrupt to CPU
//
// Enable / Disable Low-level threshold interrupt for Comparator filter output
// These values can be passed as argument to Sdfm_configureInterrupt()
//
#define IEL_DISABLE 0 //Used to disable under value interrupt to CPU
#define IEL_ENABLE 1 //Used to enable under value interrupt to CPU
//
//Enable / Disable modulator failure interrupt
// These values can be passed as argument to Sdfm_configureInterrupt()
//
#define MFIE_DISABLE 0 //Used to disable modulator failure interrupt to CPU
#define MFIE_ENABLE 1 //Used to enable modulator failure interrupt to CPU
//
// Enable / Disable Acknowledge flag
// These values can be passed as argument to Sdfm_configureInterrupt()
//
#define AE_DISABLE 0 //Used to disable new filter data acknowledge
//interrupt to CPU
#define AE_ENABLE 1 //Used to enable new filter data acknowledge
//interrupt to CPU
//
// Sinc Filter Reset enable / disable for External Reset from PWM Compare
// output
// This following value can be passed to Sdfm_configureExternalreset()
//
#define FILTER_1_EXT_RESET_DISABLE 0
#define FILTER_1_EXT_RESET_ENABLE 1
#define FILTER_2_EXT_RESET_DISABLE 0
#define FILTER_2_EXT_RESET_ENABLE 1
#define FILTER_3_EXT_RESET_DISABLE 0
#define FILTER_3_EXT_RESET_ENABLE 1
#define FILTER_4_EXT_RESET_DISABLE 0
#define FILTER_4_EXT_RESET_ENABLE 1
//
// Filter output data can be represented in 16 bit (or) 32 bit format
// This value can be passed to Sdfm_configureData_filter()
//
#define DATA_16_BIT 0 //Data stored in 16b 2's complement
#define DATA_32_BIT 1 //Data stored in 32b 2's complement
//
// Macro to read the SDFM1 filter data in 16 bit format
//
#define SDFM1_READ_FILTER1_DATA_16BIT (*(volatile int16 *)((Uint16)0x5E17))
#define SDFM1_READ_FILTER2_DATA_16BIT (*(volatile int16 *)((Uint16)0x5E27))
#define SDFM1_READ_FILTER3_DATA_16BIT (*(volatile int16 *)((Uint16)0x5E37))
#define SDFM1_READ_FILTER4_DATA_16BIT (*(volatile int16 *)((Uint16)0x5E47))
//
// Macro to read the SDFM1 filter data in 32 bit format
//
#define SDFM1_READ_FILTER1_DATA_32BIT (*(volatile int32 *)((Uint16)0x5E16))
#define SDFM1_READ_FILTER2_DATA_32BIT (*(volatile int32 *)((Uint16)0x5E26))
#define SDFM1_READ_FILTER3_DATA_32BIT (*(volatile int32 *)((Uint16)0x5E36))
#define SDFM1_READ_FILTER4_DATA_32BIT (*(volatile int32 *)((Uint16)0x5E46))
//
// Macro to read the SDFM2 filter data in 16 bit format
//
#define SDFM2_READ_FILTER1_DATA_16BIT (*(volatile int16 *)((Uint16)0x5E97))
#define SDFM2_READ_FILTER2_DATA_16BIT (*(volatile int16 *)((Uint16)0x5EA7))
#define SDFM2_READ_FILTER3_DATA_16BIT (*(volatile int16 *)((Uint16)0x5EB7))
#define SDFM2_READ_FILTER4_DATA_16BIT (*(volatile int16 *)((Uint16)0x5EC7))
//
// Macro to read the SDFM2 filter data in 32 bit format
//
#define SDFM2_READ_FILTER1_DATA_32BIT (*(volatile int32 *)((uint16_t)0x5E96))
#define SDFM2_READ_FILTER2_DATA_32BIT (*(volatile int32 *)((uint16_t)0x5EA6))
#define SDFM2_READ_FILTER3_DATA_32BIT (*(volatile int32 *)((uint16_t)0x5EB6))
#define SDFM2_READ_FILTER4_DATA_32BIT (*(volatile int32 *)((uint16_t)0x5EC6))
//
// The following are defines for different OSR values
//
#define OSR_1 0
#define OSR_2 1
#define OSR_3 2
#define OSR_4 3
#define OSR_5 4
#define OSR_6 5
#define OSR_7 6
#define OSR_8 7
#define OSR_9 8
#define OSR_10 9
#define OSR_11 10
#define OSR_12 11
#define OSR_13 12
#define OSR_14 13
#define OSR_15 14
#define OSR_16 15
#define OSR_17 16
#define OSR_18 17
#define OSR_19 18
#define OSR_20 19
#define OSR_21 20
#define OSR_22 21
#define OSR_23 22
#define OSR_24 23
#define OSR_25 24
#define OSR_26 25
#define OSR_27 26
#define OSR_28 27
#define OSR_29 28
#define OSR_30 29
#define OSR_31 30
#define OSR_32 31
#define OSR_33 32
#define OSR_34 33
#define OSR_35 34
#define OSR_36 35
#define OSR_37 36
#define OSR_38 37
#define OSR_39 38
#define OSR_40 39
#define OSR_41 40
#define OSR_42 41
#define OSR_43 42
#define OSR_44 43
#define OSR_45 44
#define OSR_46 45
#define OSR_47 46
#define OSR_48 47
#define OSR_49 48
#define OSR_50 49
#define OSR_51 50
#define OSR_52 51
#define OSR_53 52
#define OSR_54 53
#define OSR_55 54
#define OSR_56 55
#define OSR_57 56
#define OSR_58 57
#define OSR_59 58
#define OSR_60 59
#define OSR_61 60
#define OSR_62 61
#define OSR_63 62
#define OSR_64 63
#define OSR_65 64
#define OSR_66 65
#define OSR_67 66
#define OSR_68 67
#define OSR_69 68
#define OSR_70 69
#define OSR_71 70
#define OSR_72 71
#define OSR_73 72
#define OSR_74 73
#define OSR_75 74
#define OSR_76 75
#define OSR_77 76
#define OSR_78 77
#define OSR_79 78
#define OSR_80 79
#define OSR_81 80
#define OSR_82 81
#define OSR_83 82
#define OSR_84 83
#define OSR_85 84
#define OSR_86 85
#define OSR_87 86
#define OSR_88 87
#define OSR_89 88
#define OSR_90 89
#define OSR_91 90
#define OSR_92 91
#define OSR_93 92
#define OSR_94 93
#define OSR_95 94
#define OSR_96 95
#define OSR_97 96
#define OSR_98 97
#define OSR_99 98
#define OSR_100 99
#define OSR_101 100
#define OSR_102 101
#define OSR_103 102
#define OSR_104 103
#define OSR_105 104
#define OSR_106 105
#define OSR_107 106
#define OSR_108 107
#define OSR_109 108
#define OSR_110 109
#define OSR_111 110
#define OSR_112 111
#define OSR_113 112
#define OSR_114 113
#define OSR_115 114
#define OSR_116 115
#define OSR_117 116
#define OSR_118 117
#define OSR_119 118
#define OSR_120 119
#define OSR_121 120
#define OSR_122 121
#define OSR_123 122
#define OSR_124 123
#define OSR_125 124
#define OSR_126 125
#define OSR_127 126
#define OSR_128 127
#define OSR_129 128
#define OSR_130 129
#define OSR_131 130
#define OSR_132 131
#define OSR_133 132
#define OSR_134 133
#define OSR_135 134
#define OSR_136 135
#define OSR_137 136
#define OSR_138 137
#define OSR_139 138
#define OSR_140 139
#define OSR_141 140
#define OSR_142 141
#define OSR_143 142
#define OSR_144 143
#define OSR_145 144
#define OSR_146 145
#define OSR_147 146
#define OSR_148 147
#define OSR_149 148
#define OSR_150 149
#define OSR_151 150
#define OSR_152 151
#define OSR_153 152
#define OSR_154 153
#define OSR_155 154
#define OSR_156 155
#define OSR_157 156
#define OSR_158 157
#define OSR_159 158
#define OSR_160 159
#define OSR_161 160
#define OSR_162 161
#define OSR_163 162
#define OSR_164 163
#define OSR_165 164
#define OSR_166 165
#define OSR_167 166
#define OSR_168 167
#define OSR_169 168
#define OSR_170 169
#define OSR_171 170
#define OSR_172 171
#define OSR_173 172
#define OSR_174 173
#define OSR_175 174
#define OSR_176 175
#define OSR_177 176
#define OSR_178 177
#define OSR_179 178
#define OSR_180 179
#define OSR_181 180
#define OSR_182 181
#define OSR_183 182
#define OSR_184 183
#define OSR_185 184
#define OSR_186 185
#define OSR_187 186
#define OSR_188 187
#define OSR_189 188
#define OSR_190 189
#define OSR_191 190
#define OSR_192 191
#define OSR_193 192
#define OSR_194 193
#define OSR_195 194
#define OSR_196 195
#define OSR_197 196
#define OSR_198 197
#define OSR_199 198
#define OSR_200 199
#define OSR_201 200
#define OSR_202 201
#define OSR_203 202
#define OSR_204 203
#define OSR_205 204
#define OSR_206 205
#define OSR_207 206
#define OSR_208 207
#define OSR_209 208
#define OSR_210 209
#define OSR_211 210
#define OSR_212 211
#define OSR_213 212
#define OSR_214 213
#define OSR_215 214
#define OSR_216 215
#define OSR_217 216
#define OSR_218 217
#define OSR_219 218
#define OSR_220 219
#define OSR_221 220
#define OSR_222 221
#define OSR_223 222
#define OSR_224 223
#define OSR_225 224
#define OSR_226 225
#define OSR_227 226
#define OSR_228 227
#define OSR_229 228
#define OSR_230 229
#define OSR_231 230
#define OSR_232 231
#define OSR_233 232
#define OSR_234 233
#define OSR_235 234
#define OSR_236 235
#define OSR_237 236
#define OSR_238 237
#define OSR_239 238
#define OSR_240 239
#define OSR_241 240
#define OSR_242 241
#define OSR_243 242
#define OSR_244 243
#define OSR_245 244
#define OSR_246 245
#define OSR_247 246
#define OSR_248 247
#define OSR_249 248
#define OSR_250 249
#define OSR_251 250
#define OSR_252 251
#define OSR_253 252
#define OSR_254 253
#define OSR_255 254
#define OSR_256 255
//
// The following are defines for different OSR values
//
#define SHIFT_0_BITS 0
#define SHIFT_1_BITS 1
#define SHIFT_2_BITS 2
#define SHIFT_3_BITS 3
#define SHIFT_4_BITS 4
#define SHIFT_5_BITS 5
#define SHIFT_6_BITS 6
#define SHIFT_7_BITS 7
#define SHIFT_8_BITS 8
#define SHIFT_9_BITS 9
#define SHIFT_10_BITS 10
#define SHIFT_11_BITS 11
#define SHIFT_12_BITS 12
#define SHIFT_13_BITS 13
#define SHIFT_14_BITS 14
#define SHIFT_15_BITS 15
#define SHIFT_16_BITS 16
#define SHIFT_17_BITS 17
#define SHIFT_18_BITS 18
#define SHIFT_19_BITS 19
#define SHIFT_20_BITS 20
#define SHIFT_21_BITS 21
#define SHIFT_22_BITS 22
#define SHIFT_23_BITS 23
#define SHIFT_24_BITS 24
#define SHIFT_25_BITS 25
#define SHIFT_26_BITS 26
#define SHIFT_27_BITS 27
#define SHIFT_28_BITS 28
#define SHIFT_29_BITS 29
#define SHIFT_30_BITS 30
#define SHIFT_31_BITS 31
//
// Function prototypes
//
extern void Sdfm_configureInputCtrl(Uint16 SDFM_number,
Uint16 Filter_number, Uint16 mode);
extern void Sdfm_configureComparator(Uint16 SDFM_number,
Uint16 Filter_number, Uint16 Filter_type,
Uint16 OSR, Uint32 HLT, Uint32 LLT);
extern void Sdfm_configureData_filter(Uint16 sdfmNumber, Uint16 filterNumber,
Uint16 Filter_switch, Uint16 filterType,
Uint16 OSR, Uint16 DR_switch,
Uint16 shift_bits);
extern void Sdfm_enableMFE(Uint16 SDFM_number);
extern void Sdfm_disableMFE(Uint16 SDFM_number);
extern void Sdfm_configureInterrupt(Uint16 SDFM_number, Uint16 Filter_number,
Uint16 IEH_Switch, Uint16 IEL_Switch,
Uint16 MFIE_Switch, Uint16 AE_Switch);
extern void Sdfm_enableMIE(Uint16 SDFM_number);
extern void Sdfm_disableMIE(Uint16 SDFM_number);
extern void Sdfm_configureExternalreset(Uint16 SDFM_number,
Uint16 filter1_Config_ext_reset,
Uint16 filter2_Config_ext_reset,
Uint16 filter3_Config_ext_reset,
Uint16 filter4_Config_ext_reset);
extern Uint32 Sdfm_readFlagRegister(Uint16 SDFM_number);
extern void Sdfm_clearFlagRegister(Uint16 sdfmNumber,
Uint32 sdfmReadFlagRegister);
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_SDFM_DRIVERS_H
//
// End of file
//
@@ -0,0 +1,84 @@
//###########################################################################
//
// FILE: f2838x_sdfm_strut.h
//
// TITLE: contains structures used for the SDFM driver.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_SDFM_STRUCT_H
#define F2838x_SDFM_STRUCT_H
#ifdef __cplusplus
extern "C" {
#endif
#define MAX_CPUTIMER 4
#define MAX_ECAP 8
#define MAX_EPWM 17
#define MAX_EQEP 4
#define MAX_I2C 3
#define MAX_MCBSP 3
#define MAX_SCI 5
#define MAX_SPI 5
#define MAX_ADC 5
#define MAX_SDFM 3
#define MAX_TRIPSEL 15
extern volatile Uint16 *TRIP_SEL[MAX_TRIPSEL];
extern volatile struct ADC_REGS *ADC[MAX_ADC];
extern volatile struct CPUTIMER_REGS *CPUTIMER[MAX_CPUTIMER];
extern volatile struct ECAP_REGS *ECAP[MAX_ECAP];
extern volatile struct EPWM_REGS *EPWM[MAX_EPWM];
extern volatile struct EQEP_REGS *EQEP[MAX_EQEP];
extern volatile struct I2C_REGS *I2C[MAX_I2C];
extern volatile struct McBSP_REGS *MCBSP[MAX_MCBSP];
extern volatile struct SCI_REGS *SCI[MAX_SCI];
extern volatile struct SPI_REGS *SPI[MAX_SPI];
extern volatile struct SDFM_REGS *SDFM[MAX_SDFM];
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // - end of F2838x_SDFM_STRUCT_H
//
// End of file
//
@@ -0,0 +1,352 @@
//###########################################################################
//
// FILE: f2838x_swprioritizedisrlevels.h
//
// TITLE: F28 Devices Software Prioritized Interrupt Service Routine
// Level definitions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_SW_PRIORITZIED_ISR_H
#define F2838x_SW_PRIORITZIED_ISR_H
#ifdef __cplusplus
extern "C" {
#endif
//
// Interrupt Enable Register Allocation For F2838x Devices:
//
// Interrupts can be enabled/disabled using the CPU interrupt enable register
// (IER) and the PIE interrupt enable registers (PIEIER1 to PIEIER12).
//
//
// Set "Global" Interrupt Priority Level (IER register):
//
// The user must set the appropriate priority level for each of the CPU
// interrupts. This is termed as the "global" priority. The priority level
// must be a number between 1 (highest) to 16 (lowest). A value of 0 must
// be entered for reserved interrupts or interrupts that are not used. This
// will also reduce code size by not including ISR's that are not used.
//
// Note: The priority levels below are used to calculate the IER register
// interrupt masks MINT1 to MINT16.
//
//
// Note: The priority levels shown here may not make sense in a
// real application. This is for demonstration purposes only!!!
//
// The user should change these to values that make sense for
// their application.
//
// 0 = not used
// 1 = highest priority
// ...
// 16 = lowest priority
//
#define INT1PL 2 // Group1 Interrupts (PIEIER1)
#define INT2PL 1 // Group2 Interrupts (PIEIER2)
#define INT3PL 4 // Group3 Interrupts (PIEIER3)
#define INT4PL 2 // Group4 Interrupts (PIEIER4)
#define INT5PL 2 // Group5 Interrupts (PIEIER5)
#define INT6PL 3 // Group6 Interrupts (PIEIER6)
#define INT7PL 5 // Group7 Interrupts (PIEIER6)
#define INT8PL 5 // Group8 Interrupts (PIEIER6)
#define INT9PL 3 // Group9 Interrupts (PIEIER9)
#define INT10PL 6 // Group10 Interrupts (PIEIER6)
#define INT11PL 6 // Group11 Interrupts (PIEIER6)
#define INT12PL 8 // Group12 Interrupts (PIEIER6)
#define INT13PL 4 // INT13 (TINT1)
#define INT14PL 4 // INT14 (TINT2)
#define INT15PL 4 // DATALOG
#define INT16PL 4 // RTOSINT
//
// Set "Group" Interrupt Priority Level (PIEIER1 to PIEIER12 registers):
//
// The user must set the appropriate priority level for each of the PIE
// interrupts. This is termed as the "group" priority. The priority level
// must be a number between 1 (highest) to 16 (lowest). A value of 0 must
// be entered for reserved interrupts or interrupts that are not used. This
// will also reduce code size by not including ISR's that are not used:
//
// Note: The priority levels below are used to calculate the following
// PIEIER register interrupt masks:
// MG1_1 to MG1_16
// MG2_1 to MG2_16
// MG3_1 to MG3_16
// MG4_1 to MG4_16
// MG5_1 to MG5_16
// MG6_1 to MG6_16
// MG7_1 to MG7_16
// MG8_1 to MG8_16
// MG9_1 to MG9_16
// MG10_1 to MG10_16
// MG11_1 to MG11_16
// MG12_1 to MG12_16
//
// Note: The priority levels shown here may not make sense in a
// real application. This is for demonstration purposes only!!!
//
// The user should change these to values that make sense for
// their application.
//
// 0 = not used
// 1 = highest priority
// ...
// 16 = lowest priority
//
#define G1_1PL 5 // ADCA1_INT
#define G1_2PL 3 // ADCB1_INT
#define G1_3PL 1 // ADCC1_INT
#define G1_4PL 4 // XINT1_INT
#define G1_5PL 4 // XINT2_INT
#define G1_6PL 1 // ADCD1_INT
#define G1_7PL 12 // TIMER0_INT
#define G1_8PL 5 // WAKE_INT
#define G1_9PL 16 // I2CA_HIGH_INT
#define G1_10PL 16 // SYS_ERROR_INT
#define G1_11PL 16 // ECATSYNC0_INT
#define G1_12PL 16 // ECAT_INT
#define G1_13PL 8 // IPC0_INT
#define G1_14PL 13 // IPC1_INT
#define G1_15PL 15 // IPC2_INT
#define G1_16PL 9 // IPC3_INT
#define G2_1PL 13 // EPWM1_TZ_INT
#define G2_2PL 1 // EPWM2_TZ_INT
#define G2_3PL 1 // EPWM3_TZ_INT
#define G2_4PL 9 // EPWM4_TZ_INT
#define G2_5PL 3 // EPWM5_TZ_INT
#define G2_6PL 13 // EPWM6_TZ_INT
#define G2_7PL 9 // EPWM7_TZ_INT
#define G2_8PL 13 // EPWM8_TZ_INT
#define G2_9PL 15 // EPWM9_TZ_INT
#define G2_10PL 11 // EPWM10_TZ_INT
#define G2_11PL 7 // EPWM11_TZ_INT
#define G2_12PL 10 // EPWM12_TZ_INT
#define G2_13PL 16 // EPWM13_TZ_INT
#define G2_14PL 16 // EPWM14_TZ_INT
#define G2_15PL 16 // EPWM15_TZ_INT
#define G2_16PL 16 // EPWM16_TZ_INT
#define G3_1PL 5 // EPWM1_INT
#define G3_2PL 9 // EPWM2_INT
#define G3_3PL 5 // EPWM3_INT
#define G3_4PL 2 // EPWM4_INT
#define G3_5PL 12 // EPWM5_INT
#define G3_6PL 4 // EPWM6_INT
#define G3_7PL 2 // EPWM7_INT
#define G3_8PL 13 // EPWM8_INT
#define G3_9PL 4 // EPWM9_INT
#define G3_10PL 12 // EPWM10_INT
#define G3_11PL 4 // EPWM11_INT
#define G3_12PL 14 // EPWM12_INT
#define G3_13PL 16 // EPWM13_INT
#define G3_14PL 16 // EPWM14_INT
#define G3_15PL 16 // EPWM15_INT
#define G3_16PL 16 // EPWM16_INT
#define G4_1PL 3 // ECAP1_INT
#define G4_2PL 3 // ECAP2_INT
#define G4_3PL 3 // ECAP3_INT
#define G4_4PL 6 // ECAP4_INT
#define G4_5PL 7 // ECAP5_INT
#define G4_6PL 7 // ECAP6_INT
#define G4_7PL 7 // ECAP7_INT
#define G4_8PL 0 // Reserved
#define G4_9PL 16 // FSITXA1_INT
#define G4_10PL 16 // FSITXA2_INT
#define G4_11PL 16 // FSITXB1_INT
#define G4_12PL 16 // FSITXB2_INT
#define G4_13PL 16 // FSIRXA1_INT
#define G4_14PL 16 // FSIRXA2_INT
#define G4_15PL 16 // FSIRXB1_INT
#define G4_16PL 16 // FSIRXB2_INT
#define G5_1PL 6 // EQEP1_INT
#define G5_2PL 5 // EQEP2_INT
#define G5_3PL 5 // EQEP3_INT
#define G5_4PL 1 // Reserved
#define G5_5PL 9 // CLB1_INT
#define G5_6PL 10 // CLB2_INT
#define G5_7PL 15 // CLB3_INT
#define G5_8PL 13 // CLB4_INT
#define G5_9PL 12 // SD1_INT
#define G5_10PL 9 // SD2_INT
#define G5_11PL 16 // ECATRST_INT
#define G5_12PL 16 // ECATSYNC1_INT
#define G5_13PL 16 // SDFM1DR1_INT
#define G5_14PL 16 // SDFM1DR2_INT
#define G5_15PL 16 // SDFM1DR3_INT
#define G5_16PL 16 // SDFM1DR4_INT
#define G6_1PL 1 // SPIA_RX_INT
#define G6_2PL 7 // SPIA_TX_INT
#define G6_3PL 3 // SPIB_RX_INT
#define G6_4PL 3 // SPIB_TX_INT
#define G6_5PL 10 // MCBSPA_RX_INT
#define G6_6PL 7 // MCBSPA_TX_INT
#define G6_7PL 6 // MCBSPB_RX_INT
#define G6_8PL 13 // MCBSPB_TX_INT
#define G6_9PL 14 // SPIC_RX_INT
#define G6_10PL 3 // SPIC_TX_INT
#define G6_11PL 16 // SPID_RX_INT
#define G6_12PL 16 // SPID_TX_INT
#define G6_13PL 16 // SDFM2DR1_INT
#define G6_14PL 16 // SDFM2DR2_INT
#define G6_15PL 16 // SDFM2DR3_INT
#define G6_16PL 16 // SDFM2DR4_INT
#define G7_1PL 1 // DMA_CH1_INT
#define G7_2PL 11 // DMA_CH2_INT
#define G7_3PL 14 // DMA_CH3_INT
#define G7_4PL 3 // DMA_CH4_INT
#define G7_5PL 13 // DMA_CH5_INT
#define G7_6PL 14 // DMA_CH6_INT
#define G7_7PL 0 // Reserved
#define G7_8PL 0 // Reserved
#define G7_9PL 0 // FSIRXC1_INT
#define G7_10PL 16 // FSIRXC2_INT
#define G7_11PL 16 // FSIRXD1_INT
#define G7_12PL 16 // FSIRXD2_INT
#define G7_13PL 16 // FSIRXE1_INT
#define G7_14PL 16 // FSIRXE2_INT
#define G7_15PL 16 // FSIRXF1_INT
#define G7_16PL 16 // FSIRXF2_INT
#define G8_1PL 14 // I2CA_INT
#define G8_2PL 10 // I2CA_FIFO_INT
#define G8_3PL 11 // I2CB_INT
#define G8_4PL 9 // I2CB_FIFO_INT
#define G8_5PL 12 // SCIC_RX_INT
#define G8_6PL 2 // SCIC_TX_INT
#define G8_7PL 8 // SCID_RX_INT
#define G8_8PL 7 // SCID_TX_INT
#define G8_9PL 16 // FSIRXG1_INT
#define G8_10PL 16 // FSIRXG2_INT
#define G8_11PL 16 // FSIRXH1_INT
#define G8_12PL 16 // FSIRXH2_INT
#define G8_13PL 16 // Reserved
#define G8_14PL 16 // Reserved
#define G8_15PL 16 // Reserved
#define G8_16PL 16 // Reserved
#define G9_1PL 12 // SCIA_RX_INT
#define G9_2PL 14 // SCIA_TX_INT
#define G9_3PL 11 // SCIB_RX_INT
#define G9_4PL 6 // SCIB_TX_INT
#define G9_5PL 14 // CANA0_INT
#define G9_6PL 10 // CANA1_INT
#define G9_7PL 10 // CANB0_INT
#define G9_8PL 5 // CANB1_INT
#define G9_9PL 16 // MCAN0_INT
#define G9_10PL 16 // MCAN1_INT
#define G9_11PL 16 // Reserved
#define G9_12PL 16 // Reserved
#define G9_13PL 16 // PMBUSA_INT
#define G9_14PL 16 // CM_STATUS_INT
#define G9_15PL 12 // USBA_INT
#define G9_16PL 0 // Reserved
#define G10_1PL 14 // ADCA_EVT_INT
#define G10_2PL 3 // ADCA2_INT
#define G10_3PL 1 // ADCA3_INT
#define G10_4PL 12 // ADCA4_INT
#define G10_5PL 5 // ADCB_EVT_INT
#define G10_6PL 11 // ADCB2_INT
#define G10_7PL 12 // ADCB3_INT
#define G10_8PL 13 // ADCB4_INT
#define G10_9PL 7 // ADCC_EVT_INT
#define G10_10PL 8 // ADCC2_INT
#define G10_11PL 4 // ADCC3_INT
#define G10_12PL 9 // ADCC4_INT
#define G10_13PL 2 // ADCD_EVT_INT
#define G10_14PL 10 // ADCD2_INT
#define G10_15PL 11 // ADCD3_INT
#define G10_16PL 5 // ADCD4_INT
#define G11_1PL 9 // CLA1_1_INT
#define G11_2PL 6 // CLA1_2_INT
#define G11_3PL 9 // CLA1_3_INT
#define G11_4PL 9 // CLA1_4_INT
#define G11_5PL 6 // CLA1_5_INT
#define G11_6PL 13 // CLA1_6_INT
#define G11_7PL 10 // CLA1_7_INT
#define G11_8PL 15 // CLA1_8_INT
#define G11_9PL 16 // CMTOCPUXIPC0_INT
#define G11_10PL 16 // CMTOCPUXIPC1_INT
#define G11_11PL 16 // CMTOCPUXIPC2_INT
#define G11_12PL 16 // CMTOCPUXIPC3_INT
#define G11_13PL 16 // CMTOCPUXIPC4_INT
#define G11_14PL 16 // CMTOCPUXIPC5_INT
#define G11_15PL 16 // CMTOCPUXIPC6_INT
#define G11_16PL 16 // CMTOCPUXIPC7_INT
#define G12_1PL 3 // XINT3_INT
#define G12_2PL 6 // XINT4_INT
#define G12_3PL 10 // XINT5_INT
#define G12_4PL 5 // Reserved
#define G12_5PL 2 // FMC_INT
#define G12_6PL 11 // Reserved
#define G12_7PL 14 // FPU_OVERFLOW_ISR
#define G12_8PL 14 // FPU_UNDERFLOW_ISR
#define G12_9PL 6 // Reserved
#define G12_10PL 5 // ECAP6_2_INT
#define G12_11PL 4 // ECAP7_2_INT
#define G12_12PL 12 // Reserved
#define G12_13PL 8 // CPUCRC_INT
#define G12_14PL 2 // CLA1CRC_INT
#define G12_15PL 12 // CLA_OVERFLOW_INT
#define G12_16PL 2 // CLA_UNDERFLOW_INT
//
// Include the header file with software interrupt prioritization logic
//
#include "sw_interrupt_prioritization_logic.h"
#ifdef __cplusplus
}
#endif /* extern "C" */
#endif // eof
//
// End of file
//
@@ -0,0 +1,58 @@
//###########################################################################
//
// FILE: f2838x_sysctrl_defines.h
//
// TITLE: F2838x LPM support definitions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F2838x_SYSCTRL_DEFINES_H
#define F2838x_SYSCTRL_DEFINES_H
//
// Defines
//
#define LPM_IDLE 0x0
#define LPM_STANDBY 0x1
#endif // end of F2838x_SYSCTRL_DEFINES_H definition
//
// End of file
//
@@ -0,0 +1,60 @@
//###########################################################################
//
// FILE: f28x_project.h
//
// TITLE: F28x Project Headerfile and Examples Include File
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 F28X_PROJECT_H
#define F28X_PROJECT_H
//
// Included Files
//
#include "f2838x_cla_typedefs.h" // F2838x CLA Type definitions
#include "f2838x_device.h" // F2838x Headerfile Include File
#include "f2838x_examples.h" // F2838x Examples Include File
#endif // end of F28X_PROJECT_H definition
//
// End of file
//
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,139 @@
//#############################################################################
//
// FILE: cm.c
//
// TITLE: Communication manager setup for examples.
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "cm.h"
//*****************************************************************************
//
// Function to initialize the device. Primarily initializes system control to a
// known state by disabling the watchdog and enabling the clocks to the peripherals.
//
//*****************************************************************************
void CM_init(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
#ifdef _FLASH
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// 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
//
// Turn on all peripherals
//
CM_enableAllPeripherals();
//
// Sets the NVIC vector table offset address.
//
#ifdef _FLASH
Interrupt_setVectorTableOffset((uint32_t)vectorTableFlash);
#else
Interrupt_setVectorTableOffset((uint32_t)vectorTableRAM);
#endif
}
//*****************************************************************************
//
// Function to turn on all peripherals, enabling reads and writes to the
// peripherals' registers.
//
// Note that to reduce power, unused peripherals should be disabled.
//
//*****************************************************************************
void CM_enableAllPeripherals(void)
{
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_UART0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SSI0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2C0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_USB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ENET);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAT);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CAN_A);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CAN_B);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_MCAN_A);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_UDMA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_AESIP);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_GCRC);
}
//*****************************************************************************
//
// Error handling function to be called when an ASSERT is violated
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
//
// An ASSERT condition was evaluated as false. You can use the filename and
// line parameters to determine what went wrong.
//
__asm(" bkpt #0");
}
@@ -0,0 +1,535 @@
//#############################################################################
//
// FILE: device.c
//
// TITLE: Device setup for examples.
//
//#############################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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"
#ifdef CMDTOOL
#include "device_cmd.h"
#endif
//*****************************************************************************
//
// Function to initialize the device. Primarily initializes system control to a
// known state by disabling the watchdog, setting up the SYSCLKOUT frequency,
// and enabling the clocks to the peripherals.
//
//*****************************************************************************
void Device_init(void)
{
//
// Disable the watchdog
//
SysCtl_disableWatchdog();
#ifdef CMDTOOL
CMD_init();
#endif
#ifdef _FLASH
#ifndef CMDTOOL
//
// Copy time critical code and flash setup code to RAM. This includes the
// following functions: InitFlash();
//
// The RamfuncsLoadStart, RamfuncsLoadSize, and RamfuncsRunStart symbols
// are created by the linker. Refer to the device .cmd file.
//
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
#endif
//
// Call Flash Initialization to setup flash waitstates. This function must
// reside in RAM.
//
Flash_initModule(FLASH0CTRL_BASE, FLASH0ECC_BASE, DEVICE_FLASH_WAITSTATES);
#endif
#ifdef CPU1
//
// Verify the crystal frequency.
// Note: This check can be removed if you are not using XTAL as the PLL
// source
//
if( ((DEVICE_SETCLOCK_CFG & SYSCTL_OSCSRC_M) == SYSCTL_OSCSRC_XTAL) ||
((DEVICE_SETCLOCK_CFG & SYSCTL_OSCSRC_M) == SYSCTL_OSCSRC_XTAL_SE))
{
while(!Device_verifyXTAL(DEVICE_OSCSRC_FREQ / 1000000))
{
//
// The actual XTAL frequency does not match DEVICE_OSCSRC_FREQ!!
// Please check the XTAL frequency used.
//
// By default, the Device_init function assumes 25MHz XTAL.
// If a 20MHz crystal is used, please add a predefined symbol
// "USE_20MHZ_XTAL" in your CCS project.
// If a different XTAL is used, please update the DEVICE_SETCLOCK_CFG
// macro accordingly.
//
// 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.
//
DEVICE_DELAY_US(1000); // Note: oscillator can take up to
// 10ms to start up per data sheet
}
}
//
// Set up PLL control and clock dividers
//
SysCtl_setClock(DEVICE_SETCLOCK_CFG);
//
// Make sure the LSPCLK divider is set to the default (divide by 4)
//
SysCtl_setLowSpeedClock(SYSCTL_LSPCLK_PRESCALE_4);
//
// Set up AUXPLL control and clock dividers needed for CMCLK
//
SysCtl_setAuxClock(DEVICE_AUXSETCLOCK_CFG);
//
// Set up CMCLK to use AUXPLL as the clock source and set the
// clock divider to 1.
//
SysCtl_setCMClk(SYSCTL_CMCLKOUT_DIV_1,SYSCTL_SOURCE_AUXPLL);
// These asserts will check that the #defines for the clock rates in
// device.h match the actual rates that have been configured. If they do
// not match, check that the calculations of DEVICE_SYSCLK_FREQ,
// DEVICE_LSPCLK_FREQ and DEVICE_AUXCLK_FREQ are accurate. Some
// examples will not perform as expected if these are not correct.
//
ASSERT(SysCtl_getClock(DEVICE_OSCSRC_FREQ) == DEVICE_SYSCLK_FREQ);
ASSERT(SysCtl_getLowSpeedClock(DEVICE_OSCSRC_FREQ) == DEVICE_LSPCLK_FREQ);
ASSERT(SysCtl_getAuxClock(DEVICE_OSCSRC_FREQ) == DEVICE_AUXCLK_FREQ);
#ifndef _FLASH
//
// Call Device_cal function when run using debugger
// This function is called as part of the Boot code. The function is called
// in the Device_init function since during debug time resets, the boot code
// will not be executed and the gel script will reinitialize all the
// registers and the calibrated values will be lost.
// Sysctl_deviceCal is a wrapper function for Device_Cal
//
SysCtl_deviceCal();
#endif
#endif
//
// Turn on all peripherals
//
Device_enableAllPeripherals();
Device_initGPIO();
}
#ifdef CPU1
//*****************************************************************************
//
// Function to boot CPU2
// Available bootmodes :
// - BOOTMODE_BOOT_TO_FLASH_SECTOR0
// - BOOTMODE_BOOT_TO_FLASH_SECTOR4
// - BOOTMODE_BOOT_TO_FLASH_SECTOR8
// - BOOTMODE_BOOT_TO_FLASH_SECTOR13
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR0
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR4
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR8
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR13
// - BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM
// - BOOTMODE_BOOT_TO_M0RAM
// - BOOTMODE_BOOT_TO_USEROTP
//
// Note that while using BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM,
// BOOTMODE_IPC_MSGRAM_COPY_LENGTH_xxxW must be ORed with the bootmode parameter
//
// This function must be called after Device_init function
//
//*****************************************************************************
void Device_bootCPU2(uint32_t bootmode)
{
//
// Configure the CPU1TOCPU2IPCBOOTMODE register
//
IPC_setBootMode(IPC_CPU1_L_CPU2_R,
(BOOT_KEY | CPU2_BOOT_FREQ_200MHZ | bootmode));
//
// Set IPC Flag 0
//
IPC_setFlagLtoR(IPC_CPU1_L_CPU2_R, IPC_FLAG0);
//
// Bring CPU2 out of reset. Wait for CPU2 to go out of reset.
//
SysCtl_controlCPU2Reset(SYSCTL_CORE_DEACTIVE);
while(SysCtl_isCPU2Reset() == 0x1U);
}
//*****************************************************************************
//
// Function to boot CM
// Available bootmodes :
// - BOOTMODE_BOOT_TO_FLASH_SECTOR0
// - BOOTMODE_BOOT_TO_FLASH_SECTOR4
// - BOOTMODE_BOOT_TO_FLASH_SECTOR8
// - BOOTMODE_BOOT_TO_FLASH_SECTOR13
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR0
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR4
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR8
// - BOOTMODE_BOOT_TO_SECURE_FLASH_SECTOR13
// - BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_S0RAM
// - BOOTMODE_BOOT_TO_S0RAM
// - BOOTMODE_BOOT_TO_USEROTP
//
// Note that while using BOOTMODE_IPC_MSGRAM_COPY_BOOT_TO_M1RAM,
// BOOTMODE_IPC_MSGRAM_COPY_LENGTH_xxxW must be ORed with the bootmode parameter
//
// This function must be called after Device_init function
//
//*****************************************************************************
void Device_bootCM(uint32_t bootmode)
{
//
// Configure the CPU1TOCMIPCBOOTMODE register
//
IPC_setBootMode(IPC_CPU1_L_CM_R,
(BOOT_KEY | CM_BOOT_FREQ_125MHZ | bootmode));
//
// Set IPC Flag 0
//
IPC_setFlagLtoR(IPC_CPU1_L_CM_R, IPC_FLAG0);
//
// Bring CM out of reset. Wait for CM to go out of reset.
//
SysCtl_controlCMReset(SYSCTL_CORE_DEACTIVE);
while(SysCtl_isCMReset() == 0x1U);
}
#endif
//*****************************************************************************
//
// Function to turn on all peripherals, enabling reads and writes to the
// peripherals' registers.
//
// Note that to reduce power, unused peripherals should be disabled.
//
//*****************************************************************************
void Device_enableAllPeripherals(void)
{
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLA1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DMA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TIMER2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CPUBGCRC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLA1BGCRC);
#ifdef CPU1
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_HRCAL);
#endif
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ERAD);
#ifdef CPU1
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EMIF1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EMIF2);
#endif
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM3);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM4);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM5);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM6);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM7);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM8);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM9);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM10);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM11);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM12);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM13);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM14);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM15);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EPWM16);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP3);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP4);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP5);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP6);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAP7);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EQEP1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EQEP2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_EQEP3);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SD1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SD2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCIC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SCID);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPIA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPIB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPIC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_SPID);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_I2CB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CANA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CANB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_MCBSPA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_MCBSPB);
#ifdef CPU1
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_USBA);
#endif
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCD);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS3);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS4);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS5);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS6);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS7);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CMPSS8);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DACA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DACB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DACC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB3);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB4);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB5);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB6);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB7);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_CLB8);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSITXA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSITXB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXA);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXB);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXC);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXD);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXE);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXF);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXG);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_FSIRXH);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_PMBUSA);
#ifdef CPU1
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC0);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC1);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC2);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ECAT);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_MCANA);
#endif
}
//*****************************************************************************
//
// Function to disable pin locks on GPIOs.
//
//*****************************************************************************
void Device_initGPIO(void)
{
//
// Disable pin locks.
//
GPIO_unlockPortConfig(GPIO_PORT_A, 0xFFFFFFFF);
GPIO_unlockPortConfig(GPIO_PORT_B, 0xFFFFFFFF);
GPIO_unlockPortConfig(GPIO_PORT_C, 0xFFFFFFFF);
GPIO_unlockPortConfig(GPIO_PORT_D, 0xFFFFFFFF);
GPIO_unlockPortConfig(GPIO_PORT_E, 0xFFFFFFFF);
GPIO_unlockPortConfig(GPIO_PORT_F, 0xFFFFFFFF);
//
// Enable GPIO Pullups
//
Device_enableUnbondedGPIOPullups();
}
//*****************************************************************************
//
// Function to enable pullups for the unbonded GPIOs on the 176PTP package:
// GPIOs Grp Bits
// 95-132 C 31
// D 31:0
// E 4:0
// 134-168 E 31:6
// F 8:0
//
//*****************************************************************************
void Device_enableUnbondedGPIOPullupsFor176Pin(void)
{
EALLOW;
HWREG(GPIOCTRL_BASE + GPIO_O_GPCPUD) = ~0x80000000U;
HWREG(GPIOCTRL_BASE + GPIO_O_GPDPUD) = ~0xFFFFFFF7U;
HWREG(GPIOCTRL_BASE + GPIO_O_GPEPUD) = ~0xFFFFFFDFU;
HWREG(GPIOCTRL_BASE + GPIO_O_GPFPUD) = ~0x000001FFU;
EDIS;
}
//*****************************************************************************
//
// Function to enable pullups for the unbonded GPIOs on the
// 176PTP package.
//
//*****************************************************************************
void Device_enableUnbondedGPIOPullups(void)
{
//
// bits 8-10 have pin count
//
uint16_t pinCount = ((HWREG(DEVCFG_BASE + SYSCTL_O_PARTIDL) &
(uint32_t)SYSCTL_PARTIDL_PIN_COUNT_M) >>
SYSCTL_PARTIDL_PIN_COUNT_S);
/*
* 6 = 176 pin
* 7 = 337 pin
*/
if (pinCount == 6)
{
Device_enableUnbondedGPIOPullupsFor176Pin();
}
else
{
//
// Do nothing - this is 337 pin package
//
}
}
//*****************************************************************************
//
// Function to verify the XTAL frequency
// freq is the XTAL frequency in MHz
// The function return true if the the actual XTAL frequency matches with the
// input value
//
// Note that this function assumes that the PLL is not already configured and
// hence uses SysClk freq = 10MHz for DCC calculation
//
//*****************************************************************************
#ifdef CPU1
bool Device_verifyXTAL(float freq)
{
//
// Use DCC to verify the XTAL frequency using INTOSC2 as reference clock
//
//
// Enable DCC0 clock
//
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_DCC0);
//
// Insert atleast 5 cycles delay after enabling the peripheral clock
//
asm(" RPT #5 || NOP");
//
// Configures XTAL as CLKSRC0 and INTOSC2 as CLKSRC1
// Fclk0 = XTAL frequency (input parameter)
// Fclk1 = INTOSC2 frequency = 10MHz
//
// Configuring DCC error tolerance of +/-1%
// INTOSC2 can have a variance in frequency of +/-10%
//
// Assuming PLL is not already configured, SysClk freq = 10MHz
//
// Note : Update the tolerance and INTOSC2 frequency variance as necessary.
//
return (DCC_verifyClockFrequency(DCC0_BASE,
DCC_COUNT1SRC_INTOSC2, 10.0F,
DCC_COUNT0SRC_XTAL, freq,
1.0F, 10.0F, 10.0F));
}
#endif
//*****************************************************************************
//
// Error handling function to be called when an ASSERT is violated
//
//*****************************************************************************
void __error__(const char *filename, uint32_t line)
{
//
// An ASSERT condition was evaluated as false. You can use the filename and
// line parameters to determine what went wrong.
//
ESTOP0;
}
@@ -0,0 +1,274 @@
//###########################################################################
//
// FILE: f2838x_adc.c
//
// TITLE: F2838x Adc Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// AdcSetMode - Set the resolution and signalmode for a given ADC. This will
// ensure that the correct trim is loaded.
//
// NOTE!!! There is no EALLOW/EDIS in this function! You need to make sure you
// perform the EALLOW before calling this function or else the ADC registers
// will not be configured.
//
void AdcSetMode(Uint16 adc, Uint16 resolution, Uint16 signalmode)
{
Uint16 adcOffsetTrim; // temporary ADC offset trim
Uint16 *adcOffsetTrimOTPLoc; // pointer to offset trim location in OTP
//
// Re-populate INL trim
//
CalAdcINL(adc);
//
// Calculate offset trim value based on ADC instance and
// desired resolution
//
adcOffsetTrimOTPLoc = GetAdcOffsetTrimOTPLoc(adc, resolution);
if(TI_OTP_DEV_PRG_KEY_BF == TI_OTP_DEV_KEY_BF)
{
adcOffsetTrim = *(Uint16 *)(adcOffsetTrimOTPLoc);
//
// Offset trim codes for single-ended and differential modes are
// bit-packed in one location. Single-ended offset (signalmode=0)
// is [15:8], differential mode (signalmode=1) is [7:0], hence
// the code below
//
adcOffsetTrim = (signalmode == 0) ?
(adcOffsetTrim >> 8):(adcOffsetTrim & 0xFF);
}
else
{
adcOffsetTrim = 0;
}
//
// Apply the resolution and signalmode to the specified ADC.
// Also apply the offset trim and, if needed, linearity trim correction.
//
switch(adc)
{
case ADC_ADCA:
{
AdcaRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
if(adcOffsetTrim > 0x0)
{
AdcaRegs.ADCOFFTRIM.all = adcOffsetTrim;
}
#ifndef _DUAL_HEADERS
if(ADC_RESOLUTION_12BIT == resolution)
#else
if(ADC_BITRESOLUTION_12BIT == resolution)
#endif
{
AdcaRegs.ADCCTL2.bit.RESOLUTION = 0;
//
// 12-bit linearity trim workaround
//
AdcaRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcaRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
else
{
AdcaRegs.ADCCTL2.bit.RESOLUTION = 1;
}
break;
}
case ADC_ADCB:
{
AdcbRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
if(adcOffsetTrim > 0x0)
{
AdcbRegs.ADCOFFTRIM.all = adcOffsetTrim;
}
#ifndef _DUAL_HEADERS
if(ADC_RESOLUTION_12BIT == resolution)
#else
if(ADC_BITRESOLUTION_12BIT == resolution)
#endif
{
AdcbRegs.ADCCTL2.bit.RESOLUTION = 0;
//
// 12-bit linearity trim workaround
//
AdcbRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcbRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
else
{
AdcbRegs.ADCCTL2.bit.RESOLUTION = 1;
}
break;
}
case ADC_ADCC:
{
AdccRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
if(adcOffsetTrim > 0x0)
{
AdccRegs.ADCOFFTRIM.all = adcOffsetTrim;
}
#ifndef _DUAL_HEADERS
if(ADC_RESOLUTION_12BIT == resolution)
#else
if(ADC_BITRESOLUTION_12BIT == resolution)
#endif
{
AdccRegs.ADCCTL2.bit.RESOLUTION = 0;
//
// 12-bit linearity trim workaround
//
AdccRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdccRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
else
{
AdccRegs.ADCCTL2.bit.RESOLUTION = 1;
}
break;
}
case ADC_ADCD:
{
AdcdRegs.ADCCTL2.bit.SIGNALMODE = signalmode;
if(adcOffsetTrim > 0x0)
{
AdcdRegs.ADCOFFTRIM.all = adcOffsetTrim;
}
#ifndef _DUAL_HEADERS
if(ADC_RESOLUTION_12BIT == resolution)
#else
if(ADC_BITRESOLUTION_12BIT == resolution)
#endif
{
AdcdRegs.ADCCTL2.bit.RESOLUTION = 0;
//
// 12-bit linearity trim workaround
//
AdcdRegs.ADCINLTRIM1 &= 0xFFFF0000;
AdcdRegs.ADCINLTRIM2 &= 0xFFFF0000;
AdcdRegs.ADCINLTRIM4 &= 0xFFFF0000;
AdcdRegs.ADCINLTRIM5 &= 0xFFFF0000;
}
else
{
AdcdRegs.ADCCTL2.bit.RESOLUTION = 1;
}
break;
}
}
}
//
// CalAdcINL - Loads INL trim values from OTP into the trim registers of the
// specified ADC. Use only as part of AdcSetMode function, since
// linearity trim correction is needed for some modes.
//
void CalAdcINL(Uint16 adc)
{
volatile Uint32 *inlRegBaseAddr, *inlOTPBaseAddr;
Uint32 i;
switch(adc)
{
case ADC_ADCA:
//
// Pointer to ADCA trim address base
//
inlRegBaseAddr = &AdcaRegs.ADCINLTRIM1;
break;
case ADC_ADCB:
//
// Pointer to ADCB trim address
//
inlRegBaseAddr = &AdcbRegs.ADCINLTRIM1;
break;
case ADC_ADCC:
//
// Pointer to ADCC trim address
//
inlRegBaseAddr = &AdccRegs.ADCINLTRIM1;
break;
case ADC_ADCD:
//
// Pointer to ADCD trim address
//
inlRegBaseAddr = &AdcdRegs.ADCINLTRIM1;
break;
}
//
// OTP trim location for ADC
//
inlOTPBaseAddr = GetAdcINLTrimOTPLoc(adc);
//
// Populate INL Trim Codes 1 to 6 for respective ADC
//
if(TI_OTP_DEV_PRG_KEY_BF == TI_OTP_DEV_KEY_BF)
{
for(i = 0; i < 6; i++)
{
*inlRegBaseAddr++ = *inlOTPBaseAddr++;
}
}
}
//
// End of file
//
@@ -0,0 +1,113 @@
;//###########################################################################
;//
;// FILE: f2838x_codestartbranch.asm
;//
;// TITLE: Branch for redirecting code execution after boot.
;//
;// For these examples, code_start is the first code that is executed after
;// exiting the boot ROM code.
;//
;// The codestart section in the linker cmd file is used to physically place
;// this code at the correct memory location. This section should be placed
;// at the location the BOOT ROM will re-direct the code to. For example,
;// for boot to FLASH this code will be located at 0x3f7ff6.
;//
;// In addition, the example F2838x projects are setup such that the codegen
;// entry point is also set to the code_start label. This is done by linker
;// option -e in the project build options. When the debugger loads the code,
;// it will automatically set the PC to the "entry point" address indicated by
;// the -e linker option. In this case the debugger is simply assigning the PC,
;// it is not the same as a full reset of the device.
;//
;// The compiler may warn that the entry point for the project is other then
;// _c_init00. _c_init00 is the C environment setup and is run before
;// main() is entered. The code_start code will re-direct the execution
;// to _c_init00 and thus there is no worry and this warning can be ignored.
;//
;//###########################################################################
;//
;//
;//
;// C2000Ware v5.04.00.00
;//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.
;// $
;//###########################################################################
***********************************************************************
WD_DISABLE .set 1 ;set to 1 to disable WD, else set to 0
.ref _c_int00
.global code_start
***********************************************************************
* Function: codestart section
*
* Description: Branch to code starting point
***********************************************************************
.sect "codestart"
.retain
code_start:
.if WD_DISABLE == 1
LB wd_disable ;Branch to watchdog disable code
.else
LB _c_int00 ;Branch to start of boot._asm in RTS library
.endif
;end codestart section
***********************************************************************
* Function: wd_disable
*
* Description: Disables the watchdog timer
***********************************************************************
.if WD_DISABLE == 1
.text
wd_disable:
SETC OBJMODE ;Set OBJMODE for 28x object code
EALLOW ;Enable EALLOW protected register access
MOVZ DP, #7029h>>6 ;Set data page for WDCR register
MOV @7029h, #0068h ;Set WDDIS bit in WDCR to disable WD
EDIS ;Disable EALLOW protected register access
LB _c_int00 ;Branch to start of boot._asm in RTS library
.endif
;end wd_disable
.end
;//
;// End of file.
;//
@@ -0,0 +1,183 @@
//###########################################################################
//
// FILE: f2838x_cputimers.c
//
// TITLE: CPU 32-bit Timers Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// Globals
//
struct CPUTIMER_VARS CpuTimer0;
struct CPUTIMER_VARS CpuTimer1;
struct CPUTIMER_VARS CpuTimer2;
//
// InitCpuTimers - This function initializes all three CPU timers to a known
// state.
//
void InitCpuTimers(void)
{
//
// CPU Timer 0
// Initialize address pointers to respective timer registers:
//
CpuTimer0.RegsAddr = &CpuTimer0Regs;
//
// Initialize timer period to maximum:
//
CpuTimer0Regs.PRD.all = 0xFFFFFFFF;
//
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
//
CpuTimer0Regs.TPR.all = 0;
CpuTimer0Regs.TPRH.all = 0;
//
// Make sure timer is stopped:
//
CpuTimer0Regs.TCR.bit.TSS = 1;
//
// Reload all counter register with period value:
//
CpuTimer0Regs.TCR.bit.TRB = 1;
//
// Reset interrupt counters:
//
CpuTimer0.InterruptCount = 0;
//
// Initialize address pointers to respective timer registers:
//
CpuTimer1.RegsAddr = &CpuTimer1Regs;
CpuTimer2.RegsAddr = &CpuTimer2Regs;
//
// Initialize timer period to maximum:
//
CpuTimer1Regs.PRD.all = 0xFFFFFFFF;
CpuTimer2Regs.PRD.all = 0xFFFFFFFF;
//
// Initialize pre-scale counter to divide by 1 (SYSCLKOUT):
//
CpuTimer1Regs.TPR.all = 0;
CpuTimer1Regs.TPRH.all = 0;
CpuTimer2Regs.TPR.all = 0;
CpuTimer2Regs.TPRH.all = 0;
//
// Make sure timers are stopped:
//
CpuTimer1Regs.TCR.bit.TSS = 1;
CpuTimer2Regs.TCR.bit.TSS = 1;
//
// Reload all counter register with period value:
//
CpuTimer1Regs.TCR.bit.TRB = 1;
CpuTimer2Regs.TCR.bit.TRB = 1;
//
// Reset interrupt counters:
//
CpuTimer1.InterruptCount = 0;
CpuTimer2.InterruptCount = 0;
}
//
// ConfigCpuTimer - This function initializes the selected timer to the period
// specified by the "Freq" and "Period" parameters. The "Freq"
// is entered as "MHz" and the period in "uSeconds". The timer
// is held in the stopped state after configuration.
//
void ConfigCpuTimer(struct CPUTIMER_VARS *Timer, float Freq, float Period)
{
Uint32 temp;
//
// Initialize timer period:
//
Timer->CPUFreqInMHz = Freq;
Timer->PeriodInUSec = Period;
temp = (Uint32) (Freq * Period);
//
// Counter decrements PRD+1 times each period
//
Timer->RegsAddr->PRD.all = temp - 1;
//
// Set pre-scale counter to divide by 1 (SYSCLKOUT):
//
Timer->RegsAddr->TPR.all = 0;
Timer->RegsAddr->TPRH.all = 0;
//
// Initialize timer control register:
//
Timer->RegsAddr->TCR.bit.TSS = 1; // 1 = Stop timer, 0 = Start/Restart
// Timer
Timer->RegsAddr->TCR.bit.TRB = 1; // 1 = reload timer
Timer->RegsAddr->TCR.bit.SOFT = 0;
Timer->RegsAddr->TCR.bit.FREE = 0; // Timer Free Run Disabled
Timer->RegsAddr->TCR.bit.TIE = 1; // 0 = Disable/ 1 = Enable Timer
// Interrupt
//
// Reset interrupt counter:
//
Timer->InterruptCount = 0;
}
//
// End of file
//
@@ -0,0 +1,66 @@
;//###########################################################################
;//
;// FILE: f2838x_dbgier.asm
;//
;// TITLE: Set the DBGIER register
;//
;// DESCRIPTION:
;//
;// Function to set the DBGIER register (for realtime emulation).
;// Function Prototype: void SetDBGIER(Uint16)
;// Usage: SetDBGIER(value);
;// Input Parameters: Uint16 value = value to put in DBGIER register.
;// Return Value: none
;//
;//###########################################################################
;//
;//
;//
;// C2000Ware v5.04.00.00
;//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.
;// $
;//###########################################################################
.if __TI_EABI__
.asg SetDBGIER, _SetDBGIER
.endif
.global _SetDBGIER
.text
_SetDBGIER:
MOV *SP++,AL
POP DBGIER
LRETR
;//
;// End of file
;//
@@ -0,0 +1,151 @@
;;#############################################################################
;;
;; FILE: f2838x_dcsm_z1otp.asm
;;
;; TITLE: Dual Code Security Module Zone 1 OTP
;;
;; DESCRIPTION:
;;
;; This file is used to specify Z1 DCSM OTP and zone select block
;; values to program.
;;
;; !!IMPORTANT!! The below memory sections are mapped to OTP (one-time
;; programmable) memory with the *lnk_DCSM_cpu1.cmd linker command file. In order
;; to program the below memory sections, user should uncomment the .long words
;; of each section and change the value to what is desired. Additionally, the
;; corresponding section of *lnk_DCSM_cpu1.cmd should no longer be labeled as a
;; dummy section. Remove ", type = DSECT" in SECTIONS from the memory section
;; that is being programmed.
;;
;;
;; !!IMPORTANT!! The "dcsm_z1otp_link_pointer" section contains the
;; Z1 LINKPOINTER which determines the location of the Z1 Zone Select block.
;; If the LINKPOINTER is changed, then the "dcsm_zsel_z1" section
;; in the *lnk_DCSM_cpu1.cmd command linker file must also change to an
;; address decoded from the value specified in the Z1-LINKPOINTER location.
;; In this file, the "dcsm_zsel_z1" section maps to ZSB1.
;;
;; The "dcsm_zsel_z1" section contains the actual Z1 Zone Select Block
;; values that will be linked and programmed into to the DCSM Z1 OTP Zone
;; Select block in OTP. In this file, the values seen for the CSMPSWD*
;; are of the ZSB1 CSMPSWD which must be known in order to unlock the
;; CSM module.
;;
;; It is recommended that all values be left as default expected by TRM during code
;; development. These default values do not activate code security and dummy
;; reads of the Z1 DCSM PWL registers is all that is required to unlock the
;; CSM. When code development is complete, modify values to activate the
;; code security module.
;;
;; ******************************WARNING***************************************
;; It is recommended not to program 0xFFFFFFFF to user OTP locations, if users
;; intend to comeback and re-program any of the bits to '0' in future. If user
;; programs 0xFFFFFFFF to any of the OTP locations then the ECC locations would
;; get programmed to a non erased state and users won't be able to comeback
;; and re-program the OTP location to another value. Please refer to DCSM
;; chapter of device TRM for more details on ECC for the locations in DCSM.
;;
;; Hence TI ships this example commenting out the initialization of all the
;; below locations.
;;#############################################################################
;;
;// C2000Ware v5.04.00.00
;//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.
;// $
;;#############################################################################
.sect "dcsm_z1otp_link_pointer"
.retain
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER1
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER2
;; .long 0x00003FFF ;Z1OTP_LINKPOINTER3
.sect "dcsm_z1otp_jlm_enable"
.retain
;; .long 0xFFFF000F ;Z1OTP_JLM_ENABLE
.sect "dcsm_z1otp_gpreg"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_GPREG1
;; .long 0xFFFFFFFF ;Z1OTP_GPREG2
;; .long 0xFFFFFFFF ;Z1OTP_GPREG3
;; .long 0xFFFFFFFF ;Z1OTP_GPREG4
.sect "dcsm_z1otp_pswd_lock"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_PSWDLOCK
.sect "dcsm_z1otp_crc_lock"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_CRCLOCK
.sect "dcsm_z1otp_jtag_pswdh"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_JTAGPSWDH0
;; .long 0xFFFFFFFF ;Z1OTP_JTAGPSWDH1
.sect "dcsm_z1otp_cmac_key"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY0
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY1
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY2
;; .long 0xFFFFFFFF ;Z1OTP_CMACKEY3
.sect "dcsm_zsel_z1"
.retain
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD0 (LSW of 128-bit password)
;; .long 0x4D7FFFFF ;Z1OTP_CSMPSWD1
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD2
;; .long 0xFFFFFFFF ;Z1OTP_CSMPSWD3 (MSW of 128-bit password)
;; .long 0xFFFFFFFF ;Z1OTP_GRABSECT1
;; .long 0xFFFFFFFF ;Z1OTP_GRABSECT2
;; .long 0xFFFFFFFF ;Z1OTP_GRABSECT3
;; .long 0xFFFFFFFF ;Z1OTP_GRABRAM1
;; .long 0xFFFFFFFF ;Z1OTP_GRABRAM2
;; .long 0xFFFFFFFF ;Z1OTP_GRABRAM3
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT1
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYSECT2
;; .long 0xFFFFFFFF ;Z1OTP_EXEONLYRAM1
;; .long 0xFFFFFFFF ;Reserved
;; .long 0xFFFFFFFF ;Z1OTP_JTAGPSWDL0
;; .long 0xFFFFFFFF ;Z1OTP_JTAGPSWDL1
;;----------------------------------------------------------------------
;; For code security operation,after development has completed, prior to
;; production, all other zone select block locations should be programmed
;; to 0x0000 for maximum security.
;;#############################################################################
;; End of file
;;#############################################################################
@@ -0,0 +1,148 @@
;;#############################################################################
;;
;; FILE: f2838x_dcsm_z2otp.asm
;;
;; TITLE: Dual Code Security Module Zone 2 OTP
;;
;; DESCRIPTION:
;;
;; This file is used to specify Z2 DCSM OTP and zone select block
;; values to program.
;;
;; !!IMPORTANT!! The below memory sections are mapped to OTP (one-time
;; programmable) memory with the *lnk_DCSM_cpu1.cmd linker command file. In order
;; to program the below memory sections, user should uncomment the .long words
;; of each section and change the value to what is desired. Additionally, the
;; corresponding section of *lnk_DCSM_cpu1.cmd should no longer be labeled as a
;; dummy section. Remove ", type = DSECT" in SECTIONS from the memory section
;; that is being programmed.
;;
;;
;; !!IMPORTANT!! The "dcsm_z2otp_link_pointer" section contains the
;; Z2 LINKPOINTER which determines the location of the Z2 Zone Select block.
;; If the LINKPOINTER is changed, then the "dcsm_zsel_z2" section
;; in the *lnk_DCSM_cpu1.cmd command linker file must also change to an
;; address decoded from the value specified in the Z2-LINKPOINTER location.
;; In this file, the "dcsm_zsel_z2" section maps to ZSB1.
;;
;; The "dcsm_zsel_z2" section contains the actual Z2 Zone Select Block
;; values that will be linked and programmed into to the DCSM Z2 OTP Zone
;; Select block in OTP. In this file, the values seen for the CSMPSWD*
;; are of the ZSB1 CSMPSWD which must be known in order to unlock the
;; CSM module.
;;
;; It is recommended that all values be left as default expected by TRM during code
;; development. These default values do not activate code security and dummy
;; reads of the Z2 DCSM PWL registers is all that is required to unlock the
;; CSM. When code development is complete, modify values to activate the
;; code security module.
;;
;; ******************************WARNING***************************************
;; It is recommended not to program 0xFFFFFFFF to user OTP locations, if users
;; intend to comeback and re-program any of the bits to '0' in future. If user
;; programs 0xFFFFFFFF to any of the OTP locations then the ECC locations would
;; get programmed to a non erased state and users won't be able to comeback
;; and re-program the OTP location to another value. Please refer to DCSM
;; chapter of device TRM for more details on ECC for the locations in DCSM.
;;
;; Hence TI ships this example commenting out the initialization of all the
;; below locations.
;;#############################################################################
;;
;// C2000Ware v5.04.00.00
;//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.
;// $
;;#############################################################################
.sect "dcsm_z2otp_link_pointer"
.retain
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER1
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER2
;; .long 0x00003FFF ;Z2OTP_LINKPOINTER3
;; Uncomment these lines to allow programming of Zone2 Link pointer which has to
;; be done in either multiples of 64-bits or 128-bits.
.sect "dcsm_rsvd_z2"
.retain
;; .long 0xFFFFFFFF ;Reserved
.sect "dcsm_z2otp_gpreg"
.retain
;; .long 0xFFFFFFFF ;Z2OTP_GPREG1
;; .long 0xFFFFFFFF ;Z2OTP_GPREG2
;; .long 0xFFFFFFFF ;Z2OTP_GPREG3
;; .long 0xFFFFFFFF ;Z2OTP_GPREG4
.sect "dcsm_z2otp_pswd_lock"
.retain
;; .long 0xFFFFFFFF ;Z2OTP_PSWDLOCK
.sect "dcsm_z2otp_crc_lock"
.retain
;; .long 0xFFFFFFFF ;Z2OTP_CRCLOCK
;; Uncomment these lines to allow programming of Zone2 PSWDLOCK & CRCLOCK
;; which has to be done in either multiples of 64-bits or 128-bits.
.sect "dcsm_rsvd1_z2"
.retain
; .long 0xFFFFFFFF ;Reserved
; .long 0xFFFFFFFF ;Reserved
.sect "dcsm_zsel_z2"
.retain
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD0 (LSW of 128-bit password)
;; .long 0x1F7FFFFF ;Z2OTP_CSMPSWD1
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD2
;; .long 0xFFFFFFFF ;Z2OTP_CSMPSWD3 (MSW of 128-bit password)
;; .long 0xFFFFFFFF ;Z2OTP_GRABSECT1
;; .long 0xFFFFFFFF ;Z2OTP_GRABSECT2
;; .long 0xFFFFFFFF ;Z2OTP_GRABSECT3
;; .long 0xFFFFFFFF ;Z2OTP_GRABRAM1
;; .long 0xFFFFFFFF ;Z2OTP_GRABRAM2
;; .long 0xFFFFFFFF ;Z2OTP_GRABRAM3
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYSECT1
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYSECT2
;; .long 0xFFFFFFFF ;Z2OTP_EXEONLYRAM1
;; .long 0xFFFFFFFF ;Reserved
;; .long 0xFFFFFFFF ;Z2OTP_JTAGPSWDL0
;; .long 0xFFFFFFFF ;Z2OTP_JTAGPSWDL1
;;----------------------------------------------------------------------
;; For code security operation,after development has completed, prior to
;; production, all other zone select block locations should be programmed
;; to 0x0000 for maximum security.
;;#############################################################################
;; End of file
;;#############################################################################
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,65 @@
//###########################################################################
//
// FILE: f2838x_ecap.c
//
// TITLE: F2838x eCAP Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// InitAPwm1Gpio - Initialize EPWM1 GPIOs
//
void InitAPwm1Gpio()
{
EALLOW;
OutputXbarRegs.OUTPUT3MUX0TO15CFG.bit.MUX0 = 3; // Select ECAP1.OUT on Mux0
OutputXbarRegs.OUTPUT3MUXENABLE.bit.MUX0 = 1; // Enable MUX0 for ECAP1.OUT
GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 3; // Select OUTPUTXBAR3 on GPIO5
EDIS;
}
//
// End of file
//
@@ -0,0 +1,464 @@
//###########################################################################
//
// FILE: f2838x_emif.c
//
// TITLE: F2838x EMIF Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// Emif1Initialize - This function initializes the EMIF1 to a known state.
//
void Emif1Initialize(void)
{
EALLOW;
//
// Perform a Module soft reset on EMIF
//
#ifdef CPU1
DevCfgRegs.SOFTPRES1.all = 0x1;
__asm (" nop");
DevCfgRegs.SOFTPRES1.all = 0x0;
#endif
EDIS;
}
//
// Emif2Initialize - This function initializes the EMIF2 to a known state.
//
void Emif2Initialize(void)
{
EALLOW;
//
// Perform a Module soft reset on EMIF
//
#ifdef CPU1
DevCfgRegs.SOFTPRES1.all = 0x2;
__asm (" nop");
DevCfgRegs.SOFTPRES1.all = 0x0;
#endif
EDIS;
}
//
// ASync_wait_config - Async wait configuration function
//
void ASync_wait_config(Uint16 inst, Uint16 wait_count, Uint16 wait_polarity)
{
if (inst == 0)
{
//
// 7:0 Maximum Extended Wait cycles.
//
Emif1Regs.ASYNC_WCCR.bit.MAX_EXT_WAIT = wait_count;
//
// 28 Wait Polarity for pad_wait_i[0].
//
Emif1Regs.ASYNC_WCCR.bit.WP0 = wait_polarity;
}
#ifdef CPU1
else
{
//
// 7:0 Maximum Extended Wait cycles.
//
Emif2Regs.ASYNC_WCCR.bit.MAX_EXT_WAIT = wait_count;
//
// 28 Wait Polarity for pad_wait_i[0].
//
Emif2Regs.ASYNC_WCCR.bit.WP0 = wait_polarity;
}
#endif
}
//
// ASync_cs2_config - Async CS2 Configuration
//
void ASync_cs2_config(Uint16 inst, Uint16 async_mem_data_width,
Uint16 turn_around_time, Uint16 r_hold_time,
Uint16 r_strobe_time, Uint16 r_setup, Uint16 w_hold,
Uint16 w_strobe, Uint16 w_setup, Uint16 extend_wait,
Uint16 strobe_sel)
{
if (inst == 0)
{
//
// 1:0 Asynchronous Memory Size.
// 3:2 Turn Around cycles.
// 6:4 Read Strobe Hold cycles.
// 12:7 Read Strobe Duration cycles.
// 16:13 Read Strobe Setup cycles.
// 19:17 Write Strobe Hold cycles.
// 25:20 Write Strobe Duration cycles.
// 29:26 Write Strobe Setup cycles.
// 30 Extend Wait mode.
// 31 Select Strobe mode.
//
Emif1Regs.ASYNC_CS2_CR.bit.ASIZE = async_mem_data_width;
Emif1Regs.ASYNC_CS2_CR.bit.TA= turn_around_time;
Emif1Regs.ASYNC_CS2_CR.bit.R_HOLD= r_hold_time;
Emif1Regs.ASYNC_CS2_CR.bit.R_STROBE = r_strobe_time;
Emif1Regs.ASYNC_CS2_CR.bit.R_SETUP = r_setup;
Emif1Regs.ASYNC_CS2_CR.bit.W_HOLD = w_hold;
Emif1Regs.ASYNC_CS2_CR.bit.W_STROBE = w_strobe;
Emif1Regs.ASYNC_CS2_CR.bit.W_SETUP = w_setup;
Emif1Regs.ASYNC_CS2_CR.bit.EW = extend_wait;
Emif1Regs.ASYNC_CS2_CR.bit.SS = strobe_sel;
}
#ifdef CPU1
else
{
//
// 1:0 Asynchronous Memory Size.
// 3:2 Turn Around cycles.
// 6:4 Read Strobe Hold cycles.
// 12:7 Read Strobe Duration cycles.
// 16:13 Read Strobe Setup cycles.
// 19:17 Write Strobe Hold cycles.
// 25:20 Write Strobe Duration cycles.
// 29:26 Write Strobe Setup cycles.
// 30 Extend Wait mode.
// 31 Select Strobe mode.
//
Emif2Regs.ASYNC_CS2_CR.bit.ASIZE = async_mem_data_width;
Emif2Regs.ASYNC_CS2_CR.bit.TA= turn_around_time;
Emif2Regs.ASYNC_CS2_CR.bit.R_HOLD= r_hold_time;
Emif2Regs.ASYNC_CS2_CR.bit.R_STROBE = r_strobe_time;
Emif2Regs.ASYNC_CS2_CR.bit.R_SETUP = r_setup;
Emif2Regs.ASYNC_CS2_CR.bit.W_HOLD = w_hold;
Emif2Regs.ASYNC_CS2_CR.bit.W_STROBE = w_strobe;
Emif2Regs.ASYNC_CS2_CR.bit.W_SETUP = w_setup;
Emif2Regs.ASYNC_CS2_CR.bit.EW = extend_wait;
Emif2Regs.ASYNC_CS2_CR.bit.SS = strobe_sel;
}
#endif
}
//
// ASync_cs3_config - Async CS3 Configuration
//
void ASync_cs3_config(Uint16 inst, Uint16 async_mem_data_width,
Uint16 turn_around_time, Uint16 r_hold_time,
Uint16 r_strobe_time, Uint16 r_setup, Uint16 w_hold,
Uint16 w_strobe, Uint16 w_setup, Uint16 extend_wait,
Uint16 strobe_sel)
{
//
// 1:0 Asynchronous Memory Size.
// 3:2 Turn Around cycles.
// 6:4 Read Strobe Hold cycles.
// 12:7 Read Strobe Duration cycles.
// 16:13 Read Strobe Setup cycles.
// 19:17 Write Strobe Hold cycles.
// 25:20 Write Strobe Duration cycles.
// 29:26 Write Strobe Setup cycles.
// 30 Extend Wait mode.
// 31 Select Strobe mode.
//
Emif1Regs.ASYNC_CS3_CR.bit.ASIZE = async_mem_data_width;
Emif1Regs.ASYNC_CS3_CR.bit.TA= turn_around_time;
Emif1Regs.ASYNC_CS3_CR.bit.R_HOLD= r_hold_time;
Emif1Regs.ASYNC_CS3_CR.bit.R_STROBE = r_strobe_time;
Emif1Regs.ASYNC_CS3_CR.bit.R_SETUP = r_setup;
Emif1Regs.ASYNC_CS3_CR.bit.W_HOLD = w_hold;
Emif1Regs.ASYNC_CS3_CR.bit.W_STROBE = w_strobe;
Emif1Regs.ASYNC_CS3_CR.bit.W_SETUP = w_setup;
Emif1Regs.ASYNC_CS3_CR.bit.EW = extend_wait;
Emif1Regs.ASYNC_CS3_CR.bit.SS = strobe_sel;
}
//
// ASync_cs4_config - Async CS4 Configuration
//
void ASync_cs4_config(Uint16 inst, Uint16 async_mem_data_width,
Uint16 turn_around_time, Uint16 r_hold_time,
Uint16 r_strobe_time, Uint16 r_setup, Uint16 w_hold,
Uint16 w_strobe, Uint16 w_setup, Uint16 extend_wait,
Uint16 strobe_sel)
{
//
// 1:0 Asynchronous Memory Size.
// 3:2 Turn Around cycles.
// 6:4 Read Strobe Hold cycles.
// 12:7 Read Strobe Duration cycles.
// 16:13 Read Strobe Setup cycles.
// 19:17 Write Strobe Hold cycles.
// 25:20 Write Strobe Duration cycles.
// 29:26 Write Strobe Setup cycles.
// 30 Extend Wait mode.
// 31 Select Strobe mode.
//
Emif1Regs.ASYNC_CS4_CR.bit.ASIZE = async_mem_data_width;
Emif1Regs.ASYNC_CS4_CR.bit.TA= turn_around_time;
Emif1Regs.ASYNC_CS4_CR.bit.R_HOLD= r_hold_time;
Emif1Regs.ASYNC_CS4_CR.bit.R_STROBE = r_strobe_time;
Emif1Regs.ASYNC_CS4_CR.bit.R_SETUP = r_setup;
Emif1Regs.ASYNC_CS4_CR.bit.W_HOLD = w_hold;
Emif1Regs.ASYNC_CS4_CR.bit.W_STROBE = w_strobe;
Emif1Regs.ASYNC_CS4_CR.bit.W_SETUP = w_setup;
Emif1Regs.ASYNC_CS4_CR.bit.EW = extend_wait;
Emif1Regs.ASYNC_CS4_CR.bit.SS = strobe_sel;
}
#ifdef CPU1
//
// setup_emif1_pinmux_async_16bit - function for EMIF1 GPIO pin setup
//
void setup_emif1_pinmux_async_16bit(Uint16 cpu_sel)
{
Uint16 i;
for (i=28; i<=52; i++)
{
if ((i != 42) && (i != 43))
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
for (i=63; i<=87; i++)
{
if (i != 84)
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
GPIO_SetupPinMux(88,cpu_sel,3);
GPIO_SetupPinMux(89,cpu_sel,3);
GPIO_SetupPinMux(90,cpu_sel,3);
GPIO_SetupPinMux(91,cpu_sel,3);
GPIO_SetupPinMux(92,cpu_sel,3);
GPIO_SetupPinMux(93,cpu_sel,3);
GPIO_SetupPinMux(94,cpu_sel,2);
//
// setup async mode and enable pull-ups for Data pins
//
for (i=69; i<=85; i++)
{
if (i != 84)
{
GPIO_SetupPinOptions(i,0,0x31); // GPIO_ASYNC||GPIO_PULLUP
}
}
}
//
// setup_emif1_pinmux_async_32bit - Setup pinmux for 32bit async
//
void setup_emif1_pinmux_async_32bit(Uint16 cpu_sel)
{
Uint16 i;
for (i=28; i<=87; i++)
{
if ((i != 42) && (i != 43) && (i != 84))
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
GPIO_SetupPinMux(88,cpu_sel,3);
GPIO_SetupPinMux(89,cpu_sel,3);
GPIO_SetupPinMux(90,cpu_sel,3);
GPIO_SetupPinMux(91,cpu_sel,3);
GPIO_SetupPinMux(92,cpu_sel,3);
GPIO_SetupPinMux(93,cpu_sel,3);
GPIO_SetupPinMux(94,cpu_sel,2);
//
// setup async mode for Data pins
//
for (i=53; i<=85; i++)
{
if (i != 84)
{
GPIO_SetupPinOptions(i,0,0x31);
}
}
}
//
// setup_emif2_pinmux_async_16bit - function for EMIF2 GPIO pin setup
//
void setup_emif2_pinmux_async_16bit(Uint16 cpu_sel)
{
Uint16 i;
for (i=96; i<=121; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
for (i=53; i<=68; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
//
// setup async mode for Data pins
//
for (i=53; i<=68; i++)
{
GPIO_SetupPinOptions(i,0,0x31);
}
}
//
// setup_emif1_pinmux_sdram_16bit - Setup pinmux for 16bit SDRAM
//
void setup_emif1_pinmux_sdram_16bit(Uint16 cpu_sel)
{
int i;
for (i=29; i<=52; i++)
{
if ((i != 42) && (i != 43))
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
for (i=69; i<=85; i++)
{
if (i != 84)
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
for(i=86; i<=93; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
//
//configure Data pins for Async mode
//
for (i = 69; i <= 85; i++)
{
if (i != 84)
{
GPIO_SetupPinOptions(i,0,0x31);
}
}
GPIO_SetupPinOptions(88,0,0x31);
GPIO_SetupPinOptions(89,0,0x31);
GPIO_SetupPinOptions(90,0,0x31);
GPIO_SetupPinOptions(91,0,0x31);
}
//
// setup_emif2_pinmux_sdram_16bit - Setup pinmux for 16bit SDRAM
//
void setup_emif2_pinmux_sdram_16bit(Uint16 cpu_sel)
{
int i;
for (i=53; i<=68; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
for (i=96; i<=121; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
//
//configure Data pins for Async mode
//
for (i = 53; i <= 68; i++)
{
GPIO_SetupPinOptions(i,0,0x31);
}
}
//
// setup_emif1_pinmux_sdram_32bit - Setup pinmux for 32bit SDRAM
//
void setup_emif1_pinmux_sdram_32bit(Uint16 cpu_sel)
{
int i;
for (i=28; i<=85; i++)
{
if ((i != 42) && (i != 43) && (i != 84))
{
GPIO_SetupPinMux(i,cpu_sel,2);
}
}
for(i=86; i<=93; i++)
{
GPIO_SetupPinMux(i,cpu_sel,3);
}
GPIO_SetupPinMux(94,cpu_sel,2);
//
//configure Data pins for Async mode
//
for (i = 53; i <= 85; i++)
{
if (i != 84)
{
GPIO_SetupPinOptions(i,0,0x31);
}
}
GPIO_SetupPinOptions(88,0,0x31);
GPIO_SetupPinOptions(89,0,0x31);
GPIO_SetupPinOptions(90,0,0x31);
GPIO_SetupPinOptions(91,0,0x31);
}
#endif // CPU1
//
// End of file
//
@@ -0,0 +1,644 @@
//###########################################################################
//
// FILE: f2838x_epwm.c
//
// TITLE: F2838x EPwm Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// InitEPwmGpio - Initialize all EPWM modules' GPIOs
//
void InitEPwmGpio(void)
{
InitEPwm1Gpio();
InitEPwm2Gpio();
InitEPwm3Gpio();
InitEPwm4Gpio();
InitEPwm5Gpio();
InitEPwm6Gpio();
InitEPwm7Gpio();
InitEPwm8Gpio();
InitEPwm9Gpio();
InitEPwm10Gpio();
InitEPwm11Gpio();
InitEPwm12Gpio();
InitEPwm13Gpio();
InitEPwm14Gpio();
InitEPwm15Gpio();
InitEPwm16Gpio();
}
//
// InitEPwm1Gpio - Initialize EPWM1 GPIOs
//
void InitEPwm1Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO0 = 1; // Disable pull-up on GPIO0 (EPWM1A)
GpioCtrlRegs.GPAPUD.bit.GPIO1 = 1; // Disable pull-up on GPIO1 (EPWM1B)
// GpioCtrlRegs.GPEPUD.bit.GPIO145 = 1; // Disable pull-up on GPIO145 (EPWM1A)
// GpioCtrlRegs.GPEPUD.bit.GPIO146 = 1; // Disable pull-up on GPIO146 (EPWM1B)
//
// Configure EPWM-1 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM1 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1; // Configure GPIO0 as EPWM1A
GpioCtrlRegs.GPAMUX1.bit.GPIO1 = 1; // Configure GPIO1 as EPWM1B
// GpioCtrlRegs.GPEMUX2.bit.GPIO145 = 1; // Configure GPIO145 as EPWM1A
// GpioCtrlRegs.GPEMUX2.bit.GPIO146 = 1; // Configure GPIO0146 as EPWM1B
EDIS;
}
//
// InitEPwm2Gpio - Initialize EPWM2 GPIOs
//
void InitEPwm2Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO2 = 1; // Disable pull-up on GPIO2 (EPWM2A)
GpioCtrlRegs.GPAPUD.bit.GPIO3 = 1; // Disable pull-up on GPIO3 (EPWM2B)
// GpioCtrlRegs.GPEPUD.bit.GPIO147 = 1; // Disable pull-up on GPIO147 (EPWM2A)
// GpioCtrlRegs.GPEPUD.bit.GPIO148 = 1; // Disable pull-up on GPIO148 (EPWM2B)
//
// Configure EPwm-2 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM2 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO2 = 1; // Configure GPIO2 as EPWM2A
GpioCtrlRegs.GPAMUX1.bit.GPIO3 = 1; // Configure GPIO3 as EPWM2B
// GpioCtrlRegs.GPEMUX2.bit.GPIO147 = 1; // Configure GPIO147 as EPWM2A
// GpioCtrlRegs.GPEMUX2.bit.GPIO148 = 1; // Configure GPIO148 as EPWM2B
EDIS;
}
//
// InitEPwm3Gpio - Initialize EPWM3 GPIOs
//
void InitEPwm3Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO4 = 1; // Disable pull-up on GPIO4 (EPWM3A)
GpioCtrlRegs.GPAPUD.bit.GPIO5 = 1; // Disable pull-up on GPIO5 (EPWM3B)
// GpioCtrlRegs.GPEPUD.bit.GPIO149 = 1; // Disable pull-up on GPIO149 (EPWM3A)
// GpioCtrlRegs.GPEPUD.bit.GPIO150 = 1; // Disable pull-up on GPIO150 (EPWM3B)
//
// Configure EPwm-3 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM3 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO4 = 1; // Configure GPIO4 as EPWM3A
GpioCtrlRegs.GPAMUX1.bit.GPIO5 = 1; // Configure GPIO5 as EPWM3B
// GpioCtrlRegs.GPEMUX2.bit.GPIO149 = 1; // Configure GPIO149 as EPWM3A
// GpioCtrlRegs.GPEMUX2.bit.GPIO150 = 1; // Configure GPIO150 as EPWM3B
EDIS;
}
//
// InitEPwm4Gpio - Initialize EPWM4 GPIOs
//
void InitEPwm4Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO6 = 1; // Disable pull-up on GPIO6 (EPWM4A)
GpioCtrlRegs.GPAPUD.bit.GPIO7 = 1; // Disable pull-up on GPIO7 (EPWM4B)
// GpioCtrlRegs.GPEPUD.bit.GPIO151 = 1; // Disable pull-up on GPIO151 (EPWM4A)
// GpioCtrlRegs.GPEPUD.bit.GPIO152 = 1; // Disable pull-up on GPIO152 (EPWM4B)
//
// Configure EPWM-4 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM4 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1; // Configure GPIO6 as EPWM4A
GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1; // Configure GPIO7 as EPWM4B
// GpioCtrlRegs.GPEMUX2.bit.GPIO151 = 1; // Configure GPIO151 as EPWM4A
// GpioCtrlRegs.GPEMUX2.bit.GPIO152 = 1; // Configure GPIO152 as EPWM4B
EDIS;
}
//
// InitEPwm5Gpio - Initialize EPWM5 GPIOs
//
void InitEPwm5Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO8 = 1; // Disable pull-up on GPIO8 (EPWM5A)
GpioCtrlRegs.GPAPUD.bit.GPIO9 = 1; // Disable pull-up on GPIO9 (EPWM5B)
// GpioCtrlRegs.GPEPUD.bit.GPIO153 = 1; // Disable pull-up on GPIO153 (EPWM5A)
// GpioCtrlRegs.GPEPUD.bit.GPIO154 = 1; // Disable pull-up on GPIO154 (EPWM5B)
//
// Configure EPWM-5 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM5 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 1; // Configure GPIO8 as EPWM5A
GpioCtrlRegs.GPAMUX1.bit.GPIO9 = 1; // Configure GPIO9 as EPWM5B
// GpioCtrlRegs.GPEMUX2.bit.GPIO153 = 1; // Configure GPIO153 as EPWM5A
// GpioCtrlRegs.GPEMUX2.bit.GPIO154 = 1; // Configure GPIO0154 as EPWM5B
EDIS;
}
//
// InitEPwm6Gpio - Initialize EPWM6 GPIOs
//
void InitEPwm6Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO10 = 1; // Disable pull-up on GPIO10 (EPWM6A)
GpioCtrlRegs.GPAPUD.bit.GPIO11 = 1; // Disable pull-up on GPIO11 (EPWM6B)
// GpioCtrlRegs.GPEPUD.bit.GPIO155 = 1; // Disable pull-up on GPIO155 (EPWM6A)
// GpioCtrlRegs.GPEPUD.bit.GPIO156 = 1; // Disable pull-up on GPIO156 (EPWM6B)
//
// Configure EPWM-6 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM6 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO10 = 1; // Configure GPIO10 as EPWM6A
GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1; // Configure GPIO11 as EPWM6B
// GpioCtrlRegs.GPEMUX2.bit.GPIO155 = 1; // Configure GPIO155 as EPWM6A
// GpioCtrlRegs.GPEMUX2.bit.GPIO156 = 1; // Configure GPIO156 as EPWM6B
EDIS;
}
//
// InitEPwm7Gpio - Initialize EPWM7 GPIOs
//
void InitEPwm7Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO12 = 1; // Disable pull-up on GPIO12 (EPWM7A)
GpioCtrlRegs.GPAPUD.bit.GPIO13 = 1; // Disable pull-up on GPIO13 (EPWM7B)
// GpioCtrlRegs.GPEPUD.bit.GPIO157 = 1; // Disable pull-up on GPIO157 (EPWM7A)
// GpioCtrlRegs.GPEPUD.bit.GPIO158 = 1; // Disable pull-up on GPIO158 (EPWM7B)
//
// Configure EPWM-7 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM7 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 1; // Configure GPIO12 as EPWM7A
GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 1; // Configure GPIO13 as EPWM7B
// GpioCtrlRegs.GPEMUX2.bit.GPIO157 = 1; // Configure GPIO157 as EPWM7A
// GpioCtrlRegs.GPEMUX2.bit.GPIO158 = 1; // Configure GPIO158 as EPWM7B
EDIS;
}
//
// InitEPwm8Gpio - Initialize EPWM8 GPIOs
//
void InitEPwm8Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO14 = 1; // Disable pull-up on GPIO14 (EPWM8A)
GpioCtrlRegs.GPAPUD.bit.GPIO15 = 1; // Disable pull-up on GPIO15 (EPWM8B)
// GpioCtrlRegs.GPEPUD.bit.GPIO159 = 1; // Disable pull-up on GPIO159 (EPWM8A)
// GpioCtrlRegs.GPFPUD.bit.GPIO160 = 1; // Disable pull-up on GPIO160 (EPWM8B)
//
// Configure EPWM-8 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM8 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX1.bit.GPIO14 = 1; // Configure GPIO14 as EPWM8A
GpioCtrlRegs.GPAMUX1.bit.GPIO15 = 1; // Configure GPIO15 as EPWM8B
// GpioCtrlRegs.GPEMUX2.bit.GPIO159 = 1; // Configure GPIO159 as EPWM8A
// GpioCtrlRegs.GPFMUX1.bit.GPIO160 = 1; // Configure GPIO160 as EPWM8B
EDIS;
}
//
// InitEPwm9Gpio - Initialize EPWM9 GPIOs
//
void InitEPwm9Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFPUD.bit.GPIO161 = 1; // Disable pull-up on GPIO161 (EPWM9A)
GpioCtrlRegs.GPFPUD.bit.GPIO162 = 1; // Disable pull-up on GPIO162 (EPWM9B)
// GpioCtrlRegs.GPAPUD.bit.GPIO16 = 1; // Disable pull-up on GPIO16 (EPWM9A)
// GpioCtrlRegs.GPAPUD.bit.GPIO17 = 1; // Disable pull-up on GPIO17 (EPWM9B)
//
// Configure EPWM-9 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM9 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFMUX1.bit.GPIO161 = 1; // Configure GPIO161 as EPWM9A
GpioCtrlRegs.GPFMUX1.bit.GPIO162 = 1; // Configure GPIO162 as EPWM9B
// //
// // Alternate mapping for EPWM-9. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO16 = 0; // Configure GPAMUX to 0 for GPIO16
// GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 0; // Configure GPAMUX to 0 for GPIO17
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO16 = 1; // Configure GPAGMUX for EPWM9A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO17 = 1; // Configure GPAGMUX for EPWM9B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO16 = 1; // Configure GPAMUX for EPWM9A
// GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 1; // Configure GPAMUX for EPWM9B
EDIS;
}
//
// InitEPwm10Gpio - Initialize EPWM10 GPIOs
//
void InitEPwm10Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFPUD.bit.GPIO163 = 1; // Disable pull-up on GPIO163 (EPWM10A)
GpioCtrlRegs.GPFPUD.bit.GPIO164 = 1; // Disable pull-up on GPIO164 (EPWM10B)
// GpioCtrlRegs.GPAPUD.bit.GPIO18 = 1; // Disable pull-up on GPIO18 (EPWM10A)
// GpioCtrlRegs.GPAPUD.bit.GPIO19 = 1; // Disable pull-up on GPIO19 (EPWM10B)
//
// Configure EPWM-10 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM10 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFMUX1.bit.GPIO163 = 1; // Configure GPIO163 as EPWM10A
GpioCtrlRegs.GPFMUX1.bit.GPIO164 = 1; // Configure GPIO164 as EPWM10B
// //
// // Alternate mapping for EPWM-10. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 0; // Configure GPAMUX to 0 for GPIO18
// GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 0; // Configure GPAMUX to 0 for GPIO19
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO18 = 1; // Configure GPAGMUX for EPWM10A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO19 = 1; // Configure GPAGMUX for EPWM10B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 1; // Configure GPAMUX for EPWM10A
// GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 1; // Configure GPAMUX for EPWM10B
EDIS;
}
//
// InitEPwm11Gpio - Initialize EPWM11 GPIOs
//
void InitEPwm11Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFPUD.bit.GPIO165 = 1; // Disable pull-up on GPIO165 (EPWM11A)
GpioCtrlRegs.GPFPUD.bit.GPIO166 = 1; // Disable pull-up on GPIO166 (EPWM11B)
// GpioCtrlRegs.GPAPUD.bit.GPIO20 = 1; // Disable pull-up on GPIO20 (EPWM11A)
// GpioCtrlRegs.GPAPUD.bit.GPIO21 = 1; // Disable pull-up on GPIO21 (EPWM11B)
//
// Configure EPWM-11 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM11 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFMUX1.bit.GPIO165 = 1; // Configure GPIO165 as EPWM11A
GpioCtrlRegs.GPFMUX1.bit.GPIO166 = 1; // Configure GPIO166 as EPWM11B
// //
// // Alternate mapping for EPWM-11. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 0; // Configure GPAMUX to 0 for GPIO20
// GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 0; // Configure GPAMUX to 0 for GPIO21
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO20 = 1; // Configure GPAGMUX for EPWM11A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO21 = 1; // Configure GPAGMUX for EPWM11B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 1; // Configure GPAMUX for EPWM11A
// GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 1; // Configure GPAMUX for EPWM11B
EDIS;
}
//
// InitEPwm12Gpio - Initialize EPWM12 GPIOs
//
void InitEPwm12Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFPUD.bit.GPIO167 = 1; // Disable pull-up on GPIO167 (EPWM12A)
GpioCtrlRegs.GPFPUD.bit.GPIO168 = 1; // Disable pull-up on GPIO168 (EPWM12B)
// GpioCtrlRegs.GPAPUD.bit.GPIO22 = 1; // Disable pull-up on GPIO22 (EPWM12A)
// GpioCtrlRegs.GPAPUD.bit.GPIO23 = 1; // Disable pull-up on GPIO23 (EPWM12B)
//
// Configure EPWM-12 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM12 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPFMUX1.bit.GPIO167 = 1; // Configure GPIO167 as EPWM12A
GpioCtrlRegs.GPFMUX1.bit.GPIO168 = 1; // Configure GPIO168 as EPWM12B
// //
// // Alternate mapping for EPWM-12. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 0; // Configure GPAMUX to 0 for GPIO22
// GpioCtrlRegs.GPAMUX2.bit.GPIO23 = 0; // Configure GPAMUX to 0 for GPIO23
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO22 = 1; // Configure GPAGMUX for EPWM12A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO23 = 1; // Configure GPAGMUX for EPWM12B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 1; // Configure GPAMUX for EPWM12A
// GpioCtrlRegs.GPAMUX2.bit.GPIO23 = 1; // Configure GPAMUX for EPWM12B
EDIS;
}
//
// InitEPwm13Gpio - Initialize EPWM13 GPIOs
//
void InitEPwm13Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEPUD.bit.GPIO137 = 1; // Disable pull-up on GPIO137 (EPWM13A)
GpioCtrlRegs.GPEPUD.bit.GPIO138 = 1; // Disable pull-up on GPIO138 (EPWM13B)
// GpioCtrlRegs.GPAPUD.bit.GPIO24 = 1; // Disable pull-up on GPIO24 (EPWM13A)
// GpioCtrlRegs.GPAPUD.bit.GPIO25 = 1; // Disable pull-up on GPIO25 (EPWM13B)
//
// Configure EPWM-13 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM13 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEMUX1.bit.GPIO137 = 1; // Configure GPIO137 as EPWM13A
GpioCtrlRegs.GPEMUX1.bit.GPIO138 = 1; // Configure GPIO138 as EPWM13B
// //
// // Alternate mapping for EPWM-13. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 0; // Configure GPAMUX to 0 for GPIO24
// GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 0; // Configure GPAMUX to 0 for GPIO25
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO24 = 3; // Configure GPAGMUX for EPWM13A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO25 = 3; // Configure GPAGMUX for EPWM13B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 1; // Configure GPAMUX for EPWM13A
// GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 1; // Configure GPAMUX for EPWM13B
EDIS;
}
//
// InitEPwm14Gpio - Initialize EPWM14 GPIOs
//
void InitEPwm14Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEPUD.bit.GPIO139 = 1; // Disable pull-up on GPIO139 (EPWM14A)
GpioCtrlRegs.GPEPUD.bit.GPIO140 = 1; // Disable pull-up on GPIO140 (EPWM14B)
// GpioCtrlRegs.GPAPUD.bit.GPIO26 = 1; // Disable pull-up on GPIO26 (EPWM14A)
// GpioCtrlRegs.GPAPUD.bit.GPIO27 = 1; // Disable pull-up on GPIO27 (EPWM14B)
//
// Configure EPWM-14 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM14 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEMUX1.bit.GPIO139 = 1; // Configure GPIO139 as EPWM14A
GpioCtrlRegs.GPEMUX1.bit.GPIO140 = 1; // Configure GPIO140 as EPWM14B
// //
// // Alternate mapping for EPWM-14. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 0; // Configure GPAMUX to 0 for GPIO26
// GpioCtrlRegs.GPAMUX2.bit.GPIO27 = 0; // Configure GPAMUX to 0 for GPIO27
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO26 = 3; // Configure GPAGMUX for EPWM14A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO27 = 3; // Configure GPAGMUX for EPWM14B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 1; // Configure GPAMUX for EPWM14A
// GpioCtrlRegs.GPAMUX2.bit.GPIO27 = 1; // Configure GPAMUX for EPWM14B
EDIS;
}
//
// InitEPwm15Gpio - Initialize EPWM15 GPIOs
//
void InitEPwm15Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEPUD.bit.GPIO141 = 1; // Disable pull-up on GPIO141 (EPWM15A)
GpioCtrlRegs.GPEPUD.bit.GPIO142 = 1; // Disable pull-up on GPIO142 (EPWM15B)
// GpioCtrlRegs.GPAPUD.bit.GPIO28 = 1; // Disable pull-up on GPIO28 (EPWM15A)
// GpioCtrlRegs.GPAPUD.bit.GPIO29 = 1; // Disable pull-up on GPIO29 (EPWM15B)
//
// Configure EPWM-15 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM15 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEMUX1.bit.GPIO141 = 1; // Configure GPIO141 as EPWM15A
GpioCtrlRegs.GPEMUX1.bit.GPIO142 = 1; // Configure GPIO142 as EPWM15B
// //
// // Alternate mapping for EPWM-15. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 0; // Configure GPAMUX to 0 for GPIO28
// GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 0; // Configure GPAMUX to 0 for GPIO29
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO28 = 3; // Configure GPAGMUX for EPWM15A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO29 = 3; // Configure GPAGMUX for EPWM15B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 1; // Configure GPAMUX for EPWM15A
// GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 1; // Configure GPAMUX for EPWM15B
EDIS;
}
//
// InitEPwm16Gpio - Initialize EPWM16 GPIOs
//
void InitEPwm16Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins for reduced
// power consumption. Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEPUD.bit.GPIO143 = 1; // Disable pull-up on GPIO141 (EPWM16A)
GpioCtrlRegs.GPEPUD.bit.GPIO144 = 1; // Disable pull-up on GPIO142 (EPWM16B)
// GpioCtrlRegs.GPAPUD.bit.GPIO30 = 1; // Disable pull-up on GPIO28 (EPWM16A)
// GpioCtrlRegs.GPAPUD.bit.GPIO31 = 1; // Disable pull-up on GPIO29 (EPWM16B)
//
// Configure EPWM-16 pins using GPIO regs. This specifies which of the
// possible GPIO pins will be EPWM16 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPEMUX1.bit.GPIO143 = 1; // Configure GPIO141 as EPWM16A
GpioCtrlRegs.GPEMUX2.bit.GPIO144 = 1; // Configure GPIO142 as EPWM16B
// //
// // Alternate mapping for EPWM-16. Uncomment if required. Write 0 to
// // GPAMUx register before configuring GPAGMux to avoid glitches in Mux.
// //
// GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 0; // Configure GPAMUX to 0 for GPIO30
// GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 0; // Configure GPAMUX to 0 for GPIO31
//
// GpioCtrlRegs.GPAGMUX2.bit.GPIO30 = 3; // Configure GPAGMUx for EPWM16A
// GpioCtrlRegs.GPAGMUX2.bit.GPIO31 = 3; // Configure GPAGMux for EPWM16B
//
// GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 1; // Configure GPAMUx for EPWM16A
// GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 1; // Configure GPAMux for EPWM16B
EDIS;
}
//
// End of File
//
@@ -0,0 +1,391 @@
//###########################################################################
//
// FILE: f2838x_eqep.c
//
// TITLE: F2838x eQEP Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// InitEQep - This function initializes the eQEP(s) to a known state.
//
void InitEQep(void)
{
// Initialize eQEP1
//tbd...
}
//
// InitEQepGpio - This function initializes GPIO pins to function as eQEP pins
// Each GPIO pin can be configured as a GPIO pin or up to 3
// different peripheral functional pins. By default all pins
// come up as GPIO inputs after reset.
// Caution:
// For each eQEP peripheral
// Only one GPIO pin should be enabled for EQEPxA operation.
// Only one GPIO pin should be enabled for EQEPxB operation.
// Only one GPIO pin should be enabled for EQEPxS operation.
// Only one GPIO pin should be enabled for EQEPxI operation.
// Comment out other unwanted lines.
//
void InitEQepGpio()
{
InitEQep1Gpio();
InitEQep2Gpio();
InitEQep3Gpio();
}
//
// InitEQep1Gpio - Initialize EQEP-1 GPIOs
// Caution:
// For each eQEP peripheral
// Only one GPIO pin should be enabled for EQEPxA operation.
// Only one GPIO pin should be enabled for EQEPxB operation.
// Only one GPIO pin should be enabled for EQEPxS operation.
// Only one GPIO pin should be enabled for EQEPxI operation.
// Comment out other unwanted lines.
//
void InitEQep1Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins
// for reduced power consumption
// Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAPUD.bit.GPIO10 = 1; // Disable pull-up on GPIO10 (EQEP1A)
// GpioCtrlRegs.GPAPUD.bit.GPIO11 = 1; // Disable pull-up on GPIO11 (EQEP1B)
// GpioCtrlRegs.GPAPUD.bit.GPIO12 = 1; // Disable pull-up on GPIO12 (EQEP1S)
// GpioCtrlRegs.GPAPUD.bit.GPIO13 = 1; // Disable pull-up on GPIO13 (EQEP1I)
GpioCtrlRegs.GPAPUD.bit.GPIO20 = 1; // Disable pull-up on GPIO20 (EQEP1A)
GpioCtrlRegs.GPAPUD.bit.GPIO21 = 1; // Disable pull-up on GPIO21 (EQEP1B)
GpioCtrlRegs.GPAPUD.bit.GPIO22 = 1; // Disable pull-up on GPIO22 (EQEP1S)
GpioCtrlRegs.GPAPUD.bit.GPIO23 = 1; // Disable pull-up on GPIO23 (EQEP1I)
// GpioCtrlRegs.GPBPUD.bit.GPIO50 = 1; // Disable pull-up on GPIO50 (EQEP1A)
// GpioCtrlRegs.GPBPUD.bit.GPIO51 = 1; // Disable pull-up on GPIO51 (EQEP1B)
// GpioCtrlRegs.GPBPUD.bit.GPIO52 = 1; // Disable pull-up on GPIO52 (EQEP1S)
// GpioCtrlRegs.GPBPUD.bit.GPIO53 = 1; // Disable pull-up on GPIO53 (EQEP1I)
// GpioCtrlRegs.GPDPUD.bit.GPIO96 = 1; // Disable pull-up on GPIO96 (EQEP1A)
// GpioCtrlRegs.GPDPUD.bit.GPIO97 = 1; // Disable pull-up on GPIO97 (EQEP1B)
// GpioCtrlRegs.GPDPUD.bit.GPIO98 = 1; // Disable pull-up on GPIO98 (EQEP1S)
// GpioCtrlRegs.GPDPUD.bit.GPIO99 = 1; // Disable pull-up on GPIO99 (EQEP1I)
//
// Synchronize inputs to SYSCLK
// Synchronization can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAQSEL1.bit.GPIO10 = 0; // Sync GPIO10 to SYSCLK (EQEP1A)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO11 = 0; // Sync GPIO11 to SYSCLK (EQEP1B)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 0; // Sync GPIO12 to SYSCLK (EQEP1S)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO13 = 0; // Sync GPIO13 to SYSCLK (EQEP1I)
GpioCtrlRegs.GPAQSEL2.bit.GPIO20 = 0; // Sync GPIO20 to SYSCLK (EQEP1A)
GpioCtrlRegs.GPAQSEL2.bit.GPIO21 = 0; // Sync GPIO21 to SYSCLK (EQEP1B)
GpioCtrlRegs.GPAQSEL2.bit.GPIO22 = 0; // Sync GPIO22 to SYSCLK (EQEP1S)
GpioCtrlRegs.GPAQSEL2.bit.GPIO23 = 0; // Sync GPIO23 to SYSCLK (EQEP1I)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO50 = 0; // Sync GPIO50 to SYSCLK (EQEP1A)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO51 = 0; // Sync GPIO51 to SYSCLK (EQEP1B)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO52 = 0; // Sync GPIO52 to SYSCLK (EQEP1S)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO53 = 0; // Sync GPIO53 to SYSCLK (EQEP1I)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO96 = 0; // Sync GPIO96 to SYSCLK (EQEP1A)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO97 = 0; // Sync GPIO97 to SYSCLK (EQEP1B)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO98 = 0; // Sync GPIO98 to SYSCLK (EQEP1S)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO99 = 0; // Sync GPIO99 to SYSCLK (EQEP1I)
//
// Configure EQEP-1 pins using GPIO regs
// This specifies which of the possible GPIO pins will be EQEP1 functional
// pins.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAGMUX1.bit.GPIO10 = 1; // Configure GPIO10 as EQEP1A
// GpioCtrlRegs.GPAMUX1.bit.GPIO10 = 1; // Configure GPIO10 as EQEP1A
// GpioCtrlRegs.GPAGMUX1.bit.GPIO11 = 1; // Configure GPIO11 as EQEP1B
// GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 1; // Configure GPIO11 as EQEP1B
// GpioCtrlRegs.GPAGMUX1.bit.GPIO12 = 1; // Configure GPIO12 as EQEP1S
// GpioCtrlRegs.GPAMUX1.bit.GPIO12 = 1; // Configure GPIO12 as EQEP1S
// GpioCtrlRegs.GPAGMUX1.bit.GPIO13 = 1; // Configure GPIO13 as EQEP1I
// GpioCtrlRegs.GPAMUX1.bit.GPIO13 = 1; // Configure GPIO13 as EQEP1I
GpioCtrlRegs.GPAMUX2.bit.GPIO20 = 1; // Configure GPIO20 as EQEP1A
GpioCtrlRegs.GPAMUX2.bit.GPIO21 = 1; // Configure GPIO21 as EQEP1B
GpioCtrlRegs.GPAMUX2.bit.GPIO22 = 1; // Configure GPIO22 as EQEP1S
GpioCtrlRegs.GPAMUX2.bit.GPIO23 = 1; // Configure GPIO23 as EQEP1I
// GpioCtrlRegs.GPBMUX2.bit.GPIO50 = 1; // Configure GPIO50 as EQEP1A
// GpioCtrlRegs.GPBMUX2.bit.GPIO51 = 1; // Configure GPIO51 as EQEP1B
// GpioCtrlRegs.GPBMUX2.bit.GPIO52 = 1; // Configure GPIO52 as EQEP1S
// GpioCtrlRegs.GPBMUX2.bit.GPIO53 = 1; // Configure GPIO53 as EQEP1I
// GpioCtrlRegs.GPDGMUX1.bit.GPIO96 = 1; // Configure GPIO96 as EQEP1A
// GpioCtrlRegs.GPDMUX1.bit.GPIO96 = 1; // Configure GPIO96 as EQEP1A
// GpioCtrlRegs.GPDGMUX1.bit.GPIO97 = 1; // Configure GPIO97 as EQEP1B
// GpioCtrlRegs.GPDMUX1.bit.GPIO97 = 1; // Configure GPIO97 as EQEP1B
// GpioCtrlRegs.GPDGMUX1.bit.GPIO98 = 1; // Configure GPIO98 as EQEP1S
// GpioCtrlRegs.GPDMUX1.bit.GPIO98 = 1; // Configure GPIO98 as EQEP1S
// GpioCtrlRegs.GPDGMUX1.bit.GPIO99 = 1; // Configure GPIO99 as EQEP1I
// GpioCtrlRegs.GPDMUX1.bit.GPIO99 = 1; // Configure GPIO99 as EQEP1I
EDIS;
}
//
// InitEQep2Gpio - Initialize EQEP-2 GPIOs
//
void InitEQep2Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins
// for reduced power consumption
// Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAPUD.bit.GPIO24 = 1; // Disable pull-up on GPIO24 (EQEP2A)
GpioCtrlRegs.GPAPUD.bit.GPIO25 = 1; // Disable pull-up on GPIO25 (EQEP2B)
GpioCtrlRegs.GPAPUD.bit.GPIO26 = 1; // Disable pull-up on GPIO26 (EQEP2S)
GpioCtrlRegs.GPAPUD.bit.GPIO27 = 1; // Disable pull-up on GPIO27 (EQEP2I)
// GpioCtrlRegs.GPBPUD.bit.GPIO54 = 1; // Disable pull-up on GPIO54 (EQEP2A)
// GpioCtrlRegs.GPBPUD.bit.GPIO55 = 1; // Disable pull-up on GPIO55 (EQEP2B)
// GpioCtrlRegs.GPBPUD.bit.GPIO56 = 1; // Disable pull-up on GPIO56 (EQEP2S)
// GpioCtrlRegs.GPBPUD.bit.GPIO57 = 1; // Disable pull-up on GPIO57 (EQEP2I)
// GpioCtrlRegs.GPCPUD.bit.GPIO78 = 1; // Disable pull-up on GPIO78 (EQEP2A)
// GpioCtrlRegs.GPCPUD.bit.GPIO79 = 1; // Disable pull-up on GPIO79 (EQEP2B)
// GpioCtrlRegs.GPCPUD.bit.GPIO80 = 1; // Disable pull-up on GPIO80 (EQEP2S)
// GpioCtrlRegs.GPCPUD.bit.GPIO81 = 1; // Disable pull-up on GPIO81 (EQEP2I)
// GpioCtrlRegs.GPDPUD.bit.GPIO100 = 1; // Disable pull-up on GPIO100 (EQEP2A)
// GpioCtrlRegs.GPDPUD.bit.GPIO101 = 1; // Disable pull-up on GPIO101 (EQEP2B)
// GpioCtrlRegs.GPDPUD.bit.GPIO102 = 1; // Disable pull-up on GPIO102 (EQEP2S)
// GpioCtrlRegs.GPDPUD.bit.GPIO103 = 1; // Disable pull-up on GPIO103 (EQEP2I)
//
// Synchronize inputs to SYSCLK
// Synchronization can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAQSEL2.bit.GPIO24 = 0; // Sync GPIO24 to SYSCLK (EQEP2A)
GpioCtrlRegs.GPAQSEL2.bit.GPIO25 = 0; // Sync GPIO25 to SYSCLK (EQEP2B)
GpioCtrlRegs.GPAQSEL2.bit.GPIO26 = 0; // Sync GPIO26 to SYSCLK (EQEP2S)
GpioCtrlRegs.GPAQSEL2.bit.GPIO27 = 0; // Sync GPIO27 to SYSCLK (EQEP2I)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO54 = 0; // Sync GPIO54 to SYSCLK (EQEP2A)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO55 = 0; // Sync GPIO55 to SYSCLK (EQEP2B)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO56 = 0; // Sync GPIO56 to SYSCLK (EQEP2S)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO57 = 0; // Sync GPIO57 to SYSCLK (EQEP2I)
// GpioCtrlRegs.GPCQSEL1.bit.GPIO78 = 0; // Sync GPIO78 to SYSCLK (EQEP2A)
// GpioCtrlRegs.GPCQSEL1.bit.GPIO79 = 0; // Sync GPIO79 to SYSCLK (EQEP2B)
// GpioCtrlRegs.GPCQSEL2.bit.GPIO80 = 0; // Sync GPIO80 to SYSCLK (EQEP2S)
// GpioCtrlRegs.GPCQSEL2.bit.GPIO81 = 0; // Sync GPIO81 to SYSCLK (EQEP2I)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO100 = 0; // Sync GPIO100 to SYSCLK (EQEP2A)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO101 = 0; // Sync GPIO101 to SYSCLK (EQEP2B)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO102 = 0; // Sync GPIO102 to SYSCLK (EQEP2S)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO103 = 0; // Sync GPIO103 to SYSCLK (EQEP2I)
//
// Configure EQEP-1 pins using GPIO regs
// This specifies which of the possible GPIO pins will be EQEP2 functional pins.
// Comment out other unwanted lines.
//
GpioCtrlRegs.GPAMUX2.bit.GPIO24 = 2; // Configure GPIO24 as EQEP2A
GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 2; // Configure GPIO25 as EQEP2B
GpioCtrlRegs.GPAMUX2.bit.GPIO26 = 2; // Configure GPIO26 as EQEP2S
GpioCtrlRegs.GPAMUX2.bit.GPIO27 = 2; // Configure GPIO27 as EQEP2I
// GpioCtrlRegs.GPBGMUX2.bit.GPIO54 = 1; // Configure GPIO54 as EQEP2A
// GpioCtrlRegs.GPBMUX2.bit.GPIO54 = 1; // Configure GPIO54 as EQEP2A
// GpioCtrlRegs.GPBGMUX2.bit.GPIO55 = 1; // Configure GPIO55 as EQEP2B
// GpioCtrlRegs.GPBMUX2.bit.GPIO55 = 1; // Configure GPIO55 as EQEP2B
// GpioCtrlRegs.GPBGMUX2.bit.GPIO56 = 1; // Configure GPIO56 as EQEP2S
// GpioCtrlRegs.GPBMUX2.bit.GPIO56 = 1; // Configure GPIO56 as EQEP2S
// GpioCtrlRegs.GPBGMUX2.bit.GPIO57 = 1; // Configure GPIO57 as EQEP2I
// GpioCtrlRegs.GPBMUX2.bit.GPIO57 = 1; // Configure GPIO57 as EQEP2I
// GpioCtrlRegs.GPCGMUX1.bit.GPIO78 = 1; // Configure GPIO78 as EQEP2A
// GpioCtrlRegs.GPCMUX1.bit.GPIO78 = 2; // Configure GPIO78 as EQEP2A
// GpioCtrlRegs.GPCGMUX1.bit.GPIO79 = 1; // Configure GPIO79 as EQEP2B
// GpioCtrlRegs.GPCMUX1.bit.GPIO79 = 2; // Configure GPIO79 as EQEP2B
// GpioCtrlRegs.GPCGMUX2.bit.GPIO80 = 1; // Configure GPIO80 as EQEP2S
// GpioCtrlRegs.GPCMUX2.bit.GPIO80 = 2; // Configure GPIO80 as EQEP2S
// GpioCtrlRegs.GPCGMUX2.bit.GPIO81 = 1; // Configure GPIO81 as EQEP2I
// GpioCtrlRegs.GPCMUX2.bit.GPIO81 = 2; // Configure GPIO81 as EQEP2I
// GpioCtrlRegs.GPDGMUX1.bit.GPIO100 = 1; // Configure GPIO100 as EQEP2A
// GpioCtrlRegs.GPDMUX1.bit.GPIO100 = 1; // Configure GPIO100 as EQEP2A
// GpioCtrlRegs.GPDGMUX1.bit.GPIO101 = 1; // Configure GPIO101 as EQEP2B
// GpioCtrlRegs.GPDMUX1.bit.GPIO101 = 1; // Configure GPIO101 as EQEP2B
// GpioCtrlRegs.GPDGMUX1.bit.GPIO102 = 1; // Configure GPIO102 as EQEP2S
// GpioCtrlRegs.GPDMUX1.bit.GPIO102 = 1; // Configure GPIO102 as EQEP2S
// GpioCtrlRegs.GPDGMUX1.bit.GPIO103 = 1; // Configure GPIO103 as EQEP2I
// GpioCtrlRegs.GPDMUX1.bit.GPIO103 = 1; // Configure GPIO103 as EQEP2I
EDIS;
}
//
// InitEQep3Gpio - Initialize EQEP-3 GPIOs
//
void InitEQep3Gpio(void)
{
EALLOW;
//
// Disable internal pull-up for the selected output pins
// for reduced power consumption
// Pull-ups can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAPUD.bit.GPIO6 = 1; // Disable pull-up on GPIO6 (EQEP3A)
// GpioCtrlRegs.GPAPUD.bit.GPIO7 = 1; // Disable pull-up on GPIO7 (EQEP3B)
// GpioCtrlRegs.GPAPUD.bit.GPIO8 = 1; // Disable pull-up on GPIO8 (EQEP3S)
// GpioCtrlRegs.GPAPUD.bit.GPIO9 = 1; // Disable pull-up on GPIO9 (EQEP3I)
GpioCtrlRegs.GPAPUD.bit.GPIO28 = 1; // Disable pull-up on GPIO28 (EQEP3A)
GpioCtrlRegs.GPAPUD.bit.GPIO29 = 1; // Disable pull-up on GPIO29 (EQEP3B)
GpioCtrlRegs.GPAPUD.bit.GPIO30 = 1; // Disable pull-up on GPIO30 (EQEP3S)
GpioCtrlRegs.GPAPUD.bit.GPIO31 = 1; // Disable pull-up on GPIO31 (EQEP3I)
// GpioCtrlRegs.GPBPUD.bit.GPIO62 = 1; // Disable pull-up on GPIO62 (EQEP3A)
// GpioCtrlRegs.GPBPUD.bit.GPIO63 = 1; // Disable pull-up on GPIO63 (EQEP3B)
// GpioCtrlRegs.GPCPUD.bit.GPIO64 = 1; // Disable pull-up on GPIO64 (EQEP3S)
// GpioCtrlRegs.GPCPUD.bit.GPIO65 = 1; // Disable pull-up on GPIO65 (EQEP3I)
// GpioCtrlRegs.GPDPUD.bit.GPIO104 = 1; // Disable pull-up on GPIO104 (EQEP3A)
// GpioCtrlRegs.GPDPUD.bit.GPIO105 = 1; // Disable pull-up on GPIO105 (EQEP3B)
// GpioCtrlRegs.GPDPUD.bit.GPIO106 = 1; // Disable pull-up on GPIO106 (EQEP3S)
// GpioCtrlRegs.GPDPUD.bit.GPIO107 = 1; // Disable pull-up on GPIO107 (EQEP3I)
//
// Synchronize inputs to SYSCLK
// Synchronization can be enabled or disabled by the user.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAQSEL1.bit.GPIO6 = 0; // Sync GPIO6 to SYSCLK (EQEP3A)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO7 = 0; // Sync GPIO7 to SYSCLK (EQEP3B)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO8 = 0; // Sync GPIO8 to SYSCLK (EQEP3S)
// GpioCtrlRegs.GPAQSEL1.bit.GPIO9 = 0; // Sync GPIO9 to SYSCLK (EQEP3I)
GpioCtrlRegs.GPAQSEL2.bit.GPIO28 = 0; // Sync GPIO28 to SYSCLK (EQEP3A)
GpioCtrlRegs.GPAQSEL2.bit.GPIO29 = 0; // Sync GPIO29 to SYSCLK (EQEP3B)
GpioCtrlRegs.GPAQSEL2.bit.GPIO30 = 0; // Sync GPIO30 to SYSCLK (EQEP3S)
GpioCtrlRegs.GPAQSEL2.bit.GPIO31 = 0; // Sync GPIO31 to SYSCLK (EQEP3I)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO62 = 0; // Sync GPIO62 to SYSCLK (EQEP3A)
// GpioCtrlRegs.GPBQSEL2.bit.GPIO63 = 0; // Sync GPIO63 to SYSCLK (EQEP3B)
// GpioCtrlRegs.GPCQSEL1.bit.GPIO64 = 0; // Sync GPIO64 to SYSCLK (EQEP3S)
// GpioCtrlRegs.GPCQSEL1.bit.GPIO65 = 0; // Sync GPIO65 to SYSCLK (EQEP3I)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO104 = 0; // Sync GPIO104 to SYSCLK (EQEP3A)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO105 = 0; // Sync GPIO105 to SYSCLK (EQEP3B)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO106 = 0; // Sync GPIO106 to SYSCLK (EQEP3S)
// GpioCtrlRegs.GPDQSEL1.bit.GPIO107 = 0; // Sync GPIO107 to SYSCLK (EQEP3I)
//
// Configure EQEP-1 pins using GPIO regs
// This specifies which of the possible GPIO pins will be EQEP3 functional pins.
// Comment out other unwanted lines.
//
// GpioCtrlRegs.GPAGMUX1.bit.GPIO6 = 1; // Configure GPIO6 as EQEP3A
// GpioCtrlRegs.GPAMUX1.bit.GPIO6 = 1; // Configure GPIO6 as EQEP3A
// GpioCtrlRegs.GPAGMUX1.bit.GPIO7 = 1; // Configure GPIO7 as EQEP3B
// GpioCtrlRegs.GPAMUX1.bit.GPIO7 = 1; // Configure GPIO7 as EQEP3B
// GpioCtrlRegs.GPAGMUX1.bit.GPIO8 = 1; // Configure GPIO8 as EQEP3S
// GpioCtrlRegs.GPAMUX1.bit.GPIO8 = 1; // Configure GPIO8 as EQEP3S
// GpioCtrlRegs.GPAGMUX1.bit.GPIO9 = 1; // Configure GPIO9 as EQEP3I
// GpioCtrlRegs.GPAMUX1.bit.GPIO9 = 1; // Configure GPIO9 as EQEP3I
GpioCtrlRegs.GPAGMUX2.bit.GPIO28 = 1; // Configure GPIO28 as EQEP3A
GpioCtrlRegs.GPAMUX2.bit.GPIO28 = 2; // Configure GPIO28 as EQEP3A
GpioCtrlRegs.GPAGMUX2.bit.GPIO29 = 1; // Configure GPIO29 as EQEP3B
GpioCtrlRegs.GPAMUX2.bit.GPIO29 = 2; // Configure GPIO29 as EQEP3B
GpioCtrlRegs.GPAGMUX2.bit.GPIO30 = 1; // Configure GPIO30 as EQEP3S
GpioCtrlRegs.GPAMUX2.bit.GPIO30 = 2; // Configure GPIO30 as EQEP3S
GpioCtrlRegs.GPAGMUX2.bit.GPIO31 = 1; // Configure GPIO31 as EQEP3I
GpioCtrlRegs.GPAMUX2.bit.GPIO31 = 2; // Configure GPIO31 as EQEP3I
// GpioCtrlRegs.GPBGMUX2.bit.GPIO62 = 1; // Configure GPIO62 as EQEP3A
// GpioCtrlRegs.GPBMUX2.bit.GPIO62 = 1; // Configure GPIO62 as EQEP3A
// GpioCtrlRegs.GPBGMUX2.bit.GPIO63 = 1; // Configure GPIO63 as EQEP3B
// GpioCtrlRegs.GPBMUX2.bit.GPIO63 = 1; // Configure GPIO63 as EQEP3B
// GpioCtrlRegs.GPCGMUX1.bit.GPIO64 = 1; // Configure GPIO64 as EQEP3S
// GpioCtrlRegs.GPCMUX1.bit.GPIO64 = 1; // Configure GPIO64 as EQEP3S
// GpioCtrlRegs.GPCGMUX1.bit.GPIO65 = 1; // Configure GPIO65 as EQEP3I
// GpioCtrlRegs.GPCMUX1.bit.GPIO65 = 1; // Configure GPIO65 as EQEP3I
// GpioCtrlRegs.GPDGMUX1.bit.GPIO104 = 1; // Configure GPIO104 as EQEP3A
// GpioCtrlRegs.GPDMUX1.bit.GPIO104 = 1; // Configure GPIO104 as EQEP3A
// GpioCtrlRegs.GPDGMUX1.bit.GPIO105 = 1; // Configure GPIO105 as EQEP3B
// GpioCtrlRegs.GPDMUX1.bit.GPIO105 = 1; // Configure GPIO105 as EQEP3B
// GpioCtrlRegs.GPDGMUX1.bit.GPIO106 = 1; // Configure GPIO106 as EQEP3S
// GpioCtrlRegs.GPDMUX1.bit.GPIO106 = 1; // Configure GPIO106 as EQEP3S
// GpioCtrlRegs.GPDGMUX1.bit.GPIO107 = 1; // Configure GPIO107 as EQEP3I
// GpioCtrlRegs.GPDMUX1.bit.GPIO107 = 1; // Configure GPIO107 as EQEP3I
EDIS;
}
//
// End of file
//
@@ -0,0 +1,474 @@
//###########################################################################
//
// FILE: f2838x_gpio.c
//
// TITLE: GPIO module support functions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
//Low-level functions for GPIO configuration (CPU1 only)
//
#ifdef CPU1
//
// InitGpio - Sets all pins to be muxed to GPIO in input mode.
// Also resets CPU control to CPU1 and disables open
// drain and polarity inversion and sets the qualification to
// synchronous. Also unlocks all GPIOs. Only one CPU should call
// this function.
//
void InitGpio()
{
volatile Uint32 *gpioBaseAddr;
Uint16 regOffset;
//
//Disable pin locks
//
EALLOW;
GpioCtrlRegs.GPALOCK.all = 0x00000000;
GpioCtrlRegs.GPBLOCK.all = 0x00000000;
GpioCtrlRegs.GPCLOCK.all = 0x00000000;
GpioCtrlRegs.GPDLOCK.all = 0x00000000;
GpioCtrlRegs.GPELOCK.all = 0x00000000;
GpioCtrlRegs.GPFLOCK.all = 0x00000000;
//
// Fill all registers with zeros. Writing to each register separately
// for six GPIO modules would make this function *very* long.
// Fortunately, we'd be writing them all with zeros anyway, so this
// saves a lot of space.
//
gpioBaseAddr = (Uint32 *)&GpioCtrlRegs;
for (regOffset = 0; regOffset < sizeof(GpioCtrlRegs)/2; regOffset++)
{
//
//Hack to avoid enabling pull-ups on all pins. GPyPUD is offset
//0x0C in each register group of 0x40 words. Since this is a
//32-bit pointer, the addresses must be divided by 2.
//
if (regOffset % (0x40/2) != (0x0C/2))
{
gpioBaseAddr[regOffset] = 0x00000000;
}
}
gpioBaseAddr = (Uint32 *)&GpioDataRegs;
for (regOffset = 0; regOffset < sizeof(GpioDataRegs)/2; regOffset++)
{
gpioBaseAddr[regOffset] = 0x00000000;
}
EDIS;
}
//
// GPIO_SetupPinMux - Set the peripheral muxing for the specified pin. The
// appropriate parameters can be found in the GPIO Muxed
// Pins table(4.4) in the datasheet. Use the GPIO index
// row (0 to 15) to select a muxing option for the GPIO.
//
void GPIO_SetupPinMux(Uint16 gpioNumber, Uint16 cpu, Uint16 muxPosition)
{
volatile Uint32 *gpioBaseAddr;
volatile Uint32 *mux, *gmux, *csel;
Uint16 pin32, pin16, pin8;
pin32 = gpioNumber % 32;
pin16 = gpioNumber % 16;
pin8 = gpioNumber % 8;
gpioBaseAddr = (Uint32 *)&GpioCtrlRegs + (gpioNumber/32)*GPY_CTRL_OFFSET;
//
//Sanity check for valid cpu and peripheral values
//
if (cpu > GPIO_MUX_CPU2CLA || muxPosition > 0xF)
return;
//
//Create pointers to the appropriate registers. This is a workaround
//for the way GPIO registers are defined. The standard definition
//in the header file makes it very easy to do named accesses of one
//register or bit, but hard to do arbitrary numerical accesses. It's
//easier to have an array of GPIO modules with identical registers,
//including arrays for multi-register groups like GPyCSEL1-4. But
//the header file doesn't define anything we can turn into an array,
//so manual pointer arithmetic is used instead.
//
mux = gpioBaseAddr + GPYMUX + pin32/16;
gmux = gpioBaseAddr + GPYGMUX + pin32/16;
csel = gpioBaseAddr + GPYCSEL + pin32/8;
//
//Now for the actual function
//
EALLOW;
//
//To change the muxing, set the peripheral mux to 0/GPIO first to avoid
//glitches, then change the group mux, then set the peripheral mux to
//its target value. Finally, set the CPU select. This procedure is
//described in the TRM. Unfortunately, since we don't know the pin in
//advance we can't hardcode a bitfield reference, so there's some
//tricky bit twiddling here.
//
*mux &= ~(0x3UL << (2*pin16));
*gmux &= ~(0x3UL << (2*pin16));
*gmux |= (Uint32)((muxPosition >> 2) & 0x3UL) << (2*pin16);
*mux |= (Uint32)(muxPosition & 0x3UL) << (2*pin16);
*csel &= ~(0x3L << (4*pin8));
*csel |= (Uint32)(cpu & 0x3L) << (4*pin8);
//
//WARNING: This code does not touch the analog mode select registers,
//which are needed to give the USB module control of its IOs.
//
EDIS;
}
//
// GPIO_SetupPinOptions - Setup up the GPIO input/output options for the
// specified pin.
//
//The flags are a 16-bit mask produced by ORing together options.
//For input pins, the valid flags are:
//GPIO_PULLUP Enable pull-up
//GPIO_INVERT Enable input polarity inversion
//GPIO_SYNC Synchronize the input latch to PLLSYSCLK
// (default -- you don't need to specify this)
//GPIO_QUAL3 Use 3-sample qualification
//GPIO_QUAL6 Use 6-sample qualification
//GPIO_ASYNC Do not use synchronization or qualification
//(Note: only one of SYNC, QUAL3, QUAL6, or ASYNC is allowed)
//
//For output pins, the valid flags are:
//GPIO_OPENDRAIN Output in open drain mode
//GPIO_PULLUP If open drain enabled, also enable the pull-up
//and the input qualification flags (SYNC/QUAL3/QUAL6/SYNC) listed above.
//
//With no flags, the default input state is synchronous with no
//pull-up or polarity inversion. The default output state is
//the standard digital output.
//
void GPIO_SetupPinOptions(Uint16 gpioNumber, Uint16 output, Uint16 flags)
{
volatile Uint32 *gpioBaseAddr;
volatile Uint32 *dir, *pud, *inv, *odr, *qsel;
Uint32 pin32, pin16, pinMask, qual;
pin32 = gpioNumber % 32;
pin16 = gpioNumber % 16;
pinMask = 1UL << pin32;
gpioBaseAddr = (Uint32 *)&GpioCtrlRegs + (gpioNumber/32)*GPY_CTRL_OFFSET;
//
//Create pointers to the appropriate registers. This is a workaround
//for the way GPIO registers are defined. The standard definition
//in the header file makes it very easy to do named accesses of one
//register or bit, but hard to do arbitrary numerical accesses. It's
//easier to have an array of GPIO modules with identical registers,
//including arrays for multi-register groups like GPyQSEL1-2. But
//the header file doesn't define anything we can turn into an array,
//so manual pointer arithmetic is used instead.
//
dir = gpioBaseAddr + GPYDIR;
pud = gpioBaseAddr + GPYPUD;
inv = gpioBaseAddr + GPYINV;
odr = gpioBaseAddr + GPYODR;
qsel = gpioBaseAddr + GPYQSEL + pin32/16;
EALLOW;
//
//Set the data direction
//
*dir &= ~pinMask;
if (output == 1)
{
//
//Output, with optional open drain mode and pull-up
//
*dir |= pinMask;
//
//Enable open drain if necessary
//
if (flags & GPIO_OPENDRAIN)
{
*odr |= pinMask;
}
else
{
*odr &= ~pinMask;
}
//
//Enable pull-up if necessary. Open drain mode must be active.
//
if (flags & (GPIO_OPENDRAIN | GPIO_PULLUP))
{
*pud &= ~pinMask;
}
else
{
*pud |= pinMask;
}
}
else
{
//
//Input, with optional pull-up, qualification, and polarity
//inversion
//
*dir &= ~pinMask;
//
//Enable pull-up if necessary
//
if (flags & GPIO_PULLUP)
{
*pud &= ~pinMask;
}
else
{
*pud |= pinMask;
}
//
//Invert polarity if necessary
//
if (flags & GPIO_INVERT)
{
*inv |= pinMask;
}
else
{
*inv &= ~pinMask;
}
}
//
//Extract the qualification parameter and load it into the register.
//This is also needed for open drain outputs, so we might as well do it
//all the time.
//
qual = (flags & GPIO_ASYNC) / GPIO_QUAL3;
*qsel &= ~(0x3L << (2 * pin16));
if (qual != 0x0)
{
*qsel |= qual << (2 * pin16);
}
EDIS;
}
//
// GPIO_SetupLock - Enable or disable the GPIO register bit lock for the
// specified pin.
// The valid flags are:
// GPIO_UNLOCK - Unlock the pin setup register bits for
// the specified pin
// GPIO_LOCK - Lock the pin setup register bits for the
// specified pin
//
void GPIO_SetupLock(Uint16 gpioNumber, Uint16 flags)
{
volatile Uint32 *gpioBaseAddr;
volatile Uint32 *lock;
Uint32 pin32, pinMask;
pin32 = gpioNumber % 32;
pinMask = 1UL << pin32;
gpioBaseAddr = (Uint32 *)&GpioCtrlRegs + (gpioNumber/32)*GPY_CTRL_OFFSET;
//
//Create pointers to the appropriate registers. This is a workaround
//for the way GPIO registers are defined. The standard definition
//in the header file makes it very easy to do named accesses of one
//register or bit, but hard to do arbitrary numerical accesses. It's
//easier to have an array of GPIO modules with identical registers,
//including arrays for multi-register groups like GPyQSEL1-2. But
//the header file doesn't define anything we can turn into an array,
//so manual pointer arithmetic is used instead.
//
lock = gpioBaseAddr + GPYLOCK;
EALLOW;
if(flags)
{
//Lock the pin
*lock |= pinMask;
}
else
{
//Unlock the pin
*lock &= ~pinMask;
}
EDIS;
}
//
//External interrupt setup
//
void GPIO_SetupXINT1Gpio(Uint16 gpioNumber)
{
EALLOW;
InputXbarRegs.INPUT4SELECT = gpioNumber; //Set XINT1 source to GPIO-pin
EDIS;
}
void GPIO_SetupXINT2Gpio(Uint16 gpioNumber)
{
EALLOW;
InputXbarRegs.INPUT5SELECT = gpioNumber; //Set XINT2 source to GPIO-pin
EDIS;
}
void GPIO_SetupXINT3Gpio(Uint16 gpioNumber)
{
EALLOW;
InputXbarRegs.INPUT6SELECT = gpioNumber; //Set XINT3 source to GPIO-pin
EDIS;
}
void GPIO_SetupXINT4Gpio(Uint16 gpioNumber)
{
EALLOW;
InputXbarRegs.INPUT13SELECT = gpioNumber; //Set XINT4 source to GPIO-pin
EDIS;
}
void GPIO_SetupXINT5Gpio(Uint16 gpioNumber)
{
EALLOW;
InputXbarRegs.INPUT14SELECT = gpioNumber; //Set XINT5 source to GPIO-pin
EDIS;
}
//
//GPIO_EnableUnbondedIOPullupsFor176Pin - Enable pullups for the unbonded
// GPIOs on the 176PTP package:
// GPIOs Grp Bits
// 95-132 C 31
// D 31:0
// E 4:0
// 134-168 E 31:6
// F 8:0
//
void GPIO_EnableUnbondedIOPullupsFor176Pin()
{
EALLOW;
GpioCtrlRegs.GPCPUD.all = ~0x80000000; //GPIO 95
GpioCtrlRegs.GPDPUD.all = ~0xFFFFFFF7; //GPIOs 96-127
GpioCtrlRegs.GPEPUD.all = ~0xFFFFFFDF; //GPIOs 128-159 except for 133
GpioCtrlRegs.GPFPUD.all = ~0x000001FF; //GPIOs 160-168
EDIS;
}
//
// GPIO_EnableUnbondedIOPullups - InitSysCtrl would call this function
// this takes care of enabling IO pullups.
//
void GPIO_EnableUnbondedIOPullups()
{
//
//bits 8-10 have pin count
//
unsigned char pin_count = (DevCfgRegs.PARTIDL.bit.PIN_COUNT) ;
//
//6 = 176 pin
//7 = 337 pin
//
if (pin_count == 6)
{
GPIO_EnableUnbondedIOPullupsFor176Pin();
}
else
{
//do nothing - this is 337 pin package
}
}
#endif //CPU1
//
// GPIO_ReadPin - Read the GPyDAT register bit for the specified pin. Note that
// this returns the actual state of the pin, not the state of
// the output latch.
//
Uint16 GPIO_ReadPin(Uint16 gpioNumber)
{
volatile Uint32 *gpioDataReg;
Uint16 pinVal;
gpioDataReg = (volatile Uint32 *)&GpioDataRegs + (gpioNumber/32)*GPY_DATA_OFFSET;
pinVal = (gpioDataReg[GPYDAT] >> (gpioNumber % 32)) & 0x1;
return pinVal;
}
//
// GPIO_WritePin - Set the GPyDAT register bit for the specified pin.
//
void GPIO_WritePin(Uint16 gpioNumber, Uint16 outVal)
{
volatile Uint32 *gpioDataReg;
Uint32 pinMask;
gpioDataReg = (volatile Uint32 *)&GpioDataRegs + (gpioNumber/32)*GPY_DATA_OFFSET;
pinMask = 1UL << (gpioNumber % 32);
if (outVal == 0)
{
gpioDataReg[GPYCLEAR] = pinMask;
}
else
{
gpioDataReg[GPYSET] = pinMask;
}
}
//
// End of file
//
@@ -0,0 +1,226 @@
//###########################################################################
//
// FILE: f2838x_mcbsp.c
//
// TITLE: F2838x Device McBSP Initialization & Support Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_examples.h"
//
// MCBSP_INIT_DELAY determines the amount of CPU cycles in the 2 sample rate
// generator (SRG) cycles required for the Mcbsp initialization routine.
// MCBSP_CLKG_DELAY determines the amount of CPU cycles in the 2 clock
// generator (CLKG) cycles required for the Mcbsp initialization routine.
//
//
// Defines
//
#define CPU_SPD 200E6
#define MCBSP_SRG_FREQ CPU_SPD/4 // SRG input is LSPCLK (SYSCLKOUT/4)
// for examples
#define CLKGDV_VAL 1
// # of CPU cycles in 2 SRG cycles-init delay
#define MCBSP_INIT_DELAY 2*(CPU_SPD/MCBSP_SRG_FREQ)
// # of CPU cycles in 2 CLKG cycles-init delay
#define MCBSP_CLKG_DELAY 2*(CPU_SPD/(MCBSP_SRG_FREQ/(1+CLKGDV_VAL)))
//
// Function Prototypes
//
void delay_loop(void); // Delay function used for SRG initialization
void clkg_delay_loop(void); // Delay function used for CLKG initialization
//
// InitMcbsp - This function initializes the McBSP to a known state.
//
// To use McBSPB update the following function to write to
// McbspbRegs.
//
void InitMcbspa(void)
{
//
// Reset the McBSP
// Disable all interrupts
// Frame sync generator reset
// Sample rate generator reset
// Transmitter reset
// Receiver reset
//
McbspaRegs.SPCR2.bit.FRST = 0;
McbspaRegs.SPCR2.bit.GRST = 0;
McbspaRegs.SPCR2.bit.XRST = 0;
McbspaRegs.SPCR1.bit.RRST = 0;
//
// Enable loop back mode
// This does not require external hardware
//
McbspaRegs.SPCR2.all = 0x0000;
McbspaRegs.SPCR1.all = 0x8000;
//
// RX data delay is 1 bit
// TX data delay is 1 bit
//
McbspaRegs.RCR2.bit.RDATDLY = 1;
McbspaRegs.XCR2.bit.XDATDLY = 1;
//
// No clock sync for CLKG
// Frame-synchronization period
//
McbspaRegs.SRGR2.bit.GSYNC = 0;
McbspaRegs.SRGR2.bit.FPER = 320;
//
// Frame-synchronization pulses from
// the sample rate generator
//
McbspaRegs.SRGR2.bit.FSGM = 1;
//
// Sample rate generator input clock is LSPCLK
//
McbspaRegs.SRGR2.bit.CLKSM = 1;
McbspaRegs.PCR.bit.SCLKME = 0;
//
// Divide-down value for CLKG
// Frame-synchronization pulse width
//
McbspaRegs.SRGR1.bit.CLKGDV = CLKGDV_VAL;
clkg_delay_loop();
McbspaRegs.SRGR1.bit.FWID = 1;
//
// CLKX is driven by the sample rate generator
// Transmit frame synchronization generated by internal
// sample rate generator
//
McbspaRegs.PCR.bit.CLKXM = 1;
McbspaRegs.PCR.bit.FSXM = 1;
//
// Enable Sample rate generator and
// wait at least 2 CLKG clock cycles
//
McbspaRegs.SPCR2.bit.GRST = 1;
clkg_delay_loop();
//
// Release from reset
// RX, TX and frame sync generator
//
McbspaRegs.SPCR2.bit.XRST = 1;
McbspaRegs.SPCR1.bit.RRST = 1;
McbspaRegs.SPCR2.bit.FRST = 1;
}
//
// InitMcbspaInt - Enable TX and RX interrupts
//
// To use McBSPB update the following function to write to
// McbspbRegs.
//
void InitMcbspaInt(void)
{
// Reset TX and RX
// Enable interrupts for TX and RX
// Release TX and RX
McbspaRegs.SPCR2.bit.XRST = 0;
McbspaRegs.SPCR1.bit.RRST = 0;
McbspaRegs.MFFINT.bit.XINT = 1;
McbspaRegs.MFFINT.bit.RINT = 1;
McbspaRegs.SPCR2.bit.XRST = 1;
McbspaRegs.SPCR1.bit.RRST = 1;
}
//
// InitMcbspa8bit - McBSP uses an 8-bit word for both TX and RX.
//
// To change the word length for RX and TX the values written
// to the bit RWDLEN1 and XWDLEN1 in the function have to be
// updated.
//
// 8-bit word - 0h
// 12-bit word - 1h
// 16-bit word - 2h
// 20-bit word - 3h
// 24-bit word - 4h
// 32-bit word - 5h
//
void InitMcbspa8bit(void)
{
McbspaRegs.RCR1.bit.RWDLEN1 = 0;
McbspaRegs.XCR1.bit.XWDLEN1 = 0;
}
//
// delay_loop - Delay function (at least 2 SRG cycles)
// Required in McBSP initialization
//
void delay_loop(void)
{
long i;
for (i = 0; i < MCBSP_INIT_DELAY; i++) {}
}
//
// clkg_delay_loop - Delay function (at least 2 CLKG cycles)
// Required in McBSP init
//
void clkg_delay_loop(void)
{
long i;
for (i = 0; i < MCBSP_CLKG_DELAY; i++) {}
}
//
// End of file
//
@@ -0,0 +1,123 @@
//###########################################################################
//
// FILE: f2838x_piectrl.c
//
// TITLE: F2838x Device PIE Control Register Initialization Functions.
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h" // F2838x Headerfile Include File
#include "f2838x_examples.h" // F2838x Examples Include File
//
// InitPieCtrl - This function initializes the PIE control registers to a
// known state.
//
void InitPieCtrl(void)
{
//
// Disable Interrupts at the CPU level:
//
DINT;
//
// Disable the PIE
//
PieCtrlRegs.PIECTRL.bit.ENPIE = 0;
//
// Clear all PIEIER registers:
//
PieCtrlRegs.PIEIER1.all = 0;
PieCtrlRegs.PIEIER2.all = 0;
PieCtrlRegs.PIEIER3.all = 0;
PieCtrlRegs.PIEIER4.all = 0;
PieCtrlRegs.PIEIER5.all = 0;
PieCtrlRegs.PIEIER6.all = 0;
PieCtrlRegs.PIEIER7.all = 0;
PieCtrlRegs.PIEIER8.all = 0;
PieCtrlRegs.PIEIER9.all = 0;
PieCtrlRegs.PIEIER10.all = 0;
PieCtrlRegs.PIEIER11.all = 0;
PieCtrlRegs.PIEIER12.all = 0;
//
// Clear all PIEIFR registers:
//
PieCtrlRegs.PIEIFR1.all = 0;
PieCtrlRegs.PIEIFR2.all = 0;
PieCtrlRegs.PIEIFR3.all = 0;
PieCtrlRegs.PIEIFR4.all = 0;
PieCtrlRegs.PIEIFR5.all = 0;
PieCtrlRegs.PIEIFR6.all = 0;
PieCtrlRegs.PIEIFR7.all = 0;
PieCtrlRegs.PIEIFR8.all = 0;
PieCtrlRegs.PIEIFR9.all = 0;
PieCtrlRegs.PIEIFR10.all = 0;
PieCtrlRegs.PIEIFR11.all = 0;
PieCtrlRegs.PIEIFR12.all = 0;
}
//
// EnableInterrupts - This function enables the PIE module and CPU __interrupts
//
void EnableInterrupts()
{
//
// Enable the PIE
//
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
//
// Enables PIE to drive a pulse into the CPU
//
PieCtrlRegs.PIEACK.all = 0xFFFF;
//
// Enable Interrupts at the CPU level
//
EINT;
}
//
// End of file
//
@@ -0,0 +1,311 @@
//###########################################################################
//
// FILE: f2838x_pievect.c
//
// TITLE: f2838x Device PIE Vector Initialization Functions
//
//###########################################################################
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h" // f2838x Header File Include File
#include "f2838x_examples.h" // f2838x Examples Include File
//
// Globals
//
const struct PIE_VECT_TABLE PieVectTableInit = {
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
PIE_RESERVED_ISR, // Reserved
TIMER1_ISR, // CPU Timer 1 Interrupt
TIMER2_ISR, // CPU Timer 2 Interrupt
DATALOG_ISR, // Datalogging Interrupt
RTOS_ISR, // RTOS Interrupt
EMU_ISR, // Emulation Interrupt
NMI_ISR, // Non-Maskable Interrupt
ILLEGAL_ISR, // Illegal Operation Trap
USER1_ISR, // User Defined Trap 1
USER2_ISR, // User Defined Trap 2
USER3_ISR, // User Defined Trap 3
USER4_ISR, // User Defined Trap 4
USER5_ISR, // User Defined Trap 5
USER6_ISR, // User Defined Trap 6
USER7_ISR, // User Defined Trap 7
USER8_ISR, // User Defined Trap 8
USER9_ISR, // User Defined Trap 9
USER10_ISR, // User Defined Trap 10
USER11_ISR, // User Defined Trap 11
USER12_ISR, // User Defined Trap 12
ADCA1_ISR, // 1.1 - ADCA Interrupt 1
ADCB1_ISR, // 1.2 - ADCB Interrupt 1
ADCC1_ISR, // 1.3 - ADCC Interrupt 1
XINT1_ISR, // 1.4 - XINT1 Interrupt
XINT2_ISR, // 1.5 - XINT2 Interrupt
ADCD1_ISR, // 1.6 - ADCD Interrupt 1
TIMER0_ISR, // 1.7 - Timer 0 Interrupt
WAKE_ISR, // 1.8 - Standby and Halt Wakeup Interrupt
EPWM1_TZ_ISR, // 2.1 - ePWM1 Trip Zone Interrupt
EPWM2_TZ_ISR, // 2.2 - ePWM2 Trip Zone Interrupt
EPWM3_TZ_ISR, // 2.3 - ePWM3 Trip Zone Interrupt
EPWM4_TZ_ISR, // 2.4 - ePWM4 Trip Zone Interrupt
EPWM5_TZ_ISR, // 2.5 - ePWM5 Trip Zone Interrupt
EPWM6_TZ_ISR, // 2.6 - ePWM6 Trip Zone Interrupt
EPWM7_TZ_ISR, // 2.7 - ePWM7 Trip Zone Interrupt
EPWM8_TZ_ISR, // 2.8 - ePWM8 Trip Zone Interrupt
EPWM1_ISR, // 3.1 - ePWM1 Interrupt
EPWM2_ISR, // 3.2 - ePWM2 Interrupt
EPWM3_ISR, // 3.3 - ePWM3 Interrupt
EPWM4_ISR, // 3.4 - ePWM4 Interrupt
EPWM5_ISR, // 3.5 - ePWM5 Interrupt
EPWM6_ISR, // 3.6 - ePWM6 Interrupt
EPWM7_ISR, // 3.7 - ePWM7 Interrupt
EPWM8_ISR, // 3.8 - ePWM8 Interrupt
ECAP1_ISR, // 4.1 - eCAP1 Interrupt
ECAP2_ISR, // 4.2 - eCAP2 Interrupt
ECAP3_ISR, // 4.3 - eCAP3 Interrupt
ECAP4_ISR, // 4.4 - eCAP4 Interrupt
ECAP5_ISR, // 4.5 - eCAP5 Interrupt
ECAP6_ISR, // 4.6 - eCAP6 Interrupt
ECAP7_ISR, // 4.7 - eCAP7 Interrupt
PIE_RESERVED_ISR, // 4.8 - Reserved
EQEP1_ISR, // 5.1 - eQEP1 Interrupt
EQEP2_ISR, // 5.2 - eQEP2 Interrupt
EQEP3_ISR, // 5.3 - eQEP3 Interrupt
PIE_RESERVED_ISR, // 5.4 - Reserved
CLB1_ISR, // 5.5 - CLB1 (Reconfigurable Logic) Interrupt
CLB2_ISR, // 5.6 - CLB2 (Reconfigurable Logic) Interrupt
CLB3_ISR, // 5.7 - CLB3 (Reconfigurable Logic) Interrupt
CLB4_ISR, // 5.8 - CLB4 (Reconfigurable Logic) Interrupt
SPIA_RX_ISR, // 6.1 - SPIA Receive Interrupt
SPIA_TX_ISR, // 6.2 - SPIA Transmit Interrupt
SPIB_RX_ISR, // 6.3 - SPIB Receive Interrupt
SPIB_TX_ISR, // 6.4 - SPIB Transmit Interrupt
MCBSPA_RX_ISR, // 6.5 - McBSPA Receive Interrupt
MCBSPA_TX_ISR, // 6.6 - McBSPA Transmit Interrupt
MCBSPB_RX_ISR, // 6.7 - McBSPB Receive Interrupt
MCBSPB_TX_ISR, // 6.8 - McBSPB Transmit Interrupt
DMA_CH1_ISR, // 7.1 - DMA Channel 1 Interrupt
DMA_CH2_ISR, // 7.2 - DMA Channel 2 Interrupt
DMA_CH3_ISR, // 7.3 - DMA Channel 3 Interrupt
DMA_CH4_ISR, // 7.4 - DMA Channel 4 Interrupt
DMA_CH5_ISR, // 7.5 - DMA Channel 5 Interrupt
DMA_CH6_ISR, // 7.6 - DMA Channel 6 Interrupt
PIE_RESERVED_ISR, // 7.7 - Reserved
PIE_RESERVED_ISR, // 7.8 - Reserved
I2CA_ISR, // 8.1 - I2CA Interrupt 1
I2CA_FIFO_ISR, // 8.2 - I2CA Interrupt 2
I2CB_ISR, // 8.3 - I2CB Interrupt 1
I2CB_FIFO_ISR, // 8.4 - I2CB Interrupt 2
SCIC_RX_ISR, // 8.5 - SCIC Receive Interrupt
SCIC_TX_ISR, // 8.6 - SCIC Transmit Interrupt
SCID_RX_ISR, // 8.7 - SCID Receive Interrupt
SCID_TX_ISR, // 8.8 - SCID Transmit Interrupt
SCIA_RX_ISR, // 9.1 - SCIA Receive Interrupt
SCIA_TX_ISR, // 9.2 - SCIA Transmit Interrupt
SCIB_RX_ISR, // 9.3 - SCIB Receive Interrupt
SCIB_TX_ISR, // 9.4 - SCIB Transmit Interrupt
CANA0_ISR, // 9.5 - CANA Interrupt 0
CANA1_ISR, // 9.6 - CANA Interrupt 1
CANB0_ISR, // 9.7 - CANB Interrupt 0
CANB1_ISR, // 9.8 - CANB Interrupt 1
ADCA_EVT_ISR, // 10.1 - ADCA Event Interrupt
ADCA2_ISR, // 10.2 - ADCA Interrupt 2
ADCA3_ISR, // 10.3 - ADCA Interrupt 3
ADCA4_ISR, // 10.4 - ADCA Interrupt 4
ADCB_EVT_ISR, // 10.5 - ADCB Event Interrupt
ADCB2_ISR, // 10.6 - ADCB Interrupt 2
ADCB3_ISR, // 10.7 - ADCB Interrupt 3
ADCB4_ISR, // 10.8 - ADCB Interrupt 4
CLA1_1_ISR, // 11.1 - CLA1 Interrupt 1
CLA1_2_ISR, // 11.2 - CLA1 Interrupt 2
CLA1_3_ISR, // 11.3 - CLA1 Interrupt 3
CLA1_4_ISR, // 11.4 - CLA1 Interrupt 4
CLA1_5_ISR, // 11.5 - CLA1 Interrupt 5
CLA1_6_ISR, // 11.6 - CLA1 Interrupt 6
CLA1_7_ISR, // 11.7 - CLA1 Interrupt 7
CLA1_8_ISR, // 11.8 - CLA1 Interrupt 8
XINT3_ISR, // 12.1 - XINT3 Interrupt
XINT4_ISR, // 12.2 - XINT4 Interrupt
XINT5_ISR, // 12.3 - XINT5 Interrupt
MPOST_ISR, // 12.4 - MPOST Interrupt
FMC_ISR, // 12.5 - Flash Wrapper Operation Done Interrupt
PIE_RESERVED_ISR, // 12.6 - Reserved
FPU_OFLOW_ISR, // 12.7 - FPU Overflow Interrupt
FPU_UFLOW_ISR, // 12.8 - FPU Underflow Interrupt
I2CA_HIGH_ISR, // 1.9 - I2CA Interrupt high priority
SYS_ERR_ISR, // 1.10 - System error interrupt
ECATSYNC0_ISR, // 1.11 - ETHERCAT SYNC0 interrupt
ECAT_ISR, // 1.12 - ETHERCAT main interrupt
CIPC0_ISR, // 1.13 - C28x CPU IPC interrupt 1
CIPC1_ISR, // 1.14 - C28x CPU IPC interrupt 2
CIPC2_ISR, // 1.15 - C28x CPU IPC interrupt 3
CIPC3_ISR, // 1.16 - C28x CPU IPC interrupt 4
EPWM9_TZ_ISR, // 2.9 - ePWM9 Trip Zone Interrupt
EPWM10_TZ_ISR, // 2.10 - ePWM10 Trip Zone Interrupt
EPWM11_TZ_ISR, // 2.11 - ePWM11 Trip Zone Interrupt
EPWM12_TZ_ISR, // 2.12 - ePWM12 Trip Zone Interrupt
EPWM13_TZ_ISR, // 2.13 - ePWM13 Trip Zone Interrupt
EPWM14_TZ_ISR, // 2.14 - ePWM14 Trip Zone Interrupt
EPWM15_TZ_ISR, // 2.15 - ePWM15 Trip Zone Interrupt
EPWM16_TZ_ISR, // 2.16 - ePWM16 Trip Zone Interrupt
EPWM9_ISR, // 3.9 - ePWM9 Interrupt
EPWM10_ISR, // 3.10 - ePWM10 Interrupt
EPWM11_ISR, // 3.11 - ePWM11 Interrupt
EPWM12_ISR, // 3.12 - ePWM12 Interrupt
EPWM13_ISR, // 3.13 - ePWM13 Interrupt
EPWM14_ISR, // 3.14 - ePWM14 Interrupt
EPWM15_ISR, // 3.15 - ePWM15 Interrupt
EPWM16_ISR, // 3.16 - ePWM16 Interrupt
FSITXA1_ISR, // 4.9 - FSIA Transmit interrupt 1
FSITXA2_ISR, // 4.10 - FSIA Transmit interrupt 2
FSITXB1_ISR, // 4.11 - FSIB Transmit interrupt 1
FSITXB2_ISR, // 4.12 - FSIB Transmit interrupt 2
FSIRXA1_ISR, // 4.13 - FSIA Receive interrupt 1
FSIRXA2_ISR, // 4.14 - FSIA Receive interrupt 2
FSIRXB1_ISR, // 4.15 - FSIB Receive interrupt 1
FSIRXB2_ISR, // 4.16 - FSIB Receive interrupt 2
SDFM1_ISR, // 5.9 - Sigma Delta Filter Module1 Interrupt
SDFM2_ISR, // 5.10 - Sigma Delta Filter Module2 Interrupt
ECATRST_ISR, // 5.11 - ETHERCAT Resetout Interrupt
ECATSYNC1_ISR, // 5.12 - ETHERCAT SYNC1 interrupt
SDFM1DR1_ISR, // 5.13 - Sigma Delta Filter Module1 Filter 1 Interrupt
SDFM1DR2_ISR, // 5.14 - Sigma Delta Filter Module1 Filter 2 Interrupt
SDFM1DR3_ISR, // 5.15 - Sigma Delta Filter Module1 Filter 3 Interrupt
SDFM1DR4_ISR, // 5.16 - Sigma Delta Filter Module1 Filter 4 Interrupt
SPIC_RX_ISR, // 6.9 - SPIC Receive Interrupt
SPIC_TX_ISR, // 6.10 - SPIC Transmit Interrupt
SPID_RX_ISR, // 6.11 - SPID Receive Interrupt
SPID_TX_ISR, // 6.12 - SPID Transmit Interrupt
SDFM2DR1_ISR, // 6.13 - Sigma Delta Filter Module2 Filter 1 Interrupt
SDFM2DR2_ISR, // 6.14 - Sigma Delta Filter Module2 Filter 2 Interrupt
SDFM2DR3_ISR, // 6.15 - Sigma Delta Filter Module2 Filter 3 Interrupt
SDFM2DR4_ISR, // 6.16 - Sigma Delta Filter Module2 Filter 4 Interrupt
FSIRXC1_ISR, // 7.9 - FSIC Receive interrupt 1
FSIRXC2_ISR, // 7.10 - FSIC Receive interrupt 2
FSIRXD1_ISR, // 7.11 - FSID Receive interrupt 1
FSIRXD2_ISR, // 7.12 - FSID Receive interrupt 2
FSIRXE1_ISR, // 7.13 - FSIE Receive interrupt 1
FSIRXE2_ISR, // 7.14 - FSIE Receive interrupt 2
FSIRXF1_ISR, // 7.15 - FSIF Receive interrupt 1
FSIRXF2_ISR, // 7.16 - FSIF Receive interrupt 2
FSIRXG1_ISR, // 8.9 - FSIG Receive interrupt 1
FSIRXG2_ISR, // 8.10 - FSIG Receive interrupt 2
FSIRXH1_ISR, // 8.11 - FSIH Receive interrupt 1
FSIRXH2_ISR, // 8.12 - FSIH Receive interrupt 2
CLB5_ISR, // 8.13 - CLB5 Interrupt
CLB6_ISR, // 8.14 - CLB6 Interrupt
CLB7_ISR, // 8.15 - CLB7 Interrupt
CLB8_ISR, // 8.16 - CLB8 Interrupt
MCANA_0_ISR, // 9.9 - MCAN Sub-System Interrupt 0
MCANA_1_ISR, // 9.10 - MCAN Sub-System Interrupt 1
MCANA_ECC_ISR, // 9.11 - MCAN Sub-System ECC error Interrupt
MCANA_WAKE_ISR, // 9.12 - MCAN Sub-System wakeup Interrupt
PMBUSA_ISR, // 9.13 - PMBUSA Interrupt
CM_STATUS_ISR, // 9.14 - CM Reset Status Interrupt
USBA_ISR, // 9.15 - USBA Interrupt
PIE_RESERVED_ISR, // 9.16 - Reserved
ADCC_EVT_ISR, // 10.9 - ADCC Event Interrupt
ADCC2_ISR, // 10.10 - ADCC Interrupt 2
ADCC3_ISR, // 10.11 - ADCC Interrupt 3
ADCC4_ISR, // 10.12 - ADCC Interrupt 4
ADCD_EVT_ISR, // 10.13 - ADCD Event Interrupt
ADCD2_ISR, // 10.14 - ADCD Interrupt 2
ADCD3_ISR, // 10.15 - ADCD Interrupt 3
ADCD4_ISR, // 10.16 - ADCD Interrupt 4
CMTOCPUXIPC0_ISR, // 11.9 - CM to CPU IPC Interrupt 0
CMTOCPUXIPC1_ISR, // 11.10 - CM to CPU IPC Interrupt 1
CMTOCPUXIPC2_ISR, // 11.11 - CM to CPU IPC Interrupt 2
CMTOCPUXIPC3_ISR, // 11.12 - CM to CPU IPC Interrupt 3
CMTOCPUXIPC4_ISR, // 11.13 - CM to CPU IPC Interrupt 4
CMTOCPUXIPC5_ISR, // 11.14 - CM to CPU IPC Interrupt 5
CMTOCPUXIPC6_ISR, // 11.15 - CM to CPU IPC Interrupt 6
CMTOCPUXIPC7_ISR, // 11.16 - CM to CPU IPC Interrupt 7
PIE_RESERVED_ISR, // 12.9 - Reserved
ECAP6_2_ISR, // 12.10 - eCAP6 Interrupt 2
ECAP7_2_ISR, // 12.11 - eCAP7 Interrupt 2
PIE_RESERVED_ISR, // 12.12 - Reserved
CPUCRC_ISR, // 12.13 - CPU BGCRC module interrupt
CLA1CRC_ISR, // 12.14 - CLA1 BGCRC module interrupt
CLA_OVERFLOW_ISR, // 12.15 - CLA Overflow Interrupt
CLA_UNDERFLOW_ISR, // 12.16 - CLA Underflow Interrupt
};
//
// InitPieVectTable - This function initializes the PIE vector table to a
// known state and must be executed after boot time.
//
void InitPieVectTable(void)
{
Uint16 i;
Uint32 *Source = (void *) &PieVectTableInit;
Uint32 *Dest = (void *) &PieVectTable;
//
// Do not write over first 3 32-bit locations (these locations are
// initialized by Boot ROM with boot variables)
//
Source = Source + 3;
Dest = Dest + 3;
EALLOW;
for(i = 0; i < 221; i++)
{
*Dest++ = *Source++;
}
EDIS;
//
// Enable the PIE Vector Table
//
PieCtrlRegs.PIECTRL.bit.ENPIE = 1;
}
//
// End of file
//
@@ -0,0 +1,570 @@
//###########################################################################
//
// FILE: f2838x_sdfm_drivers.c
//
// TITLE: SDFM Driver functions
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f28x_project.h"
#include "f2838x_struct.h"
#include "f2838x_sdfm_drivers.h"
//
// Sdfm_configureInputCtrl - This function configures SDFM Input control unit.
// sdfmNumber - This parameter should be used to
// select SDFM1 (or) SDFM2
// filterNumber - This parameter is used to select
// which filter (FILTER1,FILTER2,
// FILTER3,FILTER4) needs to be
// configured.
// mode - This parameter is used to select
// one of the modes mentioned above
//
// Input control unit can be configured in four different modes:
// MODE_0 : Modulator clock rate = Modulator data rate
// MODE_1 : Modulator clock rate = (Modulator data rate / 2)
// MODE_2 : Manchester encoded data (Modulator clock is encoded into data)
// MODE_3 : Modulator clock rate = (2 x Modulator data rate)
//
void Sdfm_configureInputCtrl(Uint16 sdfmNumber, Uint16 filterNumber,
Uint16 mode)
{
EALLOW;
switch (filterNumber)
{
case FILTER1:
(*SDFM[sdfmNumber]).SDCTLPARM1.bit.MOD = mode;
break;
case FILTER2:
(*SDFM[sdfmNumber]).SDCTLPARM2.bit.MOD = mode;
break;
case FILTER3:
(*SDFM[sdfmNumber]).SDCTLPARM3.bit.MOD = mode;
break;
case FILTER4:
(*SDFM[sdfmNumber]).SDCTLPARM4.bit.MOD = mode;
break;
}
EDIS;
}
//
// Sdfm_configureComparator - This function configures SDFM Comparator unit.
// Comparator unit can be configured to monitor
// input conditions with a fast settling time.
// This module can be programmed to detect over and
// under value conditions.
//
// sdfmNumber - This parameter should be used to
// select SDFM1 (or) SDFM2
// filterNumber - This parameter is used to select
// which filter (FILTER1,FILTER2,
// FILTER3,FILTER3)
// filterType - This parameter is used to select
// one of the filter type mentioned
// above (SINC1,SINC2,SINC3,SINCFAST)
// OSR - This parameter is used to
// configure oversampling ratio for
// comparator
// HLT - This parameter is used to
// configure to detect over value
// condition. The upper 16-bits denote
// high threshold 2 values while lower
// 16-bits denote high threshold 1
// values
// LLT - This parameter is used to
// configure to detect under value
// condition.The upper 16-bits denote
// low threshold 2 values while lower
// 16-bits denote low threshold 1
// values
//
void Sdfm_configureComparator(Uint16 sdfmNumber, Uint16 filterNumber,
Uint16 filterType, Uint16 OSR, Uint32 HLT,
Uint32 LLT)
{
EALLOW;
switch (filterNumber)
{
case FILTER1: //Filter 1
//
// Configure filter type : Sincfast / Sinc1 / Sinc2 / Sinc3
//
(*SDFM[sdfmNumber]).SDCPARM1.bit.CS1_CS0 = filterType;
//
// Configure OSR value
//
if(OSR<=COMPARATOR_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDCPARM1.bit.COSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDCPARM1.bit.COSR = COMPARATOR_MAX_OSR;
}
(*SDFM[sdfmNumber]).SDFLT1CMPH1.bit.HLT = (Uint16)HLT;
(*SDFM[sdfmNumber]).SDFLT1CMPL1.bit.LLT = (Uint16)LLT;
(*SDFM[sdfmNumber]).SDFLT1CMPH2.bit.HLT2 = (Uint16)(HLT >> 16U);
(*SDFM[sdfmNumber]).SDFLT1CMPL2.bit.LLT2 = (Uint16)(LLT >> 16U);
break;
case FILTER2: //Filter 2
//
// Configure filter type : Sincfast / Sinc1 / Sinc2 / Sinc3
//
(*SDFM[sdfmNumber]).SDCPARM2.bit.CS1_CS0 = filterType;
//
// Configure OSR value
//
if(OSR<=COMPARATOR_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDCPARM2.bit.COSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDCPARM2.bit.COSR = COMPARATOR_MAX_OSR;
}
(*SDFM[sdfmNumber]).SDFLT2CMPH1.bit.HLT = (Uint16)HLT;
(*SDFM[sdfmNumber]).SDFLT2CMPL1.bit.LLT = (Uint16)LLT;
(*SDFM[sdfmNumber]).SDFLT2CMPH2.bit.HLT2 = (Uint16)(HLT >> 16U);
(*SDFM[sdfmNumber]).SDFLT2CMPL2.bit.LLT2 = (Uint16)(LLT >> 16U);
break;
case FILTER3: //Filter 3
//
// Configure filter type : Sincfast / Sinc1 / Sinc2 / Sinc3
//
(*SDFM[sdfmNumber]).SDCPARM3.bit.CS1_CS0 = filterType;
//
// Configure OSR value
//
if(OSR<=COMPARATOR_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDCPARM3.bit.COSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDCPARM3.bit.COSR = COMPARATOR_MAX_OSR;
}
(*SDFM[sdfmNumber]).SDFLT3CMPH1.bit.HLT = (Uint16)HLT;
(*SDFM[sdfmNumber]).SDFLT3CMPL1.bit.LLT = (Uint16)LLT;
(*SDFM[sdfmNumber]).SDFLT3CMPH2.bit.HLT2 = (Uint16)(HLT >> 16U);
(*SDFM[sdfmNumber]).SDFLT3CMPL2.bit.LLT2 = (Uint16)(LLT >> 16U);
break;
case FILTER4: //Filter 4
//
// Configure filter type : Sincfast / Sinc1 / Sinc2 / Sinc3
//
(*SDFM[sdfmNumber]).SDCPARM4.bit.CS1_CS0 = filterType;
//
// Configure Comparator OSR value
//
if(OSR<=COMPARATOR_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDCPARM4.bit.COSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDCPARM4.bit.COSR = COMPARATOR_MAX_OSR;
}
(*SDFM[sdfmNumber]).SDFLT4CMPH1.bit.HLT = (Uint16)HLT;
(*SDFM[sdfmNumber]).SDFLT4CMPL1.bit.LLT = (Uint16)LLT;
(*SDFM[sdfmNumber]).SDFLT4CMPH2.bit.HLT2 = (Uint16)(HLT >> 16U);
(*SDFM[sdfmNumber]).SDFLT4CMPL2.bit.LLT2 = (Uint16)(LLT >> 16U);
break;
}
EDIS;
}
//
// SDFM_configureData_filter - This function configures SDFM Data filter unit
//
// SDFM Data filter unit can be configured in any
// of four different Sinc filter types:
// sdfmNumber - This parameter should be used to
// select SDFM1 (or) SDFM2
// filterNumber - This parameter is used to select
// which filter(FILTER1,FILTER2,
// FILTER3,FILTER3) needs to be
// configured
// Filter_switch - This parameter is used to
// enable/disable a filter
// filterType - This parameter is used to select
// one of the filter type mentioned
// above (SINC1 / SINC2 / SINC3 /
// SINCFAST)
// OSR - This parameter is used to
// configure oversampling ratio
// for Data filter (Upto OSR_256)
// DR_switch - This parameter selects whether
// data is represented in 16 (or)
// 32 bits
// shift_bits - When user chooses 16 bit
// representation, this variable
// allows to right shift by
// specific number of bits
//
void Sdfm_configureData_filter(Uint16 sdfmNumber, Uint16 filterNumber,
Uint16 Filter_switch, Uint16 filterType,
Uint16 OSR, Uint16 DR_switch, Uint16 shift_bits)
{
EALLOW;
switch(filterNumber)
{
case FILTER1: //Filter 1
(*SDFM[sdfmNumber]).SDDFPARM1.bit.FEN = Filter_switch;
(*SDFM[sdfmNumber]).SDDFPARM1.bit.SST = filterType;
//
// Configure Sinc filter OSR value
//
if(OSR<=DATA_FILTER_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDDFPARM1.bit.DOSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDDFPARM1.bit.DOSR = DATA_FILTER_MAX_OSR;
}
//
// Configure Data filter data representation
// DR_switch - Data Representation (0/1 = 16/32b 2's complement)
//
(*SDFM[sdfmNumber]).SDDPARM1.bit.DR = DR_switch;
if(DR_switch == 0)
{
(*SDFM[sdfmNumber]).SDDPARM1.bit.SH = shift_bits;
}
break;
case FILTER2: //Filter 2
(*SDFM[sdfmNumber]).SDDFPARM2.bit.FEN = Filter_switch;
(*SDFM[sdfmNumber]).SDDFPARM2.bit.SST = filterType;
//
// Configure Sinc filter OSR value
//
if(OSR<=DATA_FILTER_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDDFPARM2.bit.DOSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDDFPARM2.bit.DOSR = DATA_FILTER_MAX_OSR;
}
//
// Configure Data filter data representation
// DR_switch - Data Representation (0/1 = 16/32b 2's complement)
//
(*SDFM[sdfmNumber]).SDDPARM2.bit.DR = DR_switch;
if(DR_switch == 0)
{
(*SDFM[sdfmNumber]).SDDPARM2.bit.SH = shift_bits;
}
break;
case FILTER3: //Filter 3
(*SDFM[sdfmNumber]).SDDFPARM3.bit.FEN = Filter_switch;
(*SDFM[sdfmNumber]).SDDFPARM3.bit.SST = filterType;
//
// Configure Sinc filter OSR value
//
if(OSR<=DATA_FILTER_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDDFPARM3.bit.DOSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDDFPARM3.bit.DOSR = DATA_FILTER_MAX_OSR;
}
//
// Configure Data filter data representation
// DR_switch - Data Representation (0/1 = 16/32b 2's complement)
//
(*SDFM[sdfmNumber]).SDDPARM3.bit.DR = DR_switch;
if(DR_switch == 0)
{
(*SDFM[sdfmNumber]).SDDPARM3.bit.SH = shift_bits;
}
break;
case FILTER4: //Filter 4
(*SDFM[sdfmNumber]).SDDFPARM4.bit.FEN = Filter_switch;
(*SDFM[sdfmNumber]).SDDFPARM4.bit.SST = filterType;
//
// Configure Sinc filter OSR value
//
if(OSR<=DATA_FILTER_MAX_OSR)
{
(*SDFM[sdfmNumber]).SDDFPARM4.bit.DOSR = OSR;
}
else
{
(*SDFM[sdfmNumber]).SDDFPARM4.bit.DOSR = DATA_FILTER_MAX_OSR;
}
//
// Configure Data filter data representation
// DR_switch - Data Representation (0/1 = 16/32b 2's complement)
//
(*SDFM[sdfmNumber]).SDDPARM4.bit.DR = DR_switch;
if(DR_switch == 0)
{
(*SDFM[sdfmNumber]).SDDPARM4.bit.SH = shift_bits;
}
break;
}
EDIS;
}
//
// Sdfm_configureInterrupt - This function configures SDFM Interrupt unit.
// SDFM Interrupt unit can be configured to
// enable/disable different sources of SDFM
// interrupts which should trigger CPU interrupt.
//
// sdfmNumber - This parameter should be used to
// select SDFM1 (or) SDFM2
// filterNumber - This parameter is used to select
// which filter(FILTER1,FILTER2,
// FILTER3,FILTER3) needs to be
// configured
// IEH_Switch - This parameter allows over value
// condition to trigger CPU interrupt
// IEL_Switch - This parameter allows under value
// condition to trigger CPU interrupt
// MFIE_Switch - This parameter allows modulator
// failure to trigger CPU interrupt
// AE_Switch - This parameter allows new filter
// data acknowledge interrupt signal
// to trigger CPU interrupt
//
void Sdfm_configureInterrupt(Uint16 sdfmNumber, Uint16 filterNumber,
Uint16 IEH_Switch, Uint16 IEL_Switch,
Uint16 MFIE_Switch, Uint16 AE_Switch)
{
EALLOW;
switch(filterNumber)
{
case FILTER1: //Filter 1
(*SDFM[sdfmNumber]).SDCPARM1.bit.EN_CEVT1 = IEH_Switch;
(*SDFM[sdfmNumber]).SDCPARM1.bit.EN_CEVT2 = IEL_Switch;
(*SDFM[sdfmNumber]).SDCPARM1.bit.MFIE = MFIE_Switch;
(*SDFM[sdfmNumber]).SDDFPARM1.bit.AE = AE_Switch;
break;
case FILTER2: //Filter 2
(*SDFM[sdfmNumber]).SDCPARM2.bit.EN_CEVT1 = IEH_Switch;
(*SDFM[sdfmNumber]).SDCPARM2.bit.EN_CEVT2 = IEL_Switch;
(*SDFM[sdfmNumber]).SDCPARM2.bit.MFIE = MFIE_Switch;
(*SDFM[sdfmNumber]).SDDFPARM2.bit.AE = AE_Switch;
break;
case FILTER3: //Filter 3
(*SDFM[sdfmNumber]).SDCPARM3.bit.EN_CEVT1 = IEH_Switch;
(*SDFM[sdfmNumber]).SDCPARM3.bit.EN_CEVT2 = IEL_Switch;
(*SDFM[sdfmNumber]).SDCPARM3.bit.MFIE = MFIE_Switch;
(*SDFM[sdfmNumber]).SDDFPARM3.bit.AE = AE_Switch;
break;
case FILTER4: //Filter 4
(*SDFM[sdfmNumber]).SDCPARM4.bit.EN_CEVT1 = IEH_Switch;
(*SDFM[sdfmNumber]).SDCPARM4.bit.EN_CEVT2 = IEL_Switch;
(*SDFM[sdfmNumber]).SDCPARM4.bit.MFIE = MFIE_Switch;
(*SDFM[sdfmNumber]).SDDFPARM4.bit.AE = AE_Switch;
break;
}
EDIS;
}
//
// SDFM_configExternalreset - This function configures SDFM module to
// enable/disable external filter reset from PWM
//
// sdfmNumber - This parameter should
// be used to select
// SDFM1 (or) SDFM2
// filter1_Config_ext_reset - This parameter is used
// to enable/disable
// external PWM reset for
// filter1
// filter2_Config_ext_reset - This parameter is used
// to enable/disable
// external PWM reset for
// filter2
// filter3_Config_ext_reset - This parameter is used
// to enable / disable
// external PWM reset for
// filter3
// filter4_Config_ext_reset - This parameter is used
// to enable / disable
// external PWM reset for
// filter4
//
void Sdfm_configureExternalreset(Uint16 sdfmNumber,
Uint16 filter1_Config_ext_reset,
Uint16 filter2_Config_ext_reset,
Uint16 filter3_Config_ext_reset,
Uint16 filter4_Config_ext_reset)
{
EALLOW;
(*SDFM[sdfmNumber]).SDDFPARM1.bit.SDSYNCEN = filter1_Config_ext_reset;
(*SDFM[sdfmNumber]).SDDFPARM2.bit.SDSYNCEN = filter2_Config_ext_reset;
(*SDFM[sdfmNumber]).SDDFPARM3.bit.SDSYNCEN = filter3_Config_ext_reset;
(*SDFM[sdfmNumber]).SDDFPARM4.bit.SDSYNCEN = filter4_Config_ext_reset;
EDIS;
}
//
// SDFM_enableMFE - This function enables Master filter bit of SDFM module
//
// sdfmNumber - This parameter should be used to select
// SDFM1 (or) SDFM2
//
void Sdfm_enableMFE(Uint16 sdfmNumber)
{
EALLOW;
(*SDFM[sdfmNumber]).SDMFILEN.bit.MFE = 1; //Master Filter bit is enabled
EDIS;
}
//
// SDFM_disableMFE - This function disable Master filter bit of SDFM module
//
// sdfmNumber - This parameter should be used to select
// SDFM1 (or) SDFM2
//
void SDFM_disableMFE(Uint16 sdfmNumber)
{
EALLOW;
(*SDFM[sdfmNumber]).SDMFILEN.bit.MFE = 0; //Master Filter bit is disabled
EDIS;
}
//
// SDFM_enableMIE - This function enable Master Interrupt bit of SDFM module
//
// sdfmNumber - This parameter should be used to select
// SDFM1 (or) SDFM2
//
void Sdfm_enableMIE(Uint16 sdfmNumber)
{
EALLOW;
//
//Enable MIE (Master Interrupt Enable) bit
//
(*SDFM[sdfmNumber]).SDCTL.bit.MIE = 1;
EDIS;
}
//
// Sdfm_disableMIE - This function disable Master Interrupt bit of SDFM module
//
// sdfmNumber - This parameter should be used to select
// SDFM1 (or) SDFM2
//
void Sdfm_disableMIE(Uint16 sdfmNumber)
{
EALLOW;
//
//Disable MIE (Master Interrupt Enable) bit
//
(*SDFM[sdfmNumber]).SDCTL.bit.MIE = 0;
EDIS;
}
//
// Sdfm_readFlagRegister - This function helps user read SDFM flag
// register (SDIFLG)
//
Uint32 Sdfm_readFlagRegister(Uint16 sdfmNumber)
{
return ((*SDFM[sdfmNumber]).SDIFLG.all);
}
//
// Sdfm_clearFlagRegister - This function helps is used to clear
// SDIFLG register
//
void Sdfm_clearFlagRegister(Uint16 sdfmNumber,Uint32 sdfmReadFlagRegister)
{
(*SDFM[sdfmNumber]).SDIFLGCLR.all = sdfmReadFlagRegister;
}
//
// End of file
//
@@ -0,0 +1,107 @@
//###########################################################################
//
// FILE: f2838x_struct.c
//
// TITLE: F2838x SDFM structure
//
//###########################################################################
//
//
//
// C2000Ware v5.04.00.00
//
// 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 "f2838x_device.h"
#include "f2838x_struct.h"
//
// Globals
//
#if defined(CPU1)
volatile struct ADC_REGS *ADC[MAX_ADC] =
{ 0, &AdcaRegs, &AdcbRegs,
&AdccRegs, &AdcdRegs };
#endif
volatile struct ECAP_REGS *ECAP[MAX_ECAP] =
{ 0, &ECap1Regs, &ECap2Regs, &ECap3Regs,
&ECap4Regs, &ECap5Regs, &ECap6Regs,
&ECap7Regs };
volatile struct EPWM_REGS *EPWM[MAX_EPWM] =
{ 0, &EPwm1Regs, &EPwm2Regs, &EPwm3Regs,
&EPwm4Regs, &EPwm5Regs, &EPwm6Regs,
&EPwm7Regs, &EPwm8Regs, &EPwm9Regs,
&EPwm10Regs, &EPwm11Regs, &EPwm12Regs,
&EPwm13Regs, &EPwm14Regs, &EPwm15Regs,
&EPwm16Regs };
volatile struct EQEP_REGS *EQEP[MAX_EQEP] =
{ 0, &EQep1Regs, &EQep2Regs, &EQep3Regs };
volatile struct I2C_REGS *I2C[MAX_I2C] =
{ 0, &I2caRegs ,&I2cbRegs };
volatile struct McBSP_REGS *MCBSP[MAX_MCBSP] =
{ 0, &McbspaRegs ,&McbspbRegs };
volatile struct SCI_REGS *SCI[MAX_SCI] =
{ 0, &SciaRegs ,&ScibRegs ,&ScicRegs ,
&ScidRegs };
volatile struct SPI_REGS *SPI[MAX_SPI] =
{ 0, &SpiaRegs, &SpibRegs, &SpicRegs,
&SpicRegs };
volatile struct SDFM_REGS *SDFM[MAX_SDFM] =
{ 0, &Sdfm1Regs, &Sdfm2Regs};
#if defined(CPU1)
volatile Uint16 *TRIP_SEL[MAX_TRIPSEL] =
{ 0, &InputXbarRegs.INPUT1SELECT, &InputXbarRegs.INPUT2SELECT,
&InputXbarRegs.INPUT3SELECT, &InputXbarRegs.INPUT4SELECT,
&InputXbarRegs.INPUT5SELECT, &InputXbarRegs.INPUT6SELECT,
&InputXbarRegs.INPUT7SELECT, &InputXbarRegs.INPUT8SELECT,
&InputXbarRegs.INPUT9SELECT, &InputXbarRegs.INPUT10SELECT,
&InputXbarRegs.INPUT11SELECT, &InputXbarRegs.INPUT12SELECT,
&InputXbarRegs.INPUT13SELECT, &InputXbarRegs.INPUT14SELECT
};
#endif
//
// End of file
//
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 14950 files, more files were not shown because too many files have changed in this diff. Show more