|
From: <ak...@us...> - 2008-02-25 16:04:05
|
Revision: 861
http://can.svn.sourceforge.net/can/?rev=861&view=rev
Author: akhe
Date: 2008-02-25 08:03:59 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
Fixed IAR 72x CAN sample so both polling and interrupt works even when other frames are present on the bus.
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/main.c
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-25 16:03:59 UTC (rev 861)
@@ -29,18 +29,18 @@
/* Private typedef -------------------------------------------------------------*/
/* Private define --------------------------------------------------------------*/
enum {
- CAN0_TX_MSGOBJ = 0,
- CAN0_RX_MSGOBJ = 1
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
};
enum {
- CAN1_TX_MSGOBJ = 0,
- CAN1_RX_MSGOBJ = 1
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
};
enum {
- CAN2_TX_MSGOBJ = 0,
- CAN2_RX_MSGOBJ = 1
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
};
/* Private macro ---------------------------------------------------------------*/
@@ -654,30 +654,27 @@
*******************************************************************************/
void CAN0_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
+ if ( CAN0->IDR == 0x8000 ) // status interrupt
+ (void)CAN0->SR; // read the status register to clear
+ else if ( ( CAN0->IDR >= 1 ) && ( CAN0->IDR <= 32 ) ) {
+ // Get the message object number that caused the interrupt to occur
+ switch ( msgobj = CAN0->IDR - 1 ) {
+ case CAN0_TX_MSGOBJ:
+ GPIO_BitWrite( GPIO0, GPIO_PIN_7 , Bit_SET );
+ CAN_ReleaseTxMessage(CAN0, msgobj);
+ break;
- if (CAN0->IDR == 0x8000) /* status interrupt */
- (void)CAN0->SR; /* read the status register to clear */
- else if ((CAN0->IDR >= 1) && (CAN0->IDR <= 32))
- {
- /* Get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN0->IDR - 1)
- {
- case CAN0_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_7 , Bit_SET);
- CAN_ReleaseTxMessage(CAN0, msgobj);
- break;
+ case CAN0_RX_MSGOBJ:
+ CAN_ReceiveMessage( CAN0, msgobj, FALSE, &RxCan0Msg );
+ CAN_ReleaseRxMessage( CAN0, msgobj );
+ break;
- case CAN0_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN0, msgobj, FALSE, &RxCan0Msg);
- CAN_ReleaseRxMessage(CAN0, msgobj);
- break;
-
- default:
- CAN_ReleaseMessage(CAN0, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage( CAN0, msgobj );
+ }
+ }
}
/*******************************************************************************
@@ -689,29 +686,27 @@
*******************************************************************************/
void CAN1_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
- if (CAN1->IDR == 0x8000) /*status interrupt*/
- (void)CAN1->SR; /* read the status register to clear*/
- else if ((CAN1->IDR >= 1) && (CAN1->IDR <= 32))
- {
- /* get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN1->IDR - 1)
- {
- case CAN1_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_9 , Bit_SET);
- CAN_ReleaseTxMessage(CAN1, msgobj);
- break;
+ if (CAN1->IDR == 0x8000) /*status interrupt*/
+ (void)CAN1->SR; /* read the status register to clear*/
+ else if ( ( CAN1->IDR >= 1 ) && ( CAN1->IDR <= 32 ) ) {
+ /* get the message object number that caused the interrupt to occur*/
+ switch ( msgobj = CAN1->IDR - 1 ) {
+ case CAN1_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_9 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN1, msgobj);
+ break;
- case CAN1_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN1, msgobj, FALSE, &RxCan1Msg);
- CAN_ReleaseRxMessage(CAN1, msgobj);
- break;
+ case CAN1_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN1, msgobj, FALSE, &RxCan1Msg);
+ CAN_ReleaseRxMessage(CAN1, msgobj);
+ break;
- default:
- CAN_ReleaseMessage(CAN1, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage(CAN1, msgobj);
+ }
+ }
}
@@ -724,30 +719,27 @@
*******************************************************************************/
void CAN2_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
+
+ if (CAN2->IDR == 0x8000) /* status interrupt*/
+ (void)CAN2->SR; /* read the status register to clear*/
+ else if ( CAN2->IDR >= 1 && CAN2->IDR <= 32 ) {
+ /* get the message object number that caused the interrupt to occur*/
+ switch ( msgobj = CAN2->IDR - 1 ) {
+ case CAN2_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_11 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN2, msgobj);
+ break;
+ case CAN2_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN2, msgobj, FALSE, &RxCan2Msg);
+ CAN_ReleaseRxMessage(CAN2, msgobj);
+ break;
- if (CAN2->IDR == 0x8000) /* status interrupt*/
- (void)CAN2->SR; /* read the status register to clear*/
- else if (CAN2->IDR >= 1 && CAN2->IDR <= 32)
- {
- /* get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN2->IDR - 1)
- {
- case CAN2_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_11 , Bit_SET);
- CAN_ReleaseTxMessage(CAN2, msgobj);
- break;
-
- case CAN2_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN2, msgobj, FALSE, &RxCan2Msg);
- CAN_ReleaseRxMessage(CAN2, msgobj);
- break;
-
- default:
- CAN_ReleaseMessage(CAN2, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage(CAN2, msgobj);
+ }
+ }
}
/*******************************************************************************
Modified: trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-25 16:03:59 UTC (rev 861)
@@ -6,397 +6,397 @@
<configuration>
<name>Debug</name>
<outputs>
- <file>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_gpio.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_rtc.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.o</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_can.pbi</file>
- <file>$PROJ_DIR$\Startup\73x_init.s</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_adc.c</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_lib.c</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_prccu.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cfg.pbi</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_can.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_adc.h</file>
<file>$PROJ_DIR$\Debug\Obj\73x_can.o</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_lib.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_it.o</file>
- <file>$PROJ_DIR$\main.c</file>
- <file>$PROJ_DIR$\73x_lcd.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_eic.h</file>
- <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
- <file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
- <file>$PROJ_DIR$\73x_it.c</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_vect.o</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_rtc.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\ycheck.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
<file>$PROJ_DIR$\Debug\Obj\73x_lcd.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$TOOLKIT_DIR$\inc\ycheck.h</file>
- <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
<file>$TOOLKIT_DIR$\lib\shs_l.a</file>
<file>$PROJ_DIR$\Debug\Obj\73x_adc.pbi</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_eic.c</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_map.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_prccu.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_adc.o</file>
<file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
<file>$TOOLKIT_DIR$\inc\DLib_Product.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
- <file>$PROJ_DIR$\Startup\73x_vect.s</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cmu.o</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_gpio.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cfg.o</file>
- <file>$PROJ_DIR$\linker\STR73x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_it.pbi</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_cfg.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_it.o</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_adc.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_gpio.o</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_lib.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_eic.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_lib.o</file>
+ <file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
+ <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_adc.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_can.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\yvals.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_init.o</file>
<file>$TOOLKIT_DIR$\inc\string.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_init.o</file>
- <file>$TOOLKIT_DIR$\inc\yvals.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lib.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_map.h</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_prccu.h</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_can.c</file>
<file>$PROJ_DIR$\Debug\Obj\73x_lcd.o</file>
<file>$TOOLKIT_DIR$\inc\ysizet.h</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_rtc.h</file>
<file>$TOOLKIT_DIR$\inc\DLib_Threads.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_prccu.pbi</file>
+ <file>$PROJ_DIR$\linker\STR73x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cmu.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cfg.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_gpio.pbi</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_gpio.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_vect.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_eic.h</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_lib.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</file>
<file>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_prccu.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_gpio.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_cfg.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_adc.o</file>
+ <file>$PROJ_DIR$\Startup\73x_init.s</file>
+ <file>$PROJ_DIR$\73x_it.c</file>
+ <file>$PROJ_DIR$\Startup\73x_vect.s</file>
+ <file>$PROJ_DIR$\73x_conf.h</file>
<file>$PROJ_DIR$\73x_lcd.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_it.pbi</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lib.pbi</file>
- <file>$PROJ_DIR$\73x_conf.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.pbi</file>
+ <file>$PROJ_DIR$\73x_lcd.h</file>
+ <file>$PROJ_DIR$\main.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_prccu.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cfg.pbi</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_can.h</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_eic.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_can.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</file>
</outputs>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</name>
+ <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
+ <inputs>
+ <tool>
+ <name>BILINK</name>
+ <file> 7 32 63 30 22 44 14 4 21 40 26 5</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
+ <inputs>
+ <tool>
+ <name>ILINK</name>
+ <file> 41 11 0 43 42 50 19 34 17 36 23 62 27 49 28 6 25 12</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_adc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 14</file>
+ <file> 7</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 45</file>
+ <file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 61 51 67 13</file>
+ <file> 29 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 61 51 67 13</file>
+ <file> 29 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 59</file>
+ <file> 63</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 12</file>
+ <file> 43</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 52 51 67 13 11</file>
+ <file> 16 9 58 46</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 52 51 67 13 11</file>
+ <file> 16 9 58 46</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Startup\73x_init.s</name>
+ <name>[ROOT_NODE]</name>
<outputs>
<tool>
- <name>AARM</name>
- <file> 48</file>
+ <name>ILINK</name>
+ <file> 15</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_adc.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_lib.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 37</file>
+ <file> 21</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 62</file>
+ <file> 23</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 17 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 17 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_lib.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 66</file>
+ <file> 40</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 50</file>
+ <file> 62</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 10 9 58 46 45</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 10 9 58 46 45</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\main.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 33</file>
+ <file> 26</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 5</file>
+ <file> 27</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 38 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 38 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
+ <name>$PROJ_DIR$\Startup\73x_init.s</name>
+ <outputs>
+ <tool>
+ <name>AARM</name>
+ <file> 34</file>
+ </tool>
+ </outputs>
+ </file>
+ <file>
<name>$PROJ_DIR$\73x_it.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 64</file>
+ <file> 14</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 20</file>
+ <file> 17</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</name>
+ <name>$PROJ_DIR$\Startup\73x_vect.s</name>
<outputs>
<tool>
+ <name>AARM</name>
+ <file> 49</file>
+ </tool>
+ </outputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\73x_lcd.c</name>
+ <outputs>
+ <tool>
<name>BICOMP</name>
- <file> 6</file>
+ <file> 4</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 43</file>
+ <file> 36</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 11 51 67 13</file>
+ <file> 60 1 9 58 46 10 16 64 48 45 51 35 2 33 31 13 24 39 37 47</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 11 51 67 13</file>
+ <file> 60 1 9 58 46 10 16 64 48 45 51 35 2 33 31 8 13 24 39 37 47</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</name>
+ <name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 44</file>
+ <file> 5</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 60</file>
+ <file> 28</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 1 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 1 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
- <inputs>
- <tool>
- <name>BILINK</name>
- <file> 37 7 14 6 68 44 64 32 66 59 31 33</file>
- </tool>
- </inputs>
- </file>
- <file>
<name>$PROJ_DIR$\str73x_lib\source\73x_eic.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 68</file>
+ <file> 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 23</file>
+ <file> 50</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 24 51 67 13 61</file>
+ <file> 51 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 24 51 67 13 61</file>
+ <file> 51 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Startup\73x_vect.s</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</name>
<outputs>
<tool>
- <name>AARM</name>
- <file> 29</file>
- </tool>
- </outputs>
- </file>
- <file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_can.c</name>
- <outputs>
- <tool>
<name>BICOMP</name>
- <file> 7</file>
+ <file> 44</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 18</file>
+ <file> 19</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 15 51 67 13 61</file>
+ <file> 48 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 15 51 67 13 61</file>
+ <file> 48 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>[ROOT_NODE]</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_can.c</name>
<outputs>
<tool>
- <name>ILINK</name>
- <file> 65</file>
- </tool>
- </outputs>
- </file>
- <file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</name>
- <outputs>
- <tool>
<name>BICOMP</name>
- <file> 31</file>
+ <file> 32</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 4</file>
+ <file> 0</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 56 51 67 13 61</file>
+ <file> 64 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 56 51 67 13 61</file>
+ <file> 64 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\73x_lcd.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 32</file>
+ <file> 30</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 54</file>
+ <file> 42</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 22 19 51 67 13 52 61 15 1 11 24 47 34 49 16 40 26 57 55 2</file>
+ <file> 45 9 58 46</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 22 19 51 67 13 52 61 15 1 11 24 47 34 49 16 41 40 26 57 55 2</file>
+ <file> 45 9 58 46</file>
</tool>
</inputs>
</file>
- <file>
- <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
- <inputs>
- <tool>
- <name>ILINK</name>
- <file> 46 62 18 45 43 23 60 48 20 54 50 12 4 29 5 36 25 39</file>
- </tool>
- </inputs>
- </file>
</configuration>
<configuration>
<name>Release</name>
Modified: trunk/firmware/arm/str/cantest_str73x_iar/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/main.c 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/main.c 2008-02-25 16:03:59 UTC (rev 861)
@@ -100,8 +100,8 @@
void wait(void)
{
- u32 i;
- for (i=100000L; i!=0 ; i-- ) {}
+ u32 i;
+ for ( i=100000L; i!=0 ; i-- ) {}
}
////////////////////////////////////////////////////////////////////////////////
@@ -150,6 +150,7 @@
CAN_Init( CAN0, &CANInit );
// configure the message objects
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
CAN_InvalidateAllMsgObj( CAN0 );
CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
CAN_SetRxMsgObj( CAN0,
@@ -158,7 +159,8 @@
0,
CAN_LAST_STD_ID,
TRUE );
-
+ CAN_LeaveInitMode( CAN0 );
+
// send a pre-defined data frame
CAN_SendMessage(CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
@@ -207,15 +209,16 @@
CAN0Init.CAN_Bitrate = CAN_BITRATE_500K;
// initialize the interrupt controller
- EIC_IRQChannelConfig(CAN0_IRQChannel, ENABLE);
- EIC_IRQChannelPriorityConfig(CAN0_IRQChannel, 1);
- EIC_IRQCmd(ENABLE);
+ EIC_IRQChannelConfig( CAN0_IRQChannel, ENABLE );
+ EIC_IRQChannelPriorityConfig( CAN0_IRQChannel, 1 );
+ EIC_IRQCmd( ENABLE );
// initialize the CAN at a standard bitrate, interrupts enabled
- CAN_Init(CAN0, &CAN0Init);
+ CAN_Init( CAN0, &CAN0Init );
// configure the message objects
- CAN_InvalidateAllMsgObj(CAN0);
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
+ CAN_InvalidateAllMsgObj( CAN0 );
CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
CAN_SetRxMsgObj( CAN0,
CAN0_RX_MSGOBJ,
@@ -223,7 +226,8 @@
0,
CAN_LAST_EXT_ID,
TRUE );
-
+ CAN_LeaveInitMode( CAN0 );
+
// send a pre-defined data frame
CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[1] );
@@ -232,9 +236,6 @@
GPIO_BitWrite( GPIO0, LD7, Bit_SET ); // LED7
- // switch back into Normal mode
- CAN_LeaveTestMode( CAN0 );
-
// disable interrupts globally
EIC_IRQCmd( DISABLE );
}
@@ -292,7 +293,7 @@
while ( 1 ) {
CAN0_Demo_Polling();
- //CAN0_Demo_Interrupt();
+ CAN0_Demo_Interrupt();
}
}//main
Modified: trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni 2008-02-25 16:03:59 UTC (rev 861)
@@ -2,8 +2,8 @@
Enabled=_ 0
[JLinkDriver]
WatchCond=_ 0
-Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
-Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
+Watch0=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
+Watch1=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
[DisAssemblyWindow]
NumStates=_ 1
State 1=_ 1
@@ -28,6 +28,10 @@
TypeViolation=1
UnspecRange=1
ActionState=1
+[Disassemble mode]
+mode=0
+[Breakpoints]
+Count=0
[Log file]
LoggingEnabled=_ 0
LogFile=_ ""
@@ -35,10 +39,6 @@
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
-[Disassemble mode]
-mode=0
-[Breakpoints]
-Count=0
[TraceHelper]
Enabled=0
ShowSource=1
Modified: trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt 2008-02-25 16:03:59 UTC (rev 861)
@@ -25,7 +25,7 @@
<Windows>
- <Wnd1>
+ <Wnd0>
<Tabs>
<Tab>
<Identity>TabID-32711-27921</Identity>
@@ -37,7 +37,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd1><Wnd3>
+ <SelectedTab>0</SelectedTab></Wnd0><Wnd2>
<Tabs>
<Tab>
<Identity>TabID-18303-27987</Identity>
@@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-7248-23799</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
- <SelectedTab>0</SelectedTab></Wnd3></Windows>
+ <SelectedTab>0</SelectedTab></Wnd2></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>235</YPos><SelStart>7293</SelStart><SelEnd>7293</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_rtc.c</Filename><XPos>0</XPos><YPos>35</YPos><SelStart>3569</SelStart><SelEnd>3569</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_can.c</Filename><XPos>0</XPos><YPos>455</YPos><SelStart>22501</SelStart><SelEnd>22501</SelEnd></Tab><ActiveTab>2</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>315</YPos><SelStart>13061</SelStart><SelEnd>13061</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
+ <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>208</YPos><SelStart>7003</SelStart><SelEnd>7003</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_rtc.c</Filename><XPos>0</XPos><YPos>35</YPos><SelStart>3569</SelStart><SelEnd>3569</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_can.c</Filename><XPos>0</XPos><YPos>42</YPos><SelStart>3302</SelStart><SelEnd>3312</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>315</YPos><SelStart>13197</SelStart><SelEnd>13197</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\73x_it.c</Filename><XPos>0</XPos><YPos>653</YPos><SelStart>23341</SelStart><SelEnd>23341</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353a88><key>iaridepm.enu1</key></Toolbar-01353a88></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|