Skip to content

Commit 681423f

Browse files
authored
Add demo for C29x port for TI F29H85x device (#30)
1 parent fa14546 commit 681423f

File tree

13 files changed

+1978
-0
lines changed

13 files changed

+1978
-0
lines changed
177 KB
Loading

C2000_C29x_F29H85x_CCS/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Overview
2+
3+
This directory contains FreeRTOS demo projects for the Texas Instruments F29H85x series of Real-Time MCUs, equipped with three C29x 64-bit CPUs running at 200MHz. These projects are designed to be run with Code Composer Studio v20x IDE.
4+
5+
## Software & Tool Dependencies
6+
7+
- [FreeRTOS Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel/releases/tag/V11.2.0) **v11.2.0**
8+
- [FreeRTOS Full Release](https://github.com/FreeRTOS/FreeRTOS/releases/tag/202411.00) **v202411.00**
9+
- [Code Composer Studio IDE](https://www.ti.com/tool/download/CCSTUDIO) **v20x** : Include C2000 real-time microcontroller device support during installation
10+
- [F29H85X-SDK](https://www.ti.com/tool/download/F29H85X-SDK/1.01.00.00) **v1.01.00.00** (or above)
11+
- [C29-CGT](https://www.ti.com/tool/download/C29-CGT/1.0.0.LTS) **v1.0.0LTS** : Included with CCS v20x
12+
13+
## Included Demos
14+
15+
### 1. Port Validation Tests
16+
17+
This project runs the set of standard FreeRTOS tests as described [here](https://github.com/FreeRTOS/FreeRTOS/blob/main/FreeRTOS/Demo/ThirdParty/Template/README.md). Individual tests to be run are configured in *`FreeRTOSConfig.h`*.
18+
19+
### How to Run
20+
21+
- Open *`ccs/freertos_port_validation_tests.projectspec`*, and fill in the following path variables:
22+
1. **PATH_F29H85X_SDK** : Path to the F29H85X-SDK installation
23+
2. **PATH_FREERTOS_KERNEL** : Path to FreeRTOS Kernel v11.2.0 installation
24+
3. **PATH_FREERTOS_FULL** : Path to the FreeRTOS Full Release v202411.00
25+
26+
This port has been validated with FreeRTOS Kernel v11.2.0, and the Common Demo files from FreeRTOS Full Release v202411.00. Ensure exact versions are used for both of these.
27+
28+
- Import the **f29h85x_freertos_port_validation_tests** project into CCS
29+
- Navigate to *Project Properties > C2000 Compiler > C2000 Compiler Flags*, and delete the path `-I"${COM_TI_F29H85X_SDK_INCLUDE_PATH}"` from the Include list. This is to ensure that the FreeRTOS copy included in the F29H85X-SDK does not conflict with the external installations being used.
30+
- Build and debug the project
31+
- Connect to the XDS110 UART COM port with following settings:
32+
- Bits per second = 9600
33+
- Data Bits = 8
34+
- Parity = None
35+
- Stop Bits = 1
36+
- Hardware Control = None
37+
38+
### Watch Variables
39+
40+
- pcStatusMessage is logged on the COM port once every ~5 seconds
41+
- loopCount - Number of iterations of Check task completed.
42+
43+
### Output
44+
![Expected Output](./Images/port_validation_output.png)
45+
If all enabled tests pass, "No errors" can be seen on the UART output
46+
47+
## Support
48+
49+
- Additional examples, tools and documentation are available in the F29H85X-SDK. Refer to the [SDK documentation](https://software-dl.ti.com/C2000/docs/f29h85x-sdk/latest/docs/html/index.html) for further details
50+
- For further support/queries, please raise a query on the Texas Instruments [E2E Support Forum](https://e2e.ti.com/)
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* FreeRTOS V202411.00
3+
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software. If you wish to use our Amazon
14+
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
*
23+
* https://www.FreeRTOS.org
24+
* https://github.com/FreeRTOS
25+
*
26+
*/
27+
28+
/* Scheduler includes. */
29+
#include "FreeRTOS.h"
30+
#include "task.h"
31+
32+
/* Demo includes. */
33+
#include "IntQueueTimer.h"
34+
#include "IntQueue.h"
35+
36+
/* Hardware includes. */
37+
#include "device.h"
38+
#include "cputimer.h"
39+
#include "interrupt.h"
40+
41+
__attribute__((interrupt("INT"))) void Timer1_Handler(void);
42+
43+
/*-----------------------------------------------------------*/
44+
45+
void vInitialiseTimerForIntQueueTest( void )
46+
{
47+
// Initialize hardware timer CPUTIMER1 */
48+
49+
CPUTimer_stopTimer(CPUTIMER1_BASE);
50+
CPUTimer_setPeriod(CPUTIMER1_BASE, ((uint32_t)((DEVICE_SYSCLK_FREQ / 200))));
51+
CPUTimer_setPreScaler(CPUTIMER1_BASE, 0U);
52+
CPUTimer_reloadTimerCounter(CPUTIMER1_BASE);
53+
CPUTimer_setEmulationMode(CPUTIMER1_BASE, CPUTIMER_EMULATIONMODE_STOPAFTERNEXTDECREMENT);
54+
CPUTimer_clearOverflowFlag(CPUTIMER1_BASE);
55+
CPUTimer_enableInterrupt(CPUTIMER1_BASE);
56+
57+
Interrupt_disable(INT_TIMER1);
58+
Interrupt_clearFlag(INT_TIMER1);
59+
Interrupt_clearOverflowFlag(INT_TIMER1);
60+
Interrupt_register(INT_TIMER1, &Timer1_Handler);
61+
Interrupt_setPriority(INT_TIMER1, 10U);
62+
Interrupt_enable(INT_TIMER1);
63+
64+
CPUTimer_startTimer(CPUTIMER1_BASE);
65+
}
66+
67+
/*-----------------------------------------------------------*/
68+
69+
__attribute__((interrupt("INT"))) void Timer1_Handler(void)
70+
{
71+
IntQueueTestTimerHandler();
72+
}
73+
74+
void IntQueueTestTimerHandler( void )
75+
{
76+
portYIELD_FROM_ISR( xSecondTimerHandler() );
77+
}
78+
/*-----------------------------------------------------------*/
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* FreeRTOS V202411.00
3+
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy of
6+
* this software and associated documentation files (the "Software"), to deal in
7+
* the Software without restriction, including without limitation the rights to
8+
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9+
* the Software, and to permit persons to whom the Software is furnished to do so,
10+
* subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in all
13+
* copies or substantial portions of the Software. If you wish to use our Amazon
14+
* FreeRTOS name, please do so in a fair use way that does not cause confusion.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18+
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19+
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20+
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21+
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22+
*
23+
* https://www.FreeRTOS.org
24+
* https://github.com/FreeRTOS
25+
*
26+
*/
27+
28+
#ifndef INT_QUEUE_TIMER_H
29+
#define INT_QUEUE_TIMER_H
30+
31+
/**
32+
* The function called from queue interrupt tests to initialise timer.
33+
*/
34+
void vInitialiseTimerForIntQueueTest( void );
35+
36+
/**
37+
* The function to be called from a timer handler.
38+
*/
39+
void IntQueueTestTimerHandler( void );
40+
41+
#endif /* INT_QUEUE_TIMER_H */

0 commit comments

Comments
 (0)