XMC™ Forum Discussions
Sort by:
XMC™
XMC1000 does not provided input for external crystal or oscillator but it is possible to implement a closed-loop control with external reference frequ...
Show More
XMC1000 does not provided input for external crystal or oscillator but it is possible to implement a closed-loop control with external reference frequency.
We can use CCU4 to capture the period of reference frequency and adjust the Fractional Divider of the MCLK in register CLKCR.FDIV.
For example, if the reference frequency is 32KHz and CCU4 resolution is configured to 32nsec, capturing the period of the reference frequency will give a value of 1000.
If the captured value is less than 1000, this means the MCLK is slower than it should and we should decrease the fractional divider.
If the captured value is more than 1000, this means the MCLK is faster than it should and we should increase the fractional divider.
Attached is the basic example on the closed loop control via external reference frequency.
One CCU4 slice is used to captured the external frequency (32KHz) and another slice is used to generate a 32KHz PWM.
By varying the reference frequency, the generated PWM output frequency will follow the reference frequency.
This example is tested on XMC1200 and XMC1300 boot kit.
The input pin for the reference frequency is P0.3 and the generated PWM output pin is P0.4.
Show Less
We can use CCU4 to capture the period of reference frequency and adjust the Fractional Divider of the MCLK in register CLKCR.FDIV.
For example, if the reference frequency is 32KHz and CCU4 resolution is configured to 32nsec, capturing the period of the reference frequency will give a value of 1000.
If the captured value is less than 1000, this means the MCLK is slower than it should and we should decrease the fractional divider.
If the captured value is more than 1000, this means the MCLK is faster than it should and we should increase the fractional divider.
Attached is the basic example on the closed loop control via external reference frequency.
One CCU4 slice is used to captured the external frequency (32KHz) and another slice is used to generate a 32KHz PWM.
By varying the reference frequency, the generated PWM output frequency will follow the reference frequency.
This example is tested on XMC1200 and XMC1300 boot kit.
The input pin for the reference frequency is P0.3 and the generated PWM output pin is P0.4.
Show Less
XMC™
Can anyone help me with the following problem?What APP to use & how to set in order for Push button to be external trigger for the following 2 APP ADC...
Show More
Can anyone help me with the following problem?
What APP to use & how to set in order for Push button to be external trigger for the following 2 APP ADC001 & DACWG001?
Simplest that I want is the when push the button, ADC001 & DACWG001 run & when I release the button, these 2 APP stop. Show Less
What APP to use & how to set in order for Push button to be external trigger for the following 2 APP ADC001 & DACWG001?
Simplest that I want is the when push the button, ADC001 & DACWG001 run & when I release the button, these 2 APP stop. Show Less
XMC™
Hello everybody,I am trying to use the ITM_SendChar function to send debug strings to the J/Link SWO Viewer (included with Dave installation) but I ju...
Show More
Hello everybody,
I am trying to use the ITM_SendChar function to send debug strings to the J/Link SWO Viewer (included with Dave installation) but I just cant get it to work.
Debugging the ITM_SendChar function I see ITM_TCR and ITM_TER are both 0, so it doesn't even write to the ITM Stimulus register. I tried initializin them but they remain 0. I also tried adjusting TPIU_ACR to 20 (120000 KHz / 6000 KHz).
Another thing that makes me doubt is the SWO Viewer config, when I choose the XMC4500/1024 and measure the CPU speed it is giving me near 24 Mhz instead of 120 MHz. I tried to put 120000KHz manually but still it doesnt work.
Any idea?
Thank you Show Less
I am trying to use the ITM_SendChar function to send debug strings to the J/Link SWO Viewer (included with Dave installation) but I just cant get it to work.
Debugging the ITM_SendChar function I see ITM_TCR and ITM_TER are both 0, so it doesn't even write to the ITM Stimulus register. I tried initializin them but they remain 0. I also tried adjusting TPIU_ACR to 20 (120000 KHz / 6000 KHz).
Another thing that makes me doubt is the SWO Viewer config, when I choose the XMC4500/1024 and measure the CPU speed it is giving me near 24 Mhz instead of 120 MHz. I tried to put 120000KHz manually but still it doesnt work.
Any idea?
Thank you Show Less
XMC™

I can use xSPY and ACIM App to control RPM, START, STOP. It's work perfectly.
But when I use xSPY and PMSM (FOC) App, It doesn't work.
I try to run only PMSM App without xSPY (DBG002). It's work properly.
I suspect that FOC may need so much resource?
When xSPY getting value from memory, then MCU lagging to control the Motor?
These are values that I use control via xSPY.
I can use xSPY and ACIM App to control RPM, START, STOP. It's work perfectly.But when I use xSPY and PMSM (FOC) App, It doesn't work. I try to run onl...
Show More
I can use xSPY and ACIM App to control RPM, START, STOP. It's work perfectly.
But when I use xSPY and PMSM (FOC) App, It doesn't work.
I try to run only PMSM App without xSPY (DBG002). It's work properly.
I suspect that FOC may need so much resource?
When xSPY getting value from memory, then MCU lagging to control the Motor?
These are values that I use control via xSPY.
Show Less
DBG002_VariableDescriptionType xSpyTable1[NUMBER_VARIABLES_XSPY1] = {
XSPY_ADD_SCALED_UINT32("Motor Status", PMSMFOCSL01_Handle0.H_Ptr->MotorStatus, 1.0),
XSPY_ADD_SCALED_INT16("Speed reference", PMSMFOCSL01_Handle0.H_Ptr->EndSpeedRef, 0.458),
XSPY_ADD_SCALED_UINT8("Motor Command", motor_command, 1.0),
XSPY_ADD_SCALED_INT16("Motor Dir", MotorDir, 1.0),
XSPY_ADD_SCALED_INT16("Actual speed", PMSMFOCSL01_Handle0.H_Ptr->SpeedRef, 0.458),
};
XMC™
Hi everyone,my name is Christian and I'm a student of Electrical Engineering in Germany. After having realized several μC projects including TI'sMSP43...
Show More
Hi everyone,
my name is Christian and I'm a student of Electrical Engineering in Germany. After having realized several μC projects including TI'sMSP430, I would like to work with Infineon Controllers in my next project. Different measured values should be visualized on a display. Unfortunately, the communication via the SPI-interface doesn't work correctly yet. The display used is a DOGL from the company “Electronic Assembly”. The controller is an Infineon Relax Kit-Board combined with an XMC4500-F100F1024 controller. I am using a Dave 3 Toolchain for the software development. The communication between the display and the controller works via SPI (Half Duplex).
I have two (comprehension) problems:
1. To make it possible for the display to distinguish Command and Data, the Pin A0 has to be switched to "LOW" for Command and to "HIGH" for Data. Thus, first A0 should be switched to “HIGH” to send the data and then the data should be sent via SPI (figure 1). In my opinion, it should look
like that. Of course, I have to wait for the Transmit Buffer to be empty and then A0 has to be switched to “LOW” again. Unfortunately, I can't find the corresponding register which is only deleted when the transmit has beenfinished. I've looked through the data sheets and the user's guide but
couldn't find anything. Maybe you can give an example.
2. As you can see in the source code, 16 hex values should be transferred one after the other. This shouldbe repeated in the while-forever-loop. My expectation is that the values are sent viathe SPI-periphery successively and in the order given by the array. Unfortunately, only a small amount of data is sent and this doesn't happen in the right order (figure 2). I think I made a mistake with the dave-settings of the SPI-interface.
I hope you are able to help me.
Regards,
Christian
/*
* Main.c
*
* Created on: 29.05.2013
* Author: Christian
*/
#include //Declarations from DAVE3 Code Generation (includes SFR declaration)
int main(void)
{
// status_t status; // Declaration of return variable for DAVE3 APIs (toggle comment if required)
// Init DOGL
const char init[] = {0x40, //Display start line 0
0xA1, //ADC reverse
0xC0, //Normal COM0...COM63
0xA6, //Display normal
0xA2, //Set Bias 1/9 (Duty 1/65)
0x2F, //Booster, Regulator and Follower On
0xF8, //Set internal Booster to 4x
0x00,
0x27, //Contrast set
0x81,
0x10,
0xAC, //No indicator
0x00,
0xAF, //Display on
0xb0, //Page 0 einstellen
0x10, //High-Nible der Spaltenadresse
0x00 //Low-Nible der Spaltenadresse
};
int i = 0;
uint16_t SendData;
DAVE_Init(); // Initialization of DAVE Apps
while(1)
{
IO004_SetPin(IO004_Handle0);
while(i<16){
SendData = init;
// write data to tbuf depending on transmit mode
SPI001_WriteData(&SPI001_Handle0,&SendData,SPI001_STANDARD );
while((SPI001_GetFlagStatus(&SPI001_Handle0, SPI001_TRANS_BUFFER_IND_FLAG ))!=SPI001_SET){}
i++;
}
IO004_ResetPin(IO004_Handle0);
i=0;
}
return 0;
}
Show Less
my name is Christian and I'm a student of Electrical Engineering in Germany. After having realized several μC projects including TI'sMSP430, I would like to work with Infineon Controllers in my next project. Different measured values should be visualized on a display. Unfortunately, the communication via the SPI-interface doesn't work correctly yet. The display used is a DOGL from the company “Electronic Assembly”. The controller is an Infineon Relax Kit-Board combined with an XMC4500-F100F1024 controller. I am using a Dave 3 Toolchain for the software development. The communication between the display and the controller works via SPI (Half Duplex).
I have two (comprehension) problems:
1. To make it possible for the display to distinguish Command and Data, the Pin A0 has to be switched to "LOW" for Command and to "HIGH" for Data. Thus, first A0 should be switched to “HIGH” to send the data and then the data should be sent via SPI (figure 1). In my opinion, it should look
like that. Of course, I have to wait for the Transmit Buffer to be empty and then A0 has to be switched to “LOW” again. Unfortunately, I can't find the corresponding register which is only deleted when the transmit has beenfinished. I've looked through the data sheets and the user's guide but
couldn't find anything. Maybe you can give an example.
2. As you can see in the source code, 16 hex values should be transferred one after the other. This shouldbe repeated in the while-forever-loop. My expectation is that the values are sent viathe SPI-periphery successively and in the order given by the array. Unfortunately, only a small amount of data is sent and this doesn't happen in the right order (figure 2). I think I made a mistake with the dave-settings of the SPI-interface.
I hope you are able to help me.
Regards,
Christian
/*
* Main.c
*
* Created on: 29.05.2013
* Author: Christian
*/
#include
int main(void)
{
// status_t status; // Declaration of return variable for DAVE3 APIs (toggle comment if required)
// Init DOGL
const char init[] = {0x40, //Display start line 0
0xA1, //ADC reverse
0xC0, //Normal COM0...COM63
0xA6, //Display normal
0xA2, //Set Bias 1/9 (Duty 1/65)
0x2F, //Booster, Regulator and Follower On
0xF8, //Set internal Booster to 4x
0x00,
0x27, //Contrast set
0x81,
0x10,
0xAC, //No indicator
0x00,
0xAF, //Display on
0xb0, //Page 0 einstellen
0x10, //High-Nible der Spaltenadresse
0x00 //Low-Nible der Spaltenadresse
};
int i = 0;
uint16_t SendData;
DAVE_Init(); // Initialization of DAVE Apps
while(1)
{
IO004_SetPin(IO004_Handle0);
while(i<16){
SendData = init;
// write data to tbuf depending on transmit mode
SPI001_WriteData(&SPI001_Handle0,&SendData,SPI001_STANDARD );
while((SPI001_GetFlagStatus(&SPI001_Handle0, SPI001_TRANS_BUFFER_IND_FLAG ))!=SPI001_SET){}
i++;
}
IO004_ResetPin(IO004_Handle0);
i=0;
}
return 0;
}
XMC™
Hello,I'm trying to add a PWMSP001 to the USBVC001_Example1 project. But after I build the project, I'm getting the following error: 'PWMSP001_FUN_ENT...
Show More
Hello,
I'm trying to add a PWMSP001 to the USBVC001_Example1 project. But after I build the project, I'm getting the following error:
'PWMSP001_FUN_ENTRY' undeclared (first use in this function)
'PWMSP001_FUN_EXIT' undeclared (first use in this function)
How can I solve this problem?
Thank you Show Less
I'm trying to add a PWMSP001 to the USBVC001_Example1 project. But after I build the project, I'm getting the following error:
'PWMSP001_FUN_ENTRY' undeclared (first use in this function)
'PWMSP001_FUN_EXIT' undeclared (first use in this function)
How can I solve this problem?
Thank you Show Less
XMC™
HiI'm currently using DAVE3 with the XMC4500 board and I'd like to use Threads, but I am not able to include the header files needed to use threads (I...
Show More
Hi
I'm currently using DAVE3 with the XMC4500 board and I'd like to use Threads, but I am not able to include the header files needed to use threads (I was trying to include pthread.h)
Is it even possible to use threads? And if yes which header file do I have to include?
with friendly regards Jan Hasenbichler. Show Less
I'm currently using DAVE3 with the XMC4500 board and I'd like to use Threads, but I am not able to include the header files needed to use threads (I was trying to include pthread.h)
Is it even possible to use threads? And if yes which header file do I have to include?
with friendly regards Jan Hasenbichler. Show Less
XMC™
Hi all,I would like to share a very small project I have realized using my XMC1200 boot kit:"Camera control for digital camera Panasonic Lumix DMC-FZ3...
Show More
Hi all,
I would like to share a very small project I have realized using my XMC1200 boot kit:
"Camera control for digital camera Panasonic Lumix DMC-FZ30 using XMC1200".
Attached you can find
a) The project description including the circuit: Just two operations are supported by the remote control input of the camera: “Focus” and “Click”.
b) The small C demo program that I developed from the example "EasyMain.c" by doing minimal adaptation: Take pictures for a time-lapse video.
c) A small demo time-lapse video realized with the project, putting together the pictures into a film using "Windows Life Movie Maker".
Since the camera operation is handled by the circuit now, adding extra circuitry for activation of the camera would be the next obvious step: photo sensor, motion detector, ... The XMC1200 would observe inputs from the sensors and activate the camera, when certain conditions are met. Many possible applications for a tinkerer!
Have fun, Jan Show Less
I would like to share a very small project I have realized using my XMC1200 boot kit:
"Camera control for digital camera Panasonic Lumix DMC-FZ30 using XMC1200".
Attached you can find
a) The project description including the circuit: Just two operations are supported by the remote control input of the camera: “Focus” and “Click”.
b) The small C demo program that I developed from the example "EasyMain.c" by doing minimal adaptation: Take pictures for a time-lapse video.
c) A small demo time-lapse video realized with the project, putting together the pictures into a film using "Windows Life Movie Maker".
Since the camera operation is handled by the circuit now, adding extra circuitry for activation of the camera would be the next obvious step: photo sensor, motion detector, ... The XMC1200 would observe inputs from the sensors and activate the camera, when certain conditions are met. Many possible applications for a tinkerer!
Have fun, Jan Show Less
XMC™
I need to flash new binary code in my XMC4500 Hexagon kit without DAVE.
Is there a way to use J-Link Lite with Infineon Memtool software?
Is there a way to use J-Link Lite with Infineon Memtool software?
XMC™
Dear all,You may download application examples from the respective XMC1000 Boot Kit webpage:XMC1100 Boot Kithttp://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1100/......
Show More
Dear all,
You may download application examples from the respective XMC1000 Boot Kit webpage:
XMC1100 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1100/...
XMC1200 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1200/...
XMC1300 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1300/...
Note: The Simple_* examples are provided as DAVE projects, written in C code with no DAVE apps used. Show Less
You may download application examples from the respective XMC1000 Boot Kit webpage:
XMC1100 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1100/...
XMC1200 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1200/...
XMC1300 Boot Kit
http://www.infineon.com/cms/en/product/microcontrollers.../boot-kit-xmc1300/...
Note: The Simple_* examples are provided as DAVE projects, written in C code with no DAVE apps used. Show Less
Trending discussions