XMC™ Forum Discussions
XMC™
Hi! I'm Roberto Barrado. Last summer (2014) I worked in Infineon (München) for my final project: Porting SOAP to XMC4400 and 4500 microcontrollers. In...
Show More
Hi! I'm Roberto Barrado. Last summer (2014) I worked in Infineon (München) for my final project: Porting SOAP to XMC4400 and 4500 microcontrollers.
Introduction
SOAP allows working with RPC (Remote Procedure Calls) through Internet easily. For this task I used gSOAP, it is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. ATENTION: gSOAP and (the plugin is under GPLv2 license.)
Using the plugin that I did, it's possible to create a SOAP/REST server or client with a few clicks.
To install it into DAVE, you only need to download and extract the zip file, and select the path to SOAP_Update folder in "tab "Help/Install New Software". Then you can find this screen in Communication/SOAP or with his icon.
It is mandatory to use ETH003 App!!
Examples
I did some examples to start easily, and another more complicated simulating a simple free cooling in computing centre (If you don’t know it, see this video😞
The goal is to connect through Internet a SOAP Server (xmc4500 relax that manages the control of the system) with a sensor temperature as SOAP client (xmc4500 hexagon), and android app as client too.
[INDENT=6]** In the video the outside temp is -55ºC, it's not a bug, this is because I simulated temp with a potentiometer.
** At the beginning, I move one of the slider and nothing happened, in fact, the dc motor spins faster, you can check it in the LCD.
Benchmark
In the benchmark I did a simple calculator for integer, float and double types, and an operation with String (It receives one string, and response with “Hi! I received your message”).
Volume test
Results:
Although the average (orange line) time is high, the results are really good, because a XMC4500 can respond almost 103 operations in a second, only 2 errors in 14240 operations and around 50000 BPS (Green line in graphic).
In the same test, I measured the time that processor is available for other operations, the second bar, (os_iddle_demon) is this time, and around 9% of the time it is doing nothing.
It means this percent of time, we can use the processor for the main application, it is not much because in this test, the charge of communication Works is so high.
It means that during this percent of time, we can use the processor for the main application, and it is not much time because in this test the soap communication load is heavy.
If the requirements of SOAP communication decrease, it’s possible to get around 70% of processor time free.
Stress test
This is a stress-test, here we can check how XMC4500 can work with almost 80000 Bytes per second until it fails.
In the second graphic we see that we get a lot of errors. It shows the relation between the number of threads in the test (soap clients) and the number errors.
Operations comparison
Finally, I measured the time every operation takes:
The DAVE eclipse plugin and all this examples are available in this zip file. Show Less
Introduction
SOAP allows working with RPC (Remote Procedure Calls) through Internet easily. For this task I used gSOAP, it is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. ATENTION: gSOAP and (the plugin is under GPLv2 license.)
Using the plugin that I did, it's possible to create a SOAP/REST server or client with a few clicks.
To install it into DAVE, you only need to download and extract the zip file, and select the path to SOAP_Update folder in "tab "Help/Install New Software". Then you can find this screen in Communication/SOAP or with his icon.
It is mandatory to use ETH003 App!!
Examples
I did some examples to start easily, and another more complicated simulating a simple free cooling in computing centre (If you don’t know it, see this video😞
The goal is to connect through Internet a SOAP Server (xmc4500 relax that manages the control of the system) with a sensor temperature as SOAP client (xmc4500 hexagon), and android app as client too.
- Android app:
- Select auto or manual mode:
- Auto: XMC4500 relax take all decisions
- Manual: User can manage the actuators.
- Auto: XMC4500 relax take all decisions
- Select auto or manual mode:
- XMC4500 hexagon:
- I simulated the outdoor temperature with a potentiometer and ADC converter.
- I simulated the outdoor temperature with a potentiometer and ADC converter.
- XMC4500 relax:
- Read the inside temperature with a TMP35 sensor and ADC converter.
- Take a decision:
- If outsideTemp
open window (move servo) - If Desired Temp
normal mode (start dc motor) - If Desired Temp
mixed mode (mover servo and used dc motor, 50% both)
- If outsideTemp
- Display the temperatures and state of system (dc motor and servo) in LCD.
- Read the inside temperature with a TMP35 sensor and ADC converter.
[INDENT=6]** In the video the outside temp is -55ºC, it's not a bug, this is because I simulated temp with a potentiometer.
** At the beginning, I move one of the slider and nothing happened, in fact, the dc motor spins faster, you can check it in the LCD.
Benchmark
In the benchmark I did a simple calculator for integer, float and double types, and an operation with String (It receives one string, and response with “Hi! I received your message”).
Volume test
Transac per sencond per operation | Num threads (clients) | Test time |
30 | 3 | 120 s |
Results:
Average (ms) | Nº transac | Transac per second | Bytes | Errors |
57.01 | 14240 | 102.72 | 6193532 | 2 |
Although the average (orange line) time is high, the results are really good, because a XMC4500 can respond almost 103 operations in a second, only 2 errors in 14240 operations and around 50000 BPS (Green line in graphic).
In the same test, I measured the time that processor is available for other operations, the second bar, (os_iddle_demon) is this time, and around 9% of the time it is doing nothing.
It means this percent of time, we can use the processor for the main application, it is not much because in this test, the charge of communication Works is so high.
It means that during this percent of time, we can use the processor for the main application, and it is not much time because in this test the soap communication load is heavy.
If the requirements of SOAP communication decrease, it’s possible to get around 70% of processor time free.
Stress test
Transac per sencond per operation | Num threads (clients) | Test time |
50 | 1-10 | 60 s |
This is a stress-test, here we can check how XMC4500 can work with almost 80000 Bytes per second until it fails.
In the second graphic we see that we get a lot of errors. It shows the relation between the number of threads in the test (soap clients) and the number errors.
Operations comparison
Transac per sencond per operation | Num threads (clients) | Test time |
100 | 2 | 120 s |
Finally, I measured the time every operation takes:
The DAVE eclipse plugin and all this examples are available in this zip file. Show Less
XMC™
Hello,I am transmitting 16bit data over SSC configured as master 1MHz every 1ms on xmc4108. Bellow is my codevoid TransmitSPI1(uint16_t value){ // che...
Show More
Hello,
I am transmitting 16bit data over SSC configured as master 1MHz every 1ms on xmc4108. Bellow is my code
void TransmitSPI1(uint16_t value){
// check if transmit event occurred, buffer is empty
if(USIC0_CH1->PSR_SSCMode & (uint32_t)USIC_CH_PSR_SSCMode_TBIF_Msk){
// write data to output
USIC0_CH1->TBUF[0] = (uint16_t)value;
// clear transmit event flag
USIC0_CH1->PSCR |= (uint32_t)USIC_CH_PSCR_CTBIF_Msk;
}
}
My problem is that after some random time (in the order of seconds) TBIF is not set anymore and therefore transmission stops.
What could be the reason why data is not transferred to shift register and transmit buffer is emptied for next data? What can I check to find the cause of this behavior?
Please do not answer to check DAVE app.
rum Show Less
I am transmitting 16bit data over SSC configured as master 1MHz every 1ms on xmc4108. Bellow is my code
void TransmitSPI1(uint16_t value){
// check if transmit event occurred, buffer is empty
if(USIC0_CH1->PSR_SSCMode & (uint32_t)USIC_CH_PSR_SSCMode_TBIF_Msk){
// write data to output
USIC0_CH1->TBUF[0] = (uint16_t)value;
// clear transmit event flag
USIC0_CH1->PSCR |= (uint32_t)USIC_CH_PSCR_CTBIF_Msk;
}
}
My problem is that after some random time (in the order of seconds) TBIF is not set anymore and therefore transmission stops.
What could be the reason why data is not transferred to shift register and transmit buffer is emptied for next data? What can I check to find the cause of this behavior?
Please do not answer to check DAVE app.
rum Show Less
XMC™
Hello,i would like to know, if i can change the identifier of the MO in my program or is the identifier const after GUI setup?. The examples shows onl...
Show More
Hello,
i would like to know, if i can change the identifier of the MO in my program or is the identifier const after GUI setup?. The examples shows only change of data values, but not to change the identifier. DLC and Bitmask is changable too, after gui init?
Does someone has a example? Show Less
i would like to know, if i can change the identifier of the MO in my program or is the identifier const after GUI setup?. The examples shows only change of data values, but not to change the identifier. DLC and Bitmask is changable too, after gui init?
Does someone has a example? Show Less
XMC™
Hello,I am new to Dave and infineon kits. I tried the PMSMFOCSL02_Example1_XMC13 with the XMC1000 Motor Control Application Kit. It worked fine, but a...
Show More
Hello,
I am new to Dave and infineon kits. I tried the PMSMFOCSL02_Example1_XMC13 with the XMC1000 Motor Control Application Kit. It worked fine, but after an update (I think it was the emulatorsoftware) when I pressed debug, nothing worked anymore.
The motor does not spin and the thread is halted. Resume does not help. And it says No source available for "0xfffffffe() ". I am now sitting here for two days with this problem and have tried all to isolate the problem.
Sometimes I am able to step in to the main loop and the DAVE_Init() Function, CLK002_Init(void), SystemCoreClockUpdate() and then it hangs at the line
Clock = MCLK_MHZ / IDIV;
in system_XMC1300.c
And I am frustrated because I get error messages every five minutes like the dave severe error message and I have to restart dave every time afterI have connected with the debugger. I will post all my error messages
in a seperate post, later. But I am sure I got all of them until now. Today I have reinstalled Dave.
But the example still does not work and dave continues to anoy me, for example with the"SoftwareIDIndex file was re-generated from installed app directories" message.
And sometimes I get the "warning: t-bit of xpsr is 0 but should be 1. changed to 1." Not sure if this has something to do with my problem.
And I also get the warning my clock is running on low frequency. About 6MHz.
What could possibly be wrong with the example now, when it has worked in the beginning? Is my board damaged? How can I narrow down the problem?
Thanks for any help.
Dave 3.1.10
SEGGER J-Link Lite-XMC4200 V1.00
windows 7 Professional SP1 64 Bit
Intel Core Q9400 Show Less
I am new to Dave and infineon kits. I tried the PMSMFOCSL02_Example1_XMC13 with the XMC1000 Motor Control Application Kit. It worked fine, but after an update (I think it was the emulatorsoftware) when I pressed debug, nothing worked anymore.
The motor does not spin and the thread is halted. Resume does not help. And it says No source available for "0xfffffffe() ". I am now sitting here for two days with this problem and have tried all to isolate the problem.
Sometimes I am able to step in to the main loop and the DAVE_Init() Function, CLK002_Init(void), SystemCoreClockUpdate() and then it hangs at the line
Clock = MCLK_MHZ / IDIV;
in system_XMC1300.c
And I am frustrated because I get error messages every five minutes like the dave severe error message and I have to restart dave every time afterI have connected with the debugger. I will post all my error messages
in a seperate post, later. But I am sure I got all of them until now. Today I have reinstalled Dave.
But the example still does not work and dave continues to anoy me, for example with the"SoftwareIDIndex file was re-generated from installed app directories" message.
And sometimes I get the "warning: t-bit of xpsr is 0 but should be 1. changed to 1." Not sure if this has something to do with my problem.
And I also get the warning my clock is running on low frequency. About 6MHz.
What could possibly be wrong with the example now, when it has worked in the beginning? Is my board damaged? How can I narrow down the problem?
Thanks for any help.
Dave 3.1.10
SEGGER J-Link Lite-XMC4200 V1.00
windows 7 Professional SP1 64 Bit
Intel Core Q9400 Show Less
XMC™
Hi, the XMC4800 is a very interesting new member of the XMC4000 family,my dream of an optimal pinning:a) An unlimited usable EBU, i.e. no peripheral f...
Show More
Hi,
the XMC4800 is a very interesting new member of the XMC4000 family,
my dream of an optimal pinning:
a) An unlimited usable EBU, i.e. no peripheral function only accessable via pins shared with ebu (e.g. eth0.txd is still shared with ebu).
b) Unshared JTAG pins, because some board testers using boundary scan have a problem with shared JTAG pins (in our case from Göpel).
c) All package pins used (there are 12 unused).
and as extension: more chip selects for external devices (CS0..7).
Best regards,
Wolfgang Show Less
the XMC4800 is a very interesting new member of the XMC4000 family,
my dream of an optimal pinning:
a) An unlimited usable EBU, i.e. no peripheral function only accessable via pins shared with ebu (e.g. eth0.txd is still shared with ebu).
b) Unshared JTAG pins, because some board testers using boundary scan have a problem with shared JTAG pins (in our case from Göpel).
c) All package pins used (there are 12 unused).
and as extension: more chip selects for external devices (CS0..7).
Best regards,
Wolfgang Show Less
XMC™
Hello,is an updated version for the VADC-GPDMA (XMC_HOT GPDMA_ADC_to_RAM) example for Dave 4 available?Is an example DAC-DMA for Dave 4 available?Rega...
Show More
Hello,
is an updated version for the VADC-GPDMA (XMC_HOT GPDMA_ADC_to_RAM) example for Dave 4 available?
Is an example DAC-DMA for Dave 4 available?
Regards
Kurt Show Less
is an updated version for the VADC-GPDMA (XMC_HOT GPDMA_ADC_to_RAM) example for Dave 4 available?
Is an example DAC-DMA for Dave 4 available?
Regards
Kurt Show Less
XMC™
Hi,Not clear how to configure SPI pins in master and slave mode.Device: XMC1100_T038F0064In DAVE3 I have made two project with an SPI slave in non RTO...
Show More
Hi,
Not clear how to configure SPI pins in master and slave mode.
Device: XMC1100_T038F0064
In DAVE3 I have made two project with an SPI slave in non RTOS and SPI master in non RTOS mode.
I have debugged this projects. I have found the followings for the pin configirations.
Using Port I/O Functions and USIC Module 0 Channel 1 Interconnects
Master config
--------------
addr = DX0CR, ch: 1, value = 0x00000016
addr = DX3CR, ch: 1, value = 0x00000005
addr = DX5CR, ch: 1, value = 0x00000005
DX0: G, INSW=1 -> DX3INS
DX3: F -> DX5INS
DX5: F -> P1.5 (DIN)
GPIO config: P1.2 : output : ALT7: CH1.DOUT
GPIO config: P1.3 : output : ALT6: CH1.SCLKOUT
GPIO config: P1.4 : output : ALT7: CH1.SELO1
Slave config
------------
addr = DX0CR, ch: 1, value = 0x00000010
addr = DX1CR, ch: 1, value = 0x00000016
addr = DX2CR, ch: 1, value = 0x00000116
addr = DX5CR, ch: 1, value = 0x00000004
DX0: A, INSW=1 P1.3 (DIN)
DX1: G, INSW=1 DX4INS
DX2: G, INSW=1, DPOL=1 DX5INS
GPIO config: P1.2 : output : ALT7 CH1.DOUT0
In master mode for example: I have found only P1.5 configured directly (DIN). DOUT, SCLKOUT and SELO1 configured by GPIO settings. No need to configure the output pins?
In slave mode: shift clock input not configured. What are DXnINS? Some DXnCR configured for DXnINS. Show Less
Not clear how to configure SPI pins in master and slave mode.
Device: XMC1100_T038F0064
In DAVE3 I have made two project with an SPI slave in non RTOS and SPI master in non RTOS mode.
I have debugged this projects. I have found the followings for the pin configirations.
Using Port I/O Functions and USIC Module 0 Channel 1 Interconnects
Master config
--------------
addr = DX0CR, ch: 1, value = 0x00000016
addr = DX3CR, ch: 1, value = 0x00000005
addr = DX5CR, ch: 1, value = 0x00000005
DX0: G, INSW=1 -> DX3INS
DX3: F -> DX5INS
DX5: F -> P1.5 (DIN)
GPIO config: P1.2 : output : ALT7: CH1.DOUT
GPIO config: P1.3 : output : ALT6: CH1.SCLKOUT
GPIO config: P1.4 : output : ALT7: CH1.SELO1
Slave config
------------
addr = DX0CR, ch: 1, value = 0x00000010
addr = DX1CR, ch: 1, value = 0x00000016
addr = DX2CR, ch: 1, value = 0x00000116
addr = DX5CR, ch: 1, value = 0x00000004
DX0: A, INSW=1 P1.3 (DIN)
DX1: G, INSW=1 DX4INS
DX2: G, INSW=1, DPOL=1 DX5INS
GPIO config: P1.2 : output : ALT7 CH1.DOUT0
In master mode for example: I have found only P1.5 configured directly (DIN). DOUT, SCLKOUT and SELO1 configured by GPIO settings. No need to configure the output pins?
In slave mode: shift clock input not configured. What are DXnINS? Some DXnCR configured for DXnINS. Show Less
XMC™
Hi. all.I executed sample USBD_MS_Example1 in DAVE3 environment.* USBD_MS_Example1 is USB memory solutionWhen I copy a file to USB memory, the data ra...
Show More
Hi. all.
I executed sample USBD_MS_Example1 in DAVE3 environment.
* USBD_MS_Example1 is USB memory solution
When I copy a file to USB memory, the data rate is 600KByte / sec.
But general USB memory, the data rate is 10MByte / sec.
Please tell me why this happens? Show Less
I executed sample USBD_MS_Example1 in DAVE3 environment.
* USBD_MS_Example1 is USB memory solution
When I copy a file to USB memory, the data rate is 600KByte / sec.
But general USB memory, the data rate is 10MByte / sec.
Please tell me why this happens? Show Less
XMC™
actually i am new to xmc board. i want to know how can access the web pages on the board through internet from anywhere?
thanx in advance
thanx in advance
XMC™
Hi,I am working with xmc4500 relax kit and having a problems with POSIF interrupts. I want to track the positions so i am using POSQE001 App. I want t...
Show More
Hi,
I am working with xmc4500 relax kit and having a problems with POSIF interrupts. I want to track the positions so i am using POSQE001 App. I want to have two interrupts at position counter compare match and position counter period match. These two interrupts are mapped to my own functions with two NVIC002 apps. I am only able to get period match interrupt only in one direction. Compare match interrupt does not occur no matter what i do. Also in order to get period match interrupt, i have to check the option in POSQE001 App GUI setting panel (Enable Position counter overflow event) in addition to manually enabling the event in main function with the following code. if i do not check it this, then period match interrupt also does not occur.
I dont know why i need to enable the GUI option, when i am enabling the events manually. but the problem does not end here this period match interrupt only occurs in one direction of movement but not in the other direction e.g it occurs only in Clockwise direction, but not in anti- clockwise direction. it should occur in both directions.
could anyone please explain what the option in POSQE001 App GUI setting panel (enable Position counter overflow event) means, what does it do, why is it necessary. and is it necessary to check if i am enabling the events manually. because if i do not check it and enable the events manually then both interrupts does not work.
secondly and most Importantly, please someone help me how to get compare match interrupt and period match interrupt working in both directions. I am also enabling the events manually and setting CompareMatch and PeriodMatch values with the following code in main function, but nothing is helping.
and also one more question when does Position counter Event 0,1 and 2 interrupts occur? what are Position counter Event 0,1 and 2? Show Less
I am working with xmc4500 relax kit and having a problems with POSIF interrupts. I want to track the positions so i am using POSQE001 App. I want to have two interrupts at position counter compare match and position counter period match. These two interrupts are mapped to my own functions with two NVIC002 apps. I am only able to get period match interrupt only in one direction. Compare match interrupt does not occur no matter what i do. Also in order to get period match interrupt, i have to check the option in POSQE001 App GUI setting panel (Enable Position counter overflow event) in addition to manually enabling the event in main function with the following code. if i do not check it this, then period match interrupt also does not occur.
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,POSQE001_POSITION_COUNTER,POSQE001_CCU_PERIOD_MATCH);
I dont know why i need to enable the GUI option, when i am enabling the events manually. but the problem does not end here this period match interrupt only occurs in one direction of movement but not in the other direction e.g it occurs only in Clockwise direction, but not in anti- clockwise direction. it should occur in both directions.
could anyone please explain what the option in POSQE001 App GUI setting panel (enable Position counter overflow event) means, what does it do, why is it necessary. and is it necessary to check if i am enabling the events manually. because if i do not check it and enable the events manually then both interrupts does not work.
secondly and most Importantly, please someone help me how to get compare match interrupt and period match interrupt working in both directions. I am also enabling the events manually and setting CompareMatch and PeriodMatch values with the following code in main function, but nothing is helping.
int main(void)
{
status_t Status;
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_PERIOD_MATCH);
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_UP_COMPARE_MATCH);
Status = POSQE001_EnableEvent((POSQE001_HandleType*)&POSQE001_Handle0,
POSQE001_POSITION_COUNTER,
POSQE001_CCU_DOWN_COMPARE_MATCH);
Status = POSQE001_Start(&POSQE001_Handle0);
Status = POSQE001_SetPeriodCounterPM(&POSQE001_Handle0, 80);
Status = POSQE001_SetPeriodCounterCM(&POSQE001_Handle0, 40);
}
and also one more question when does Position counter Event 0,1 and 2 interrupts occur? what are Position counter Event 0,1 and 2? Show Less
Trending discussions