-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8bd8e48
commit c411465
Showing
21 changed files
with
614 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/****************************************************************************** | ||
Filename : test_TMS570LC4357.h | ||
Author : pry | ||
Date : 22/07/2017 | ||
Licence : LGPL v3+; see COPYING for details. | ||
Description : The testbench for TMS570LC4357. | ||
******************************************************************************/ | ||
|
||
/* Includes ******************************************************************/ | ||
#include "RMP.h" | ||
/* End Includes **************************************************************/ | ||
|
||
/* Defines *******************************************************************/ | ||
/* Where are the initial stacks */ | ||
#define THD1_STACK (&Stack_1[215]) | ||
#define THD2_STACK (&Stack_2[215]) | ||
/* How to read counter */ | ||
#define COUNTER_READ() ((rtiREG1->CNT[0].FRCx)<<3) | ||
/* Are we testing the memory pool? */ | ||
#define TEST_MEM_POOL 6144 | ||
/* Are we doing minimal measurements? */ | ||
/* #define MINIMAL_SIZE */ | ||
/* The TMS570LS timers are all 32 bits, so */ | ||
typedef ptr_t tim_t; | ||
/* End Defines ***************************************************************/ | ||
|
||
/* Globals *******************************************************************/ | ||
#ifndef MINIMAL_SIZE | ||
void Int_Handler(void); | ||
ptr_t Stack_1[256]; | ||
ptr_t Stack_2[256]; | ||
/* End Globals ***************************************************************/ | ||
|
||
/* Begin Function:Timer_Init ************************************************** | ||
Description : Initialize the timer for timing measurements. This function needs | ||
to be adapted to your specific hardware. | ||
Input : None. | ||
Output : None. | ||
Return : None. | ||
******************************************************************************/ | ||
void Timer_Init(void) | ||
{ | ||
/* RTI/FRC0 clock = 1/8 CPU clock, already initialized. Disable compare 1 */ | ||
rtiREG1->INTFLAG = 2U; | ||
} | ||
/* End Function:Timer_Init ***************************************************/ | ||
|
||
/* Begin Function:Int_Init **************************************************** | ||
Description : Initialize an periodic interrupt source. This function needs | ||
to be adapted to your specific hardware. | ||
Input : None. | ||
Output : None. | ||
Return : None. | ||
******************************************************************************/ | ||
void Int_Init(void) | ||
{ | ||
/* RTI/FRC1 clock = 1/8 CPU clock */ | ||
rtiREG1->INTFLAG = 2U; | ||
rtiStopCounter(rtiCOUNTER_BLOCK1); | ||
rtiSetPeriod(rtiCOMPARE1, 4000); | ||
rtiEnableNotification(rtiNOTIFICATION_COMPARE1); | ||
rtiStartCounter(rtiCOUNTER_BLOCK1); | ||
} | ||
volatile int Acc_Count=0; | ||
/* The interrupt handler */ | ||
void rtiInterrupt(void) | ||
{ | ||
Acc_Count++; | ||
Int_Handler(); | ||
} | ||
/* End Function:Int_Init *****************************************************/ | ||
|
||
/* Begin Function:Int_Disable ************************************************* | ||
Description : Disable the periodic interrupt source. This function needs | ||
to be adapted to your specific hardware. | ||
Input : None. | ||
Output : None. | ||
Return : None. | ||
******************************************************************************/ | ||
void Int_Disable(void) | ||
{ | ||
/* Disable channel 1 interrupt */ | ||
rtiDisableNotification(rtiNOTIFICATION_COMPARE1); | ||
rtiStopCounter(rtiCOUNTER_BLOCK1); | ||
} | ||
#endif | ||
/* End Function:Int_Disable **************************************************/ | ||
|
||
/* End Of File ***************************************************************/ | ||
|
||
/* Copyright (C) Evo-Devo Instrum. All rights reserved ***********************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
MProkaron/Include/Platform/CortexR/Chips/TMS570LS0432/platform_TMS570LS0432.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/****************************************************************************** | ||
Filename : platform_TMS570LS0432.h | ||
Author : pry | ||
Date : 24/06/2017 | ||
Licence : LGPL v3+; see COPYING for details. | ||
Description: The configuration file for TMS570LS0432. | ||
******************************************************************************/ | ||
|
||
/* Defines *******************************************************************/ | ||
/* The HAL library */ | ||
#include "sys_common.h" | ||
#include "system.h" | ||
#include "rti.h" | ||
#include "sci.h" | ||
|
||
/* The maximum number of preemption priority levels in the system. | ||
* This parameter must be divisible by the word length - 32 is usually sufficient */ | ||
#define RMP_MAX_PREEMPT_PRIO 32 | ||
/* The maximum number of slices allowed */ | ||
#define RMP_MAX_SLICES 100000 | ||
/* The maximum number of semaphore counts allowed */ | ||
#define RMP_SEM_MAX_NUM 1000 | ||
/* Are we using custom hooks? */ | ||
#define RMP_USE_HOOKS RMP_FALSE | ||
/* The stzck size of the init thread */ | ||
#define RMP_INIT_STACK_SIZE 1024 | ||
/* The mask/unmask interrupt operations */ | ||
#define RMP_MASK_INT() RMP_Disable_Int() | ||
#define RMP_UNMASK_INT() RMP_Enable_Int() | ||
|
||
#define RMP_CRX_SYSTICK_VAL 10000 | ||
|
||
/* Other low-level initialization stuff - clock and serial */ | ||
#define RMP_CRX_LOW_LEVEL_INIT() \ | ||
do \ | ||
{ \ | ||
/* The TI library is in charge of all the initialization of interrupts and clocks */\ | ||
rtiInit(); \ | ||
rtiSetPeriod(rtiCOMPARE0, RMP_CRX_SYSTICK_VAL); \ | ||
rtiEnableNotification(rtiNOTIFICATION_COMPARE0); \ | ||
rtiStartCounter(rtiCOUNTER_BLOCK0); \ | ||
/* Enable SCI */ \ | ||
sciInit(); \ | ||
} \ | ||
while(0) | ||
|
||
/* This is for debugging output */ | ||
#define RMP_CRX_PUTCHAR(CHAR) \ | ||
do \ | ||
{ \ | ||
sciSendByte(scilinREG,(CHAR)); \ | ||
} \ | ||
while(0) | ||
/* End Defines ***************************************************************/ | ||
|
||
/* End Of File ***************************************************************/ | ||
|
||
/* Copyright (C) Evo-Devo Instrum. All rights reserved ***********************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<?ccsproject version="1.0"?> | ||
<projectOptions> | ||
<ccsVersion value="7.4.0"/> | ||
<deviceVariant value="Cortex R.TMS570LC43xx"/> | ||
<deviceFamily value="TMS470"/> | ||
<deviceEndianness value="be32"/> | ||
<codegenToolVersion value="16.9.6.LTS"/> | ||
<isElfFormat value="true"/> | ||
<rts value="libc.a"/> | ||
<createSlaveProjects value=""/> | ||
<templateProperties value="id=com.ti.common.project.core.emptyProjectWithMainTemplate,"/> | ||
<filesToOpen value="main.c,"/> | ||
<isTargetManual value="false"/> | ||
<connection value="common/targetdb/connections/TIXDS100v2_Connection.xml"/> | ||
</projectOptions> |
Oops, something went wrong.