\r
/* Configure TC1 channel 0 tmrTIMER_2_FREQUENCY frequency and trigger on\r
RC compare. */\r
- tc_trigger_on_freq( TC1, tmrTC0_CHANNEL_0, tmrTIMER_2_FREQUENCY );\r
- TC1->TC_CHANNEL[ tmrTC0_CHANNEL_0 ].TC_IER = TC_IER_CPCS;\r
+ tc_trigger_on_freq( TC1, tmrTC1_CHANNEL_0, tmrTIMER_2_FREQUENCY );\r
+ TC1->TC_CHANNEL[ tmrTC1_CHANNEL_0 ].TC_IER = TC_IER_CPCS;\r
\r
/* Enable interrupts and start the timers. */\r
aic_configure( ID_TC0, tmrLOWER_PRIORITY );\r
#define INCLUDE_xTimerPendFunctionCall 1\r
#define INCLUDE_eTaskGetState 1\r
#define INCLUDE_xTaskAbortDelay 1\r
-#define INCLUDE_xTaskGetTaskHandle 1\r
+#define INCLUDE_xTaskGetHandle 1\r
\r
/* This demo makes use of one or more example stats formatting functions. These\r
format the raw data provided by the uxTaskGetSystemState() function in to human\r
/* Set configCREATE_LOW_POWER_DEMO to one to run the simple blinky demo low power\r
example, or 1 to run the more comprehensive test and demo application. See\r
the comments at the top of main.c for more information. */\r
-#define configCREATE_LOW_POWER_DEMO 1\r
+#define configCREATE_LOW_POWER_DEMO 0\r
\r
/* Some configuration is dependent on the demo being built. */\r
#if( configCREATE_LOW_POWER_DEMO == 1 )\r
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
- <Len>270</Len>
- <Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000100000000000000010000004A433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D34465F434543313330325F4B65696C5C6D61696E2E6300000000066D61696E2E6300000000BECEA100FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000340100005E000000800700006E030000</Data>
+ <Len>274</Len>
+ <Data>0100000004000000010000000100000001000000010000000000000002000000000000000100000001000000000000002800000028000000010000000100000000000000010000004E433A5C455C4465765C4672656552544F535C576F726B696E67436F70795C4672656552544F535C44656D6F5C434F525445585F4D34465F434543313330325F4B65696C5F4743435C6D61696E2E6300000000066D61696E2E6300000000C5D4F200FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000340100005E000000800700006E030000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
- <Len>2323</Len>
- <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000105F5F61736D20766F6C6174696C65202896000000000000001400105F5F61736D20766F6C6174696C6520280008707276456E61626C08707276536C6565701470727644697361626C65496E7465727275707473087469636B686F6F6B08626C6F636B696E6706626C6F636B7106726563757273087265636D757465780A537461636B5F53697A65114E5649435F48616E646C65725F544D52300B6274696D65725F696E69740F5379735469636B5F48616E646C6572077379737469636B1278506F727450656E64535648616E646C65720670656E6473760B785461736B4372656174650A737461727473636865640C6D616C6C6F636661696C65640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
+ <Len>2098</Len>
+ <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000204D4D43525F5043525F50524F434553534F525F434C4F434B5F434F4E54524F4C960000000000000002001678506F72744973496E73696465496E74657272757074204D4D43525F5043525F50524F434553534F525F434C4F434B5F434F4E54524F4C0000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020000001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
- <Len>2323</Len>
- <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000105F5F61736D20766F6C6174696C65202896000000000000001400105F5F61736D20766F6C6174696C6520280008707276456E61626C08707276536C6565701470727644697361626C65496E7465727275707473087469636B686F6F6B08626C6F636B696E6706626C6F636B7106726563757273087265636D757465780A537461636B5F53697A65114E5649435F48616E646C65725F544D52300B6274696D65725F696E69740F5379735469636B5F48616E646C6572077379737469636B1278506F727450656E64535648616E646C65720670656E6473760B785461736B4372656174650A737461727473636865640C6D616C6C6F636661696C65640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020001001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
+ <Len>2071</Len>
+ <Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000004000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000000460000000000000000000000000000000001000000010000000180FE880000000000004500000000000000000000000000000000010000000100000001800B810000000000001300000000000000000000000000000000010000000100000001800C810000000000001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000204D4D43525F5043525F50524F434553534F525F434C4F434B5F434F4E54524F4C96000000000000000100204D4D43525F5043525F50524F434553534F525F434C4F434B5F434F4E54524F4C00000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000020003001500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000000180C8880000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E4C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002880DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002880DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002880E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002880E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000288018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000028800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002880D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002880E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C6572030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
<Name>Debug</Name>
<Buttons>
<Len>2236</Len>
- <Data>00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020000002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B000000000000310000000857617463682026320000000000000000000000000100000001000000000000000000000001000000000013800F0100000200010032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F727920263400000000000000000000000001000000010000000000000000000000010000000000138010010000020000003300000008554152542023263100000000000000000000000001000000010000000000000000000000010000000400138093070000000000003300000008554152542023263100000000000000000000000001000000010000000000000000000000010000000000138094070000000000003300000008554152542023263200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000008554152542023263300000000000000000000000001000000010000000000000000000000010000000000138096070000000000003300000015446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000020000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720000000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720000000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000002000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730000000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F7200000000000000000100000000000000010000000000000000000000010000000000000000000544656275673C020000</Data>
+ <Data>00200000010000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000004002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000020001002D0000000000000000000000000000000001000000010000000180F07F0000020000002E0000000000000000000000000000000001000000010000000180E8880000020000003700000000000000000000000000000000010000000100000001803B010000020001002F0000000000000000000000000000000001000000010000000180BB8A00000200010030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000002000100310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000002001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B000000000000310000000857617463682026320000000000000000000000000100000001000000000000000000000001000000000013800F0100000200010032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F727920263400000000000000000000000001000000010000000000000000000000010000000000138010010000020000003300000008554152542023263100000000000000000000000001000000010000000000000000000000010000000400138093070000000000003300000008554152542023263100000000000000000000000001000000010000000000000000000000010000000000138094070000000000003300000008554152542023263200000000000000000000000001000000010000000000000000000000010000000000138095070000000000003300000008554152542023263300000000000000000000000001000000010000000000000000000000010000000000138096070000000000003300000015446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000020000003400000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F76657261676500000000000000000000000001000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000002000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F7201000000000000000100000000000000010000000000000000000000010000000000000000000544656275673C020000</Data>
</Buttons>
<OriginalItems>
<Len>898</Len>
<Doc>
<Name>..\main.c</Name>
<ColumnNumber>0</ColumnNumber>
- <TopLine>66</TopLine>
- <CurrentLine>141</CurrentLine>
+ <TopLine>67</TopLine>
+ <CurrentLine>142</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<Group>
<GroupName>System</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<GroupNumber>5</GroupNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
- <tvExp>0</tvExp>
+ <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\main_full\IntQueueTimer.c</PathWithFileName>
#include "task.h"\r
\r
/* Hardware register addresses. */\r
-#define mainVTOR ( * ( uint32_t * ) 0xE000ED08 )\r
-#define mainNVIC_AUX_ACTLR ( * ( uint32_t * ) 0xE000E008 )\r
+#define mainVTOR ( * ( uint32_t * ) 0xE000ED08 )\r
+#define mainNVIC_AUX_ACTLR ( * ( uint32_t * ) 0xE000E008 )\r
+#define mainEC_INTERRUPT_CONTROL ( * ( volatile uint32_t * ) 0x4000FC18 )\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
extern void system_set_ec_clock( void );\r
extern unsigned long __Vectors[];\r
- \r
+\r
/* Disable M4 write buffer: fix MEC1322 hardware bug. */\r
mainNVIC_AUX_ACTLR |= 0x07;\r
\r
+ /* Enable alternative NVIC vectors. */\r
+ mainEC_INTERRUPT_CONTROL = pdTRUE;\r
+\r
system_set_ec_clock();\r
- \r
+\r
/* Assuming downloading code via the debugger - so ensure the hardware\r
is using the vector table downloaded with the application. */\r
mainVTOR = ( uint32_t ) __Vectors;\r
\r
/* Hardware register locations. */\r
#define tmrGIRQ23_ENABLE_SET ( * ( volatile uint32_t * ) 0x4000C130 )\r
-#define tmrMMCR_EC_INTERRUPT_CONTROL ( * ( volatile uint8_t * ) 0x4000FC18 )\r
\r
#define tmrRECORD_NESTING_DEPTH() \\r
ulNestingDepth++; \\r
const uint32_t ulTimer2Count = configCPU_CLOCK_HZ / tmrTIMER_2_FREQUENCY;\r
\r
tmrGIRQ23_ENABLE_SET = 0x03;\r
- tmrMMCR_EC_INTERRUPT_CONTROL = 1; \r
- \r
- /* Initialise the three timers as described at the top of this file, and \r
+\r
+ /* Initialise the three timers as described at the top of this file, and\r
enable their interrupts in the NVIC. */\r
btimer_init( tmrTIMER_CHANNEL_0, BTIMER_AUTO_RESTART | BTIMER_COUNT_DOWN | BTIMER_INT_EN, 0, ulTimer0Count, ulTimer0Count );\r
- btimer_interrupt_status_get_clr( tmrTIMER_CHANNEL_0 ); \r
+ btimer_interrupt_status_get_clr( tmrTIMER_CHANNEL_0 );\r
enable_timer0_irq();\r
NVIC_SetPriority( TIMER0_IRQn, tmrLOWER_PRIORITY ); //0xc0 into 0xe000e431\r
NVIC_ClearPendingIRQ( TIMER0_IRQn );\r
{\r
/* An error has been detected in one of the tasks - flash the LED\r
at a higher frequency to give visible feedback that something has\r
- gone wrong (it might just be that the loop back connector required\r
- by the comtest tasks has not been fitted). */\r
+ gone wrong. */\r
xDelayPeriod = mainERROR_CHECK_TASK_PERIOD;\r
}\r
\r
\r
/* Calculate how many clock increments make up a single tick period. */\r
static const uint32_t ulReloadValueForOneHighResolutionTick = ( mainHIGHER_RESOLUTION_TIMER_HZ / configTICK_RATE_HZ );\r
-//static const uint32_t usReloadValueForOneLowResolutionTick = ( mainLOW_RESOLUTION_TIMER_HZ / configTICK_RATE_HZ );\r
\r
/* Calculate the maximum number of ticks that can be suppressed when using the\r
high resolution clock and low resolution clock respectively. */\r
static uint32_t ulMaximumPossibleSuppressedHighResolutionTicks = 0;\r
-//static const uint16_t usMaximumPossibleSuppressedLowResolutionTicks = USHRT_MAX / usReloadValueForOneLowResolutionTick;\r
\r
/* As the clock is only 2KHz, it is likely a value of 1 will be too much, so\r
use zero - but leave the value here to assist porting to different clock\r
\r
#if( lpINCLUDE_TEST_TIMER == 1 )\r
\r
- #define GIRQ23_ENABLE_SET ( * ( uint32_t * ) 0x4000C130 )\r
+ #define lpGIRQ23_ENABLE_SET ( * ( uint32_t * ) 0x4000C130 )\r
\r
static void prvSetupBasicTimer( void )\r
{\r
const uint8_t ucTimerChannel = 0;\r
const uint32_t ulTimer0Count = configCPU_CLOCK_HZ / 10;\r
\r
- GIRQ23_ENABLE_SET = 0x03;\r
- *(unsigned int*)0x4000FC18 = 1;\r
+ lpGIRQ23_ENABLE_SET = 0x03;\r
\r
/* To fully test the low power tick processing it is necessary to sometimes\r
bring the MCU out of its sleep state by a method other than the tick\r
ulMaximumPossibleSuppressedHighResolutionTicks = ( ( uint32_t ) USHRT_MAX ) / ulReloadValueForOneHighResolutionTick;\r
\r
/* Set up the hibernation timer to start at the value required by the\r
- tick interrupt. Equivalent to the following libarary call. The library\r
- is not used as it is not compatible with all the compilers used:\r
- htimer_enable( mainTICK_HTIMER_ID, ulHighResolutionReloadValue, mainHTIMER_HIGH_RESOLUTION ); */\r
+ tick interrupt. */\r
lpHTIMER_PRELOAD_REGISTER = ulHighResolutionReloadValue;\r
lpHTIMER_CONTROL_REGISTER = mainHTIMER_HIGH_RESOLUTION;\r
\r
eSleepAction = eTaskConfirmSleepModeStatus();\r
if( eSleepAction == eAbortSleep )\r
{\r
- /* Resetart the timer from whatever remains in the counter register,\r
+ /* Restart the timer from whatever remains in the counter register,\r
but 0 is not a valid value. */\r
ulReloadValue = ulCountBeforeSleep - ulStoppedTimerCompensation;\r
\r
build. Remove the whole file if this is not the case. */\r
#if( INCLUDE_xTaskAbortDelay == 1 )\r
\r
-#if( INCLUDE_xTaskGetTaskHandle != 1 )\r
- #error This test file uses the xTaskGetTaskHandle() API function so INCLUDE_xTaskGetTaskHandle must be set to 1 in FreeRTOSConfig.h.\r
+#if( INCLUDE_xTaskGetHandle != 1 )\r
+ #error This test file uses the xTaskGetHandle() API function so INCLUDE_xTaskGetHandle must be set to 1 in FreeRTOSConfig.h.\r
#endif\r
\r
/* Task priorities. Allow these to be overridden. */\r
/* Just to remove compiler warnings. */\r
( void ) pvParameters;\r
\r
- xBlockingTask = xTaskGetTaskHandle( pcBlockingTaskName );\r
+ xBlockingTask = xTaskGetHandle( pcBlockingTaskName );\r
configASSERT( xBlockingTask );\r
\r
for( ;; )\r
/* Just to remove compiler warnings. */\r
( void ) pvParameters;\r
\r
- xControllingTask = xTaskGetTaskHandle( pcControllingTaskName );\r
+ xControllingTask = xTaskGetHandle( pcControllingTaskName );\r
configASSERT( xControllingTask );\r
\r
for( ;; )\r
#define INCLUDE_xTaskGetSchedulerState 1\r
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1\r
#define INCLUDE_xTaskGetIdleTaskHandle 1\r
-#define INCLUDE_xTaskGetTaskHandle 1\r
+#define INCLUDE_xTaskGetHandle 1\r
#define INCLUDE_eTaskGetState 1\r
#define INCLUDE_xSemaphoreGetMutexHolder 1\r
#define INCLUDE_xTimerPendFunctionCall 1\r
#define INCLUDE_xTaskGetSchedulerState 1\r
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 1\r
#define INCLUDE_xTaskGetIdleTaskHandle 1\r
-#define INCLUDE_xTaskGetTaskHandle 1\r
+#define INCLUDE_xTaskGetHandle 1\r
#define INCLUDE_eTaskGetState 1\r
#define INCLUDE_xSemaphoreGetMutexHolder 1\r
#define INCLUDE_xTimerPendFunctionCall 1\r
\r
/* Check the same handle is obtained using the idle task's name. First try\r
with the wrong name, then the right name. */\r
- if( xTaskGetTaskHandle( "Idle" ) == xIdleTaskHandle )\r
+ if( xTaskGetHandle( "Idle" ) == xIdleTaskHandle )\r
{\r
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";\r
}\r
\r
- if( xTaskGetTaskHandle( "IDLE" ) != xIdleTaskHandle )\r
+ if( xTaskGetHandle( "IDLE" ) != xIdleTaskHandle )\r
{\r
pcStatusMessage = "Error: Returned handle for name Idle was incorrect";\r
}\r
pcStatusMessage = "Error: Returned timer task handle was incorrect";\r
}\r
\r
- if( xTaskGetTaskHandle( "Tmr Svc" ) != xTimerTaskHandle )\r
+ if( xTaskGetHandle( "Tmr Svc" ) != xTimerTaskHandle )\r
{\r
pcStatusMessage = "Error: Returned handle for name Tmr Svc was incorrect";\r
}\r
pcStatusMessage = "Error: Returned timer task state was incorrect";\r
}\r
\r
- /* Also with the vTaskGetTaskInfo() function. */\r
- vTaskGetTaskInfo( xTimerTaskHandle, /* The task being queried. */\r
+ /* Also with the vTaskGetInfo() function. */\r
+ vTaskGetInfo( xTimerTaskHandle, /* The task being queried. */\r
&xTaskInfo, /* The structure into which information on the task will be written. */\r
pdTRUE, /* Include the task's high watermark in the structure. */\r
eInvalid ); /* Include the task state in the structure. */\r
\r
- /* Check the information returned by vTaskGetTaskInfo() is as expected. */\r
+ /* Check the information returned by vTaskGetInfo() is as expected. */\r
if( ( xTaskInfo.eCurrentState != eBlocked ) ||\r
( strcmp( xTaskInfo.pcTaskName, "Tmr Svc" ) != 0 ) ||\r
( xTaskInfo.uxCurrentPriority != configTIMER_TASK_PRIORITY ) ||\r
( xTaskInfo.pxStackBase != uxTimerTaskStack ) ||\r
( xTaskInfo.xHandle != xTimerTaskHandle ) )\r
{\r
- pcStatusMessage = "Error: vTaskGetTaskInfo() returned incorrect information about the timer task";\r
+ pcStatusMessage = "Error: vTaskGetInfo() returned incorrect information about the timer task";\r
}\r
\r
/* Other tests that should only be performed once follow. The test task\r
#define INCLUDE_xSemaphoreGetMutexHolder 1\r
#define INCLUDE_xTimerPendFunctionCall 1\r
#define INCLUDE_xTaskAbortDelay 1\r
-#define INCLUDE_xTaskGetTaskHandle 1\r
+#define INCLUDE_xTaskGetHandle 1\r
\r
/* It is a good idea to define configASSERT() while developing. configASSERT()\r
uses the same semantics as the standard C assert() macro. */\r
#define INCLUDE_xSemaphoreGetMutexHolder INCLUDE_xQueueGetMutexHolder\r
#endif\r
\r
-#ifndef INCLUDE_xTaskGetTaskHandle\r
- #define INCLUDE_xTaskGetTaskHandle 0\r
+#ifndef INCLUDE_xTaskGetHandle\r
+ #define INCLUDE_xTaskGetHandle 0\r
#endif\r
\r
#ifndef INCLUDE_uxTaskGetStackHighWaterMark\r
#define portTICK_RATE_MS portTICK_PERIOD_MS\r
#define pcTaskGetTaskName pcTaskGetName\r
#define pcTimerGetTimerName pcTimerGetName\r
+ #define pcQueueGetQueueName pcQueueGetName\r
+ #define vTaskGetTaskInfo vTaskGetInfo\r
\r
/* Backward compatibility within the scheduler code only - these definitions\r
are not really required but are included for completeness. */\r
* \defgroup xSemaphoreTakeRecursive xSemaphoreTakeRecursive\r
* \ingroup Semaphores\r
*/\r
-#define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )\r
+#if( configUSE_RECURSIVE_MUTEXES == 1 )\r
+ #define xSemaphoreTakeRecursive( xMutex, xBlockTime ) xQueueTakeMutexRecursive( ( xMutex ), ( xBlockTime ) )\r
+#endif\r
\r
/**\r
* semphr. h\r
* \defgroup xSemaphoreGiveRecursive xSemaphoreGiveRecursive\r
* \ingroup Semaphores\r
*/\r
-#define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( ( xMutex ) )\r
+#if( configUSE_RECURSIVE_MUTEXES == 1 )\r
+ #define xSemaphoreGiveRecursive( xMutex ) xQueueGiveMutexRecursive( ( xMutex ) )\r
+#endif\r
\r
/**\r
* semphr. h\r
* \defgroup xSemaphoreCreateRecursiveMutex xSemaphoreCreateRecursiveMutex\r
* \ingroup Semaphores\r
*/\r
-#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
+#if( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )\r
#define xSemaphoreCreateRecursiveMutex() xQueueCreateMutex( queueQUEUE_TYPE_RECURSIVE_MUTEX )\r
#endif\r
\r
* \defgroup xSemaphoreCreateRecursiveMutexStatic xSemaphoreCreateRecursiveMutexStatic\r
* \ingroup Semaphores\r
*/\r
-#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+#if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_RECURSIVE_MUTEXES == 1 ) )\r
#define xSemaphoreCreateRecursiveMutexStatic( pxStaticSemaphore ) xQueueCreateMutexStatic( queueQUEUE_TYPE_RECURSIVE_MUTEX, pxStaticSemaphore )\r
#endif /* configSUPPORT_STATIC_ALLOCATION */\r
\r
\r
/**\r
* semphr.h\r
- * <pre>UBaseType_t uxSemaphoreGetCount( SemaphoreHandle_t xMutex );</pre>\r
+ * <pre>UBaseType_t uxSemaphoreGetCount( SemaphoreHandle_t xSemaphore );</pre>\r
*\r
* If the semaphore is a counting semaphore then uxSemaphoreGetCount() returns\r
* its current count value. If the semaphore is a binary semaphore then\r
\r
/**\r
* task. h\r
- * <pre>void vTaskGetTaskInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );</pre>\r
+ * <pre>void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState );</pre>\r
*\r
* configUSE_TRACE_FACILITY must be defined as 1 for this function to be\r
* available. See the configuration section for more information.\r
TaskStatus_t xTaskDetails;\r
\r
// Obtain the handle of a task from its name.\r
- xHandle = xTaskGetTaskHandle( "Task_Name" );\r
+ xHandle = xTaskGetHandle( "Task_Name" );\r
\r
// Check the handle is not NULL.\r
configASSERT( xHandle );\r
\r
// Use the handle to obtain further information about the task.\r
- vTaskGetTaskInfo( xHandle,\r
- &xTaskDetails,\r
- pdTRUE, // Include the high water mark in xTaskDetails.\r
- eInvalid ); // Include the task state in xTaskDetails.\r
+ vTaskGetInfo( xHandle,\r
+ &xTaskDetails,\r
+ pdTRUE, // Include the high water mark in xTaskDetails.\r
+ eInvalid ); // Include the task state in xTaskDetails.\r
}\r
</pre>\r
- * \defgroup vTaskGetTaskInfo vTaskGetTaskInfo\r
+ * \defgroup vTaskGetInfo vTaskGetInfo\r
* \ingroup TaskCtrl\r
*/\r
-void vTaskGetTaskInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) PRIVILEGED_FUNCTION;\r
+void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState ) PRIVILEGED_FUNCTION;\r
\r
/**\r
* task. h\r
\r
/**\r
* task. h\r
- * <PRE>TaskHandle_t xTaskGetTaskHandle( const char *pcNameToQuery );</PRE>\r
+ * <PRE>TaskHandle_t xTaskGetHandle( const char *pcNameToQuery );</PRE>\r
*\r
* NOTE: This function takes a relatively long time to complete and should be\r
* used sparingly.\r
*\r
* @return The handle of the task that has the human readable name pcNameToQuery.\r
- * NULL is returned if no matching name is found. INCLUDE_xTaskGetTaskHandle\r
- * must be set to 1 in FreeRTOSConfig.h for pcTaskGetTaskHandle() to be available.\r
+ * NULL is returned if no matching name is found. INCLUDE_xTaskGetHandle\r
+ * must be set to 1 in FreeRTOSConfig.h for pcTaskGetHandle() to be available.\r
*\r
- * \defgroup pcTaskGetTaskHandle pcTaskGetTaskHandle\r
+ * \defgroup pcTaskGetHandle pcTaskGetHandle\r
* \ingroup TaskUtils\r
*/\r
-TaskHandle_t xTaskGetTaskHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
/**\r
* task.h\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* Required to allow portasm.asm access the configMAX_SYSCALL_INTERRUPT_PRIORITY\r
setting. */\r
const uint32_t ulMaxSyscallInterruptPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY;\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__asm( " cpsid i" );\r
+ __asm( " dsb" );\r
+ __asm( " isb" );\r
+\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* Let the user override the pre-loading of the initial LR with the address of\r
prvTaskExitError() in case it messes up unwinding of the stack in the\r
debugger. */\r
pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */\r
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__asm volatile( "cpsid i" );\r
+ __asm volatile( "dsb" );\r
+ __asm volatile( "isb" );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
/* The systick is a 24-bit counter. */\r
#define portMAX_24_BIT_NUMBER ( 0xffffffUL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* A fiddle factor to estimate the number of SysTick counts that would have\r
occurred while the SysTick counter is stopped during tickless idle\r
calculations. */\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__asm volatile( "cpsid i" );\r
+ __asm volatile( "dsb" );\r
+ __asm volatile( "isb" );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* Let the user override the pre-loading of the initial LR with the address of\r
prvTaskExitError() in case it messes up unwinding of the stack in the\r
debugger. */\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__asm volatile( "cpsid i" );\r
+ __asm volatile( "dsb" );\r
+ __asm volatile( "isb" );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
this is not the case (if some bits represent a sub-priority).\r
\r
The priority grouping is configured by the GIC's binary point register\r
- (ICCBPR). Writting 0 to ICCBPR will ensure it is set to its lowest\r
+ (ICCBPR). Writing 0 to ICCBPR will ensure it is set to its lowest\r
possible value (which may be above 0). */\r
configASSERT( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE );\r
}\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* For backward compatibility, ensure configKERNEL_INTERRUPT_PRIORITY is\r
defined. The value 255 should also ensure backward compatibility.\r
FreeRTOS.org versions prior to V4.3.0 did not include this definition. */\r
pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
pxTopOfStack -= 5; /* R12, R3, R2 and R1. */\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_interrupt();\r
+ __DSB();\r
+ __ISB();\r
+\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
\r
/* Each task maintains its own interrupt status in the critical nesting\r
variable. */\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_interrupt();\r
+ __DSB();\r
+ __ISB();\r
+\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
\r
/* Each task maintains its own interrupt status in the critical nesting\r
variable. */\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_interrupt();\r
+ __DSB();\r
+ __ISB();\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* Each task maintains its own interrupt status in the critical nesting\r
variable. */\r
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;\r
pxTopOfStack--; /* Offset added to account for the way the MCU uses the stack on entry/exit of interrupts. */\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_irq();\r
+ __dsb( portSY_FULL_READ_WRITE );\r
+ __isb( portSY_FULL_READ_WRITE );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
#define portINITIAL_EXEC_RETURN ( 0xfffffffd )\r
\r
/* The systick is a 24-bit counter. */\r
-#define portMAX_24_BIT_NUMBER ( 0xffffffUL )\r
+#define portMAX_24_BIT_NUMBER ( 0xffffffUL )\r
\r
/* A fiddle factor to estimate the number of SysTick counts that would have\r
occurred while the SysTick counter is stopped during tickless idle\r
calculations. */\r
-#define portMISSED_COUNTS_FACTOR ( 45UL )\r
+#define portMISSED_COUNTS_FACTOR ( 45UL )\r
+\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
\r
/* Each task maintains its own interrupt status in the critical nesting\r
variable. */\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_irq();\r
+ __dsb( portSY_FULL_READ_WRITE );\r
+ __isb( portSY_FULL_READ_WRITE );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
calculations. */\r
#define portMISSED_COUNTS_FACTOR ( 45UL )\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* Each task maintains its own interrupt status in the critical nesting\r
variable. */\r
static UBaseType_t uxCriticalNesting = 0xaaaaaaaa;\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) prvTaskExitError; /* LR */\r
\r
/* Read the value back to see how many bits stuck. */\r
ucMaxPriorityValue = *pucFirstUserPriorityRegister;\r
\r
- /* The kernel interrupt priority should be set to the lowest \r
+ /* The kernel interrupt priority should be set to the lowest\r
priority. */\r
configASSERT( ucMaxPriorityValue == ( configKERNEL_INTERRUPT_PRIORITY & ucMaxPriorityValue ) );\r
- \r
+\r
/* Use the same mask on the maximum system call priority. */\r
ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue;\r
\r
/* Enter a critical section but don't use the taskENTER_CRITICAL()\r
method as that will mask interrupts that should exit sleep mode. */\r
__disable_irq();\r
+ __dsb( portSY_FULL_READ_WRITE );\r
+ __isb( portSY_FULL_READ_WRITE );\r
\r
/* If a context switch is pending or a task is waiting for the scheduler\r
to be unsuspended then abandon the low power entry. */\r
#define portTASK_RETURN_ADDRESS prvTaskExitError\r
#endif\r
\r
+/* For strict compliance with the Cortex-M spec the task start address should\r
+have bit-0 clear, as it is loaded into the PC on exit from an ISR. */\r
+#define portSTART_ADDRESS_MASK ( ( StackType_t ) 0xfffffffeUL )\r
+\r
/* The priority used by the kernel is assigned to a variable to make access\r
from inline assembler easier. */\r
const uint32_t ulKernelPriority = configKERNEL_INTERRUPT_PRIORITY;\r
\r
*pxTopOfStack = portINITIAL_XPSR; /* xPSR */\r
pxTopOfStack--;\r
- *pxTopOfStack = ( StackType_t ) pxCode; /* PC */\r
+ *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */\r
pxTopOfStack--;\r
*pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */\r
\r
* Searches pxList for a task with name pcNameToQuery - returning a handle to\r
* the task if it is found, or NULL if the task is not found.\r
*/\r
-#if ( INCLUDE_xTaskGetTaskHandle == 1 )\r
+#if ( INCLUDE_xTaskGetHandle == 1 )\r
\r
static TCB_t *prvSearchForNameWithinSingleList( List_t *pxList, const char pcNameToQuery[] ) PRIVILEGED_FUNCTION;\r
\r
mtCOVERAGE_TEST_MARKER();\r
}\r
\r
+ /* Increment the uxTaskNumber also so kernel aware debuggers can\r
+ detect that the task lists need re-generating. This is done before\r
+ portPRE_TASK_DELETE_HOOK() as in the Windows port that macro will\r
+ not return. */\r
+ uxTaskNumber++;\r
+\r
if( pxTCB == pxCurrentTCB )\r
{\r
/* A task is deleting itself. This cannot complete within the\r
there is a task that has been deleted and that it should therefore\r
check the xTasksWaitingTermination list. */\r
++uxDeletedTasksWaitingCleanUp;\r
+\r
+ /* The pre-delete hook is primarily for the Windows simulator,\r
+ in which Windows specific clean up operations are performed,\r
+ after which it is not possible to yield away from this task -\r
+ hence xYieldPending is used to latch that a context switch is\r
+ required. */\r
+ portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending );\r
}\r
else\r
{\r
--uxCurrentNumberOfTasks;\r
prvDeleteTCB( pxTCB );\r
- }\r
\r
- /* Increment the uxTaskNumber also so kernel aware debuggers can\r
- detect that the task lists need re-generating. */\r
- uxTaskNumber++;\r
+ /* Reset the next expected unblock time in case it referred to\r
+ the task that has just been deleted. */\r
+ prvResetNextTaskUnblockTime();\r
+ }\r
\r
traceTASK_DELETE( pxTCB );\r
}\r
if( pxTCB == pxCurrentTCB )\r
{\r
configASSERT( uxSchedulerSuspended == 0 );\r
-\r
- /* The pre-delete hook is primarily for the Windows simulator,\r
- in which Windows specific clean up operations are performed,\r
- after which it is not possible to yield away from this task -\r
- hence xYieldPending is used to latch that a context switch is\r
- required. */\r
- portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending );\r
portYIELD_WITHIN_API();\r
}\r
else\r
{\r
- /* Reset the next expected unblock time in case it referred to\r
- the task that has just been deleted. */\r
- taskENTER_CRITICAL();\r
- {\r
- prvResetNextTaskUnblockTime();\r
- }\r
- taskEXIT_CRITICAL();\r
+ mtCOVERAGE_TEST_MARKER();\r
}\r
}\r
}\r
}\r
/*-----------------------------------------------------------*/\r
\r
-#if ( INCLUDE_xTaskGetTaskHandle == 1 )\r
+#if ( INCLUDE_xTaskGetHandle == 1 )\r
\r
static TCB_t *prvSearchForNameWithinSingleList( List_t *pxList, const char pcNameToQuery[] )\r
{\r
return pxReturn;\r
}\r
\r
-#endif /* INCLUDE_xTaskGetTaskHandle */\r
+#endif /* INCLUDE_xTaskGetHandle */\r
/*-----------------------------------------------------------*/\r
\r
-#if ( INCLUDE_xTaskGetTaskHandle == 1 )\r
+#if ( INCLUDE_xTaskGetHandle == 1 )\r
\r
- TaskHandle_t xTaskGetTaskHandle( const char *pcNameToQuery ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+ TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
{\r
UBaseType_t uxQueue = configMAX_PRIORITIES;\r
TCB_t* pxTCB;\r
return ( TaskHandle_t ) pxTCB;\r
}\r
\r
-#endif /* INCLUDE_xTaskGetTaskHandle */\r
+#endif /* INCLUDE_xTaskGetHandle */\r
/*-----------------------------------------------------------*/\r
\r
#if ( configUSE_TRACE_FACILITY == 1 )\r
\r
#if( configUSE_TRACE_FACILITY == 1 )\r
\r
- void vTaskGetTaskInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState )\r
+ void vTaskGetInfo( TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState )\r
{\r
TCB_t *pxTCB;\r
\r
do\r
{\r
listGET_OWNER_OF_NEXT_ENTRY( pxNextTCB, pxList );\r
- vTaskGetTaskInfo( ( TaskHandle_t ) pxNextTCB, &( pxTaskStatusArray[ uxTask ] ), pdTRUE, eState );\r
+ vTaskGetInfo( ( TaskHandle_t ) pxNextTCB, &( pxTaskStatusArray[ uxTask ] ), pdTRUE, eState );\r
uxTask++;\r
} while( pxNextTCB != pxFirstTCB );\r
}\r