diff --git a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_GCC/Prog/boot.c b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_GCC/Prog/boot.c index f0d1a631..6ec50a6a 100644 --- a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_GCC/Prog/boot.c +++ b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_GCC/Prog/boot.c @@ -266,6 +266,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_IAR/Prog/boot.c b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_IAR/Prog/boot.c index d2c537e5..12b6d363 100644 --- a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_IAR/Prog/boot.c +++ b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_IAR/Prog/boot.c @@ -266,6 +266,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_Keil/Prog/boot.c b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_Keil/Prog/boot.c index 26b3005c..d251427d 100644 --- a/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_Keil/Prog/boot.c +++ b/Target/Demo/ARMCM0_XMC1_XMC1400_Boot_Kit_Keil/Prog/boot.c @@ -266,6 +266,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_GCC/Prog/boot.c b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_GCC/Prog/boot.c index 77cd4dab..dcc60ecb 100644 --- a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_GCC/Prog/boot.c +++ b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_GCC/Prog/boot.c @@ -270,6 +270,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_IAR/Prog/boot.c b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_IAR/Prog/boot.c index ff1c8ce2..7e4333fe 100644 --- a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_IAR/Prog/boot.c +++ b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_IAR/Prog/boot.c @@ -270,6 +270,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_Keil/Prog/boot.c b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_Keil/Prog/boot.c index 1128889a..1f4dca3d 100644 --- a/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_Keil/Prog/boot.c +++ b/Target/Demo/ARMCM4_XMC4_XMC4700_Relax_Kit_Keil/Prog/boot.c @@ -270,6 +270,12 @@ static void BootComCanInit(void) XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud; unsigned long receiveId; + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); + /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to * 16 message objects. This is sufficient for this CAN driver. diff --git a/Target/Source/ARMCM0_XMC1/can.c b/Target/Source/ARMCM0_XMC1/can.c index 11b141a4..8b5711a9 100644 --- a/Target/Source/ARMCM0_XMC1/can.c +++ b/Target/Source/ARMCM0_XMC1/can.c @@ -101,6 +101,11 @@ void CanInit(void) * in case a different CAN channel is configured. */ ASSERT_CT((BOOT_COM_CAN_CHANNEL_INDEX >= 0) && (BOOT_COM_CAN_CHANNEL_INDEX <= 1)); + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to diff --git a/Target/Source/ARMCM4_XMC4/can.c b/Target/Source/ARMCM4_XMC4/can.c index bc67c439..7d97921a 100644 --- a/Target/Source/ARMCM4_XMC4/can.c +++ b/Target/Source/ARMCM4_XMC4/can.c @@ -111,6 +111,12 @@ void CanInit(void) #else ASSERT_CT((BOOT_COM_CAN_CHANNEL_INDEX >= 0) && (BOOT_COM_CAN_CHANNEL_INDEX <= 2)); #endif + + /* set the CAN peripheral into the disabled state. the call to XMC_CAN_Init + * below enables it again, which consequently brings the peripheral back into + * its reset state. + */ + XMC_CAN_Disable(CAN); /* decide on fCAN frequency. it should be in the 5-120MHz range. according to the * datasheet, it must be at least 12MHz if 1 node (channel) is used with up to