XMC™ Forum Discussions
Sort by:
XMC™
Recently I was using XMC4500 and i have a problem in using can module.According to the loopback example code provided by Infineon,i develop my program...
Show More
Recently I was using XMC4500 and i have a problem in using can module.According to the loopback example code provided by Infineon,i develop my program. I need use P1.12 and P1.13 pins as CAN pins,these pins belong to the node1. Following code is used to initialise two pins.
#define CAN_RX_PIN P1_13
#define CAN_TX_PIN P1_12
XMC_GPIO_CONFIG_t can_tx =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2,
.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM
};
XMC_GPIO_CONFIG_t can_rx =
{
.mode = XMC_GPIO_MODE_INPUT_TRISTATE
};
XMC_GPIO_Init(CAN_TX_PIN,&can_tx);
XMC_GPIO_Init(CAN_RX_PIN,&can_rx);
Following code is used to initialise CAN module
#define CAN_FREQUENCY 120000000
/*CAN message= CAN_MO4 */
XMC_CAN_MO_t CAN_message_4 =
{
.can_mo_ptr = CAN_MO4,
.can_priority = XMC_CAN_ARBITRATION_MODE_IDE_DIR_BASED_PRIO_2,
.can_identifier = 0xFF,
.can_id_mask= 0xFF,
.can_id_mode = XMC_CAN_FRAME_TYPE_EXTENDED_29BITS,
.can_ide_mask = 1,
.can_data_length = 8,
.can_data = {0x01234567, 0x89ABCDEF},
.can_mo_type = XMC_CAN_MO_TYPE_TRANSMSGOBJ
};
void CAN_INIT(void)
{
/*CAN Bit time*/
XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud =
{
.can_frequency = CAN_FREQUENCY,
.baudrate = 100000,
.sample_point = 8000,
.sjw = 1,
};
/*Configure CAN Module*/
XMC_CAN_Init(CAN,CAN_FREQUENCY);
/*Configure CAN Node baudrate*/
XMC_CAN_NODE_NominalBitTimeConfigure(CAN_NODE1,&baud);
/*NODE 1 initialization*/
XMC_CAN_NODE_EnableConfigurationChange(CAN_NODE1);
/*XMC_CAN_NODE_EnableLoopBack(CAN_NODE1);*/
XMC_CAN_NODE_SetReceiveInput(CAN_NODE1,XMC_CAN_NODE_RECEIVE_INPUT_RXDCC);
XMC_CAN_NODE_DisableConfigurationChange(CAN_NODE1);
XMC_CAN_NODE_ResetInitBit(CAN_NODE1);
XMC_CAN_MO_EnableEvent(&CAN_message_4,XMC_CAN_MO_EVENT_TRANSMIT);
XMC_CAN_MO_SetEventNodePointer(&CAN_message_4, XMC_CAN_MO_POINTER_EVENT_TRANSMIT, 7);
XMC_CAN_AllocateMOtoNodeList(CAN, 1, 4);
/*Enable nvic node*/
NVIC_EnableIRQ(CAN0_7_IRQn);
XMC_CAN_MO_Config(&CAN_message_4);
XMC_CAN_MO_Transmit(&CAN_message_4);
}
According to the code,i transmit a message.But on the oscilloscope, I did not see any waveform on pin1.12.
Can you help me?
If you have some can code,please send these code to 594373280@qq.com.
Thanks Show Less
#define CAN_RX_PIN P1_13
#define CAN_TX_PIN P1_12
XMC_GPIO_CONFIG_t can_tx =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2,
.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM
};
XMC_GPIO_CONFIG_t can_rx =
{
.mode = XMC_GPIO_MODE_INPUT_TRISTATE
};
XMC_GPIO_Init(CAN_TX_PIN,&can_tx);
XMC_GPIO_Init(CAN_RX_PIN,&can_rx);
Following code is used to initialise CAN module
#define CAN_FREQUENCY 120000000
/*CAN message= CAN_MO4 */
XMC_CAN_MO_t CAN_message_4 =
{
.can_mo_ptr = CAN_MO4,
.can_priority = XMC_CAN_ARBITRATION_MODE_IDE_DIR_BASED_PRIO_2,
.can_identifier = 0xFF,
.can_id_mask= 0xFF,
.can_id_mode = XMC_CAN_FRAME_TYPE_EXTENDED_29BITS,
.can_ide_mask = 1,
.can_data_length = 8,
.can_data = {0x01234567, 0x89ABCDEF},
.can_mo_type = XMC_CAN_MO_TYPE_TRANSMSGOBJ
};
void CAN_INIT(void)
{
/*CAN Bit time*/
XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t baud =
{
.can_frequency = CAN_FREQUENCY,
.baudrate = 100000,
.sample_point = 8000,
.sjw = 1,
};
/*Configure CAN Module*/
XMC_CAN_Init(CAN,CAN_FREQUENCY);
/*Configure CAN Node baudrate*/
XMC_CAN_NODE_NominalBitTimeConfigure(CAN_NODE1,&baud);
/*NODE 1 initialization*/
XMC_CAN_NODE_EnableConfigurationChange(CAN_NODE1);
/*XMC_CAN_NODE_EnableLoopBack(CAN_NODE1);*/
XMC_CAN_NODE_SetReceiveInput(CAN_NODE1,XMC_CAN_NODE_RECEIVE_INPUT_RXDCC);
XMC_CAN_NODE_DisableConfigurationChange(CAN_NODE1);
XMC_CAN_NODE_ResetInitBit(CAN_NODE1);
XMC_CAN_MO_EnableEvent(&CAN_message_4,XMC_CAN_MO_EVENT_TRANSMIT);
XMC_CAN_MO_SetEventNodePointer(&CAN_message_4, XMC_CAN_MO_POINTER_EVENT_TRANSMIT, 7);
XMC_CAN_AllocateMOtoNodeList(CAN, 1, 4);
/*Enable nvic node*/
NVIC_EnableIRQ(CAN0_7_IRQn);
XMC_CAN_MO_Config(&CAN_message_4);
XMC_CAN_MO_Transmit(&CAN_message_4);
}
According to the code,i transmit a message.But on the oscilloscope, I did not see any waveform on pin1.12.
Can you help me?
If you have some can code,please send these code to 594373280@qq.com.
Thanks Show Less
XMC™
Hi,I'm looking at using the XMC4800 for a new design. Will an evaluation board and/or a reference design be made available at some point soon?Thanks i...
Show More
Hi,
I'm looking at using the XMC4800 for a new design. Will an evaluation board and/or a reference design be made available at some point soon?
Thanks in advance! Show Less
I'm looking at using the XMC4800 for a new design. Will an evaluation board and/or a reference design be made available at some point soon?
Thanks in advance! Show Less
XMC™
Hi All,I am a new user of XMC microcontrollers and I can not find the "XMC_2Go_Initial_Start" which is mentioned in the "Write your first program guid...
Show More
Hi All,
I am a new user of XMC microcontrollers and I can not find the "XMC_2Go_Initial_Start" which is mentioned in the "Write your first program guide".
Can someone please point me to it?
Regards Show Less
I am a new user of XMC microcontrollers and I can not find the "XMC_2Go_Initial_Start" which is mentioned in the "Write your first program guide".
Can someone please point me to it?
Regards Show Less
XMC™
Hi,I have a very simple question but could not find out the answer. I have XMC 4500 relax kit and i want to know on which logic voltage level it opera...
Show More
Hi,
I have a very simple question but could not find out the answer. I have XMC 4500 relax kit and i want to know on which logic voltage level it operates 5V or 3.3V. for example does it consider 5V as logic 1 or 3.3V as logic 1.
BR,
Fahad Show Less
I have a very simple question but could not find out the answer. I have XMC 4500 relax kit and i want to know on which logic voltage level it operates 5V or 3.3V. for example does it consider 5V as logic 1 or 3.3V as logic 1.
BR,
Fahad Show Less
XMC™
Hi, I need urgently of a example for the POSIF module in Quadrature decoder mode. I would like to measure the angular position, measure revolution usi...
Show More
Hi,
I need urgently of a example for the POSIF module in Quadrature decoder mode. I would like to measure the angular position, measure revolution using the Workaround for the POSIF_AI.001 (index errata) and measure the velocity by capturing the time between encoder pulses transactions.
Thanks.
Ari. Show Less
I need urgently of a example for the POSIF module in Quadrature decoder mode. I would like to measure the angular position, measure revolution using the Workaround for the POSIF_AI.001 (index errata) and measure the velocity by capturing the time between encoder pulses transactions.
Thanks.
Ari. Show Less
XMC™
Hi all,Where can one find "XMC_2Go_Initial_Start" DAVE project? I can not find it anywhere, the tutorial (http://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5...
Show More
Hi all,
Where can one find "XMC_2Go_Initial_Start" DAVE project? I can not find it anywhere, the tutorial (http://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5) also does not point in the correct direction.
Regards Show Less
Where can one find "XMC_2Go_Initial_Start" DAVE project? I can not find it anywhere, the tutorial (http://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5) also does not point in the correct direction.
Regards Show Less
XMC™
Hi All,I am new to using XMC microcontrollers and have bought a few samples. Currently I am following the following documentaitonhttp://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5...
Show More
Hi All,
I am new to using XMC microcontrollers and have bought a few samples. Currently I am following the following documentaiton
http://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5
and I am required to download the "XMC_2Go_Initial_Start" project. The link provided does not take me to the download, nor have I found it anywhere at this stage.
Can someone please provide me with a link from which I can download it please?
Regards Show Less
I am new to using XMC microcontrollers and have bought a few samples. Currently I am following the following documentaiton
http://www.infineon.com/dgdl?fileId=db3a3043444ee5dc014453df5ce178d5
and I am required to download the "XMC_2Go_Initial_Start" project. The link provided does not take me to the download, nor have I found it anywhere at this stage.
Can someone please provide me with a link from which I can download it please?
Regards Show Less
XMC™
Can someone tell me where I can find XMC4500 Dave examples that work with Version 4.1 can be found.All the examples I have found so far are for old ve...
Show More
Can someone tell me where I can find XMC4500 Dave examples that work with Version 4.1 can be found.
All the examples I have found so far are for old versions of Dave which cannot be loaded into version 4.1.
I am looking for examples of using the SD Card on the Relax board and the USB On-the-go. Show Less
All the examples I have found so far are for old versions of Dave which cannot be loaded into version 4.1.
I am looking for examples of using the SD Card on the Relax board and the USB On-the-go. Show Less
XMC™
Hello everyone. I am using this sensor http://www.st.com/web/en/resource/technical/document/datasheet/DM00103319.pdf and I want to receive from this ...
Show More
Hello everyone. I am using this sensor http://www.st.com/web/en/resource/technical/document/datasheet/DM00103319.pdf and I want to receive from this sensor contents of the specific register of this sensor which is located under the sepcific address in memory. Do you have any idea, how to do it. Of course I know, how I2C interface works, first of all I send start condition after that address of the slave after that data which I would like to send, but how to read the contents of the rgister of the slave. Every help is strongly appreciated !!! Thanks in advance !!!
Show Less
XMC™

The limit checking mechanism can automatically compare each digital conversion result to an upper and a lower boundary value. A channel event can then be generated when the result of a conversion/comparison is inside or outside a user-defined band.
The limit checking mechanism can automatically compare each digital conversion result to an upper and a lower boundary value. A channel event can then...
Show More
The limit checking mechanism can automatically compare each digital conversion result to an upper and a lower boundary value. A channel event can then be generated when the result of a conversion/comparison is inside or outside a user-defined band.
- Place some boundaries to create 3 bands in the analog range in order to control the result limits.
- The limit checker permits the control of an analog signal so that when the signal increases or decreases above or below some configurable value, an event can be trigger and an action can be executed.
- As an example, a limit checker can detect an overvoltage and generate a stop signal to a timer to avoid damage on the hardware