Update demos to use timers for the check functionality, and the flash timers. Floating point and Ethernet is not yet included.

This commit is contained in:
Richard Barry
2012-03-17 15:02:32 +00:00
parent 785621ff22
commit eb38217496
9 changed files with 342 additions and 293 deletions
+11 -3
View File
@@ -7,13 +7,21 @@
[GENERAL_DATA]
[BREAKPOINTS]
[OPEN_WORKSPACE_FILES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\include\flash_timer.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\FreeRTOSConfig.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\resetprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c"
[WORKSPACE_FILE_STATES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\resetprg.c" 22 22 1142 391 0 0
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" 154 154 835 366 0 1
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" -4 -23 1019 569 1 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c" 0 0 1326 516 0 2
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\include\flash_timer.h" 66 66 1120 448 0 3
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\FreeRTOSConfig.h" 44 44 1164 335 0 1
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\resetprg.c" 88 88 1120 448 0 4
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c" 154 154 835 366 0 0
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c" -4 -23 1326 673 1 6
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c" 110 110 1120 448 0 5
[LOADED_PROJECTS]
"RTOSDemo"
[END]
@@ -92,6 +92,7 @@
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Software timer definitions. */
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY ( 3 )
File diff suppressed because it is too large Load Diff
Binary file not shown.
@@ -3,15 +3,13 @@
[DATABASE_VERSION]
"1.1"
[SESSIONS_]
"DefaultSession"
"SessionRX600_E1_E20_SYSTEM"
"SimSessionRX600"
[CONFIGURATIONS]
"Blinky"
"Debug"
"Debug_with_optimisation"
[CURRENT_CONFIGURATION]
"Debug_with_optimisation"
"Debug"
[CURRENT_SESSION]
"SessionRX600_E1_E20_SYSTEM"
[GENERAL_DATA_PROJECT]
@@ -19,31 +17,17 @@
[GENERAL_DATA_CONFIGURATION_Blinky]
"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE"
[SESSIONS_Blinky]
"DefaultSession"
"SessionRX600_E1_E20_SYSTEM"
"SimSessionRX600"
[GENERAL_DATA_CONFIGURATION_Debug]
"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE"
[SESSIONS_Debug]
"DefaultSession"
"SessionRX600_E1_E20_SYSTEM"
"SimSessionRX600"
[GENERAL_DATA_CONFIGURATION_Debug_with_optimisation]
"PROJECT_FILES_MODIFIED_DATA_TAG" "FALSE"
[SESSIONS_Debug_with_optimisation]
"DefaultSession"
[SESSIONS_Debug]
"SessionRX600_E1_E20_SYSTEM"
[GENERAL_DATA_CONFIGURATION_Debug_with_optimisation]
"PROJECT_FILES_MODIFIED_DATA_TAG" "TRUE"
[SESSIONS_Debug_with_optimisation]
"SessionRX600_E1_E20_SYSTEM"
"SimSessionRX600"
[GENERAL_DATA_SESSION_SimSessionRX600]
[GENERAL_DATA_SESSION_DefaultSession]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_with_optimisation_SimSessionRX600]
[GENERAL_DATA_CONFIGURATION_SESSION_Blinky_SessionRX600_E1_E20_SYSTEM]
[GENERAL_DATA_CONFIGURATION_SESSION_Blinky_DefaultSession]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_DefaultSession]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_SessionRX600_E1_E20_SYSTEM]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_SimSessionRX600]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_with_optimisation_DefaultSession]
[GENERAL_DATA_CONFIGURATION_SESSION_Blinky_SimSessionRX600]
[GENERAL_DATA_CONFIGURATION_SESSION_Debug_with_optimisation_SessionRX600_E1_E20_SYSTEM]
[GENERAL_DATA_SESSION_SessionRX600_E1_E20_SYSTEM]
[END]
@@ -57,7 +57,7 @@ void PowerON_Reset_PC(void)
{
volatile unsigned int i;
set_intb((unsigned long)__sectop("C$VECT"));
set_intb(__sectop("C$VECT"));
set_fpsw(FPSW_init);
/* MCU boots using the LOCO, so turn the speed up before setting up the C
@@ -8,7 +8,7 @@
""
[GENERAL_DATA]
"FIRST_CONNECTION_TAG" "NO"
"MRULABELS_DATAMANAGER_KEY" "FFFFFFFF|00000000|2a94|f|108a|1054|fff8cd9e|1050|fff8c484|88218|000870B4|000870AE|88204|88208|18b8"
"MRULABELS_DATAMANAGER_KEY" "00000000|FFFFFFFF|2a94|f|108a|1054|fff8cd9e|1050|fff8c484|88218|000870B4|000870AE|88204|88208|18b8"
"RESET_CPU_AFTER_DOWNLOAD_TAG" "VARIANT_TRUE_STORE_TAG"
"{228DB593-0AB2-4EBE-A098-A2CABF094E46}RamMonitorCtrlViews" "0"
"{287A8023-99B5-49E1-A54E-4DDCA43D7959}MapCtrlECX_MAP_FIND_SYMBOL_LIST" ""
@@ -89,32 +89,32 @@
"{5F75FDA0-6FF0-11D5-B7CE-00E029352378}PACtrlViews" "0"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_DENORMAL_MODE" "16777216"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_EVAL_ROUND_MODE" "768"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000007274"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "0000000000006FF4"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_0" "0000000000004750"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_1" "000000000000446C"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_10" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_11" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_12" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_13" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "0000000000006A44"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000007274"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000E70C"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030004"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF84104"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF813CC"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_14" "0000000000004774"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_15" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_16" "0000000000004750"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_17" "000000000000E73C"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_18" "0000000000030001"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_19" "00000000FFF85D58"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_2" "0000000000004774"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_20" "00000000FFF81628"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_21" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_22" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_23" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_24" "0000000000000100"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_25" "1234567887650000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "000000000000E168"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "000000000000E168"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_3" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_4" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_5" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000006AA4"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "0000000000006A44"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "000000000000E148"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "000000000000DB44"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_6" "0000000000000000"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_7" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_8" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_9" "00000000A5A5A5A5"
"{64753FED-D387-4B8C-A91D-D3419C869C07}C_REGISTER_REG_COUNT" "26"
"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileDir" ""
"{6C4D5B81-FD67-46A9-A089-EA44DCDE47FD}RAMMonitorManagerCtrlBlockInfoFileName" ""
@@ -130,7 +130,7 @@
"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_COMB_BUFFER" ",,,,"
"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}ECX_WAVE_SAMPLING_RATE" "1000"
"{8A898260-6F1D-11D5-8EB6-00004CC34E9D}WaveformCtrlViews" "0"
"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "1"
"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersCtrlViews" "0"
"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ColumnWidth" "47,153,35"
"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_COUNT" "33"
"{95A081A1-7001-11D5-B1FD-00A0C9E23A58}RegistersWnd0ECX_REGISTER_DISPLAYED" "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
@@ -487,13 +487,13 @@
"Help" "TOOLBAR 0" 59419 1 5 "0.00" 0 0 0 0 0 17 0 "" "0.0"
"QzROM" "TOOLBAR 0" 59419 4 1 "0.00" 0 0 0 0 0 17 0 "" "0.0"
"{WK_00000001_CmdLine}ADC_Single_DTC_MTUDefaultSession" "WINDOW" 59422 0 1 "0.50" 230 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0"
"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.33" 291 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0"
"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 2 "1.00" 300 0 0 350 200 17 0 "57634|57637|57633|<<separator>>|32781|32782|<<separator>>|32780|32785|32787" "0.0"
"{WK_00000001_CmdLine}" "WINDOW" 59422 0 2 "0.20" 187 0 0 350 200 17 0 "32771|32772|32778|<<separator>>|32773|32774|<<separator>>|32820|<<separator>>|32801|32824" "0.0"
"{WK_00000001_DEBUGCONSOLE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 300 0 0 350 200 17 0 "57634|57637|57633|<<separator>>|32781|32782|<<separator>>|32780|32785|32787" "0.0"
"{WK_00000001_DISASSEMBLY}" "WINDOW" 0 0 0 "0.00" 0 132 132 835 366 9 0 "" "0.0"
"{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.50" 291 0 0 869 657 17 0 "32817|32826|32819|32820|32821" "0.0"
"{WK_00000001_IO}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 1 "0.50" 187 0 0 869 657 17 0 "32817|32826|32819|32820|32821" "0.0"
"{WK_00000001_MEMORY}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "1.00" 219 1452 519 1033 219 2053 0 "42202|42203|42204|42233|<<separator>>|42206|42205|42230|42229|42207|<<separator>>|42208|42209|42210|49076|42228|42227|<<separator>>|42231|42232|42234|42235|<<separator>>|42211|<<separator>>" "0.0"
"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 291 560 340 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0"
"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 300 0 0 350 200 18 0 "" "0.0"
"{WK_00000001_OUTPUT}" "WINDOW" 59422 0 0 "1.00" 187 560 340 350 200 18 0 "36756|36757|36758|36759|<<separator>>|36746|36747|<<separator>>|39531|<<separator>>|39500|39534|<<separator>>|36687" "0.0"
"{WK_00000001_REGISTERS}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 1 "1.00" 300 0 0 350 200 2065 0 "" "0.0"
"{WK_00000001_STACKTRACE}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59422 0 0 "0.50" 277 0 0 350 200 2065 0 "" "0.0"
"{WK_00000001_WATCH}RTOSDemoSessionRX600_E1_E20_SYSTEM" "WINDOW" 59421 0 0 "0.50" 300 0 0 1040 307 17 0 "32781|32783|<<separator>>|32771|32829|32772|32827|32773|<<separator>>|32786|<<separator>>|32810|32811" "0.0"
"{WK_00000002_WORKSPACE}" "WINDOW" 59420 0 0 "1.00" 330 560 340 350 200 18 0 "" "0.0"
@@ -529,7 +529,11 @@
"{WK_TB00000011_CPU} TOOLBAR 0"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\queue.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Renesas-Files\resetprg.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\Minimal\flash_timer.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\FreeRTOSConfig.h"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\main-full.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Source\timers.c"
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\Common\include\flash_timer.h"
[TARGET_NAME]
"RX E1/E20 SYSTEM" "" 0
[STATUSBAR_STATEINFO_VD1]
@@ -560,7 +564,7 @@
[DEBUGGER_OPTIONS]
""
[DOWNLOAD_MODULES]
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Debug_with_optimisation\RTOSDemo.abs" 0 "Elf/Dwarf2" 0 0 1 0
"C:\E\Dev\FreeRTOS\WorkingCopy\Demo\RX600_RX63N-RSK_Renesas\RTOSDemo\Debug\RTOSDemo.abs" 0 "Elf/Dwarf2" 0 0 1 0
[CONNECT_ON_GO]
"FALSE"
[DOWNLOAD_MODULES_AFTER_BUILD]
@@ -581,4 +585,5 @@
[FLASH_DETAILS]
"0.000000" 0 0 "" 0 "" 0 0 "" 1 1 0 0 0 0 0 "" "" "" "" ""
[BREAKPOINTS]
"c:\e\dev\freertos\workingcopy\demo\rx600_rx63n-rsk_renesas\rtosdemo\renesas-files\resetprg.c" 137 -524083 1 "{00000000-0000-0000-C000-000000000046}" ""
[END]
@@ -52,15 +52,19 @@
*/
/*
* This is a very simple demo that creates two tasks and one queue. One task
* (the queue receive task) blocks on the queue to wait for data to arrive,
* toggling an LED each time '100' is received. The other task (the queue send
* task) repeatedly blocks for a fixed period before sending '100' to the queue
* (causing the first task to toggle the LED).
* This is a very simple demo that creates two tasks, one queue, and one
* software timer. For a much more complete and complex example select either
* the Debug or Debug_with_optimisation build configurations within the HEW,
* which build main_full.c in place of this file.
*
* One task (the queue receive task) blocks on the queue to wait for data to
* arrive, toggling LED0 each time '100' is received. The other task (the
* queue send task) repeatedly blocks for a fixed period before sending '100'
* to the queue (causing the first task to toggle the LED).
*
* For a much more complete and complex example select either the Debug or
* Debug_with_optimisation build configurations within the HEW IDE.
*/
* The software timer is configured to auto-reload. The timer callback
* function periodically toggles LED1.
*/
/* Hardware specific includes. */
#include "iodefine.h"
@@ -68,6 +72,7 @@
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "queue.h"
/* Priorities at which the tasks are created. */
@@ -75,19 +80,31 @@
#define configQUEUE_SEND_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
/* The rate at which data is sent to the queue, specified in milliseconds. */
#define mainQUEUE_SEND_FREQUENCY_MS ( 500 / portTICK_RATE_MS )
#define mainQUEUE_SEND_PERIOD_MS ( 500 / portTICK_RATE_MS )
/* The period of the software timer, specified in milliseconds. */
#define mainSOFTWARE_TIMER_PERIOD_MS ( 150 / portTICK_RATE_MS )
/* The number of items the queue can hold. This is 1 as the receive task
will remove items as they are added so the send task should always find the
queue empty. */
#define mainQUEUE_LENGTH ( 1 )
/* The LEDs toggle by the task and timer respectively. */
#define mainTASK_LED ( 0 )
#define mainTIMER_LED ( 1 )
/*
* The tasks as defined at the top of this file.
*/
static void prvQueueReceiveTask( void *pvParameters );
static void prvQueueSendTask( void *pvParameters );
/*
* The callback function used by the software timer.
*/
static void prvBlinkyTimerCallback( xTimerHandle xTimer );
/* The queue used by both tasks. */
static xQueueHandle xQueue = NULL;
@@ -98,22 +115,40 @@ volatile unsigned long ulHighFrequencyTickCount = 0UL;
void main(void)
{
extern void HardwareSetup( void );
xTimerHandle xTimer;
/* Renesas provided CPU configuration routine. The clocks are configured in
here. */
HardwareSetup();
/* Turn all LEDs off. */
vParTestInitialise();
/* Create the queue. */
xQueue = xQueueCreate( mainQUEUE_LENGTH, sizeof( unsigned long ) );
/* Create the software timer, as described at the top of this file. */
xTimer = xTimerCreate( "BlinkyTimer", /* Just a text name to make debugging easier - not used by the scheduler. */
mainSOFTWARE_TIMER_PERIOD_MS, /* The timer period. */
pdTRUE, /* Set to pdTRUE for periodic timer, or pdFALSE for one-shot timer. */
NULL, /* The timer ID is not required. */
prvBlinkyTimerCallback ); /* The function executed when the timer expires. */
if( xTimer != NULL )
{
/* Start the timer - it will not actually start running until the
scheduler has started. The block time is set to 0, although, because
xTimerStart() is being called before the scheduler has been started,
the any block time specified would be ignored anyway. */
xTimerStart( xTimer, 0UL );
}
if( xQueue != NULL )
{
/* Start the two tasks as described at the top of this file. */
xTaskCreate( prvQueueReceiveTask, "Rx", configMINIMAL_STACK_SIZE, NULL, configQUEUE_RECEIVE_TASK_PRIORITY, NULL );
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
"Rx", /* Just a text name to make debugging easier - not used by the scheduler. */
configMINIMAL_STACK_SIZE, /* The size of the task stack, in words. */
NULL, /* The task parameter is not used. */
configQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task when it is created. */
NULL ); /* The task handle is not used. */
xTaskCreate( prvQueueSendTask, "TX", configMINIMAL_STACK_SIZE, NULL, configQUEUE_SEND_TASK_PRIORITY, NULL );
/* Start the tasks running. */
@@ -140,7 +175,7 @@ const unsigned long ulValueToSend = 100UL;
/* Place this task in the blocked state until it is time to run again.
The block state is specified in ticks, the constant used converts ticks
to ms. */
vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_FREQUENCY_MS );
vTaskDelayUntil( &xNextWakeTime, mainQUEUE_SEND_PERIOD_MS );
/* Send to the queue - causing the queue receive task to flash its LED. 0
is used so the send does not block - it shouldn't need to as the queue
@@ -165,12 +200,19 @@ unsigned long ulReceivedValue;
value? If it is, toggle the LED. */
if( ulReceivedValue == 100UL )
{
vParTestToggleLED( 0 );
vParTestToggleLED( mainTASK_LED );
}
}
}
/*-----------------------------------------------------------*/
static void prvBlinkyTimerCallback( xTimerHandle xTimer )
{
/* The software timer does nothing but toggle an LED. */
vParTestToggleLED( mainTIMER_LED );
}
/*-----------------------------------------------------------*/
void vApplicationSetupTimerInterrupt( void )
{
/* Enable compare match timer 0. */
File diff suppressed because it is too large Load Diff