XMC™ Forum Discussions
XMC™
Hi, I'm new to XMC microcontroller.I have a project and I need to read the data from 4 ADC-channels using XMC1100.I use DAVE-app to create an ADC_MEAS...
Show More
Hi, I'm new to XMC microcontroller.
I have a project and I need to read the data from 4 ADC-channels using XMC1100.
I use DAVE-app to create an ADC_MEASUREMENT_0, however when reading the data, the values seem to be wrong.
My code is as follow:
How can I read the correct data from the 4 ADC-Channels?
Thanks
Bien Show Less
I have a project and I need to read the data from 4 ADC-channels using XMC1100.
I use DAVE-app to create an ADC_MEASUREMENT_0, however when reading the data, the values seem to be wrong.
My code is as follow:
XMC_VADC_RESULT_SIZE_t result[4];
uint8_t cnt = 0;
void Adc_Measurement_Handler()
{
result[cnt] = ADC_MEASUREMENT_GetResult(&ADC_MEASUREMENT_0);
cnt = cnt + 1;
if(cnt == 4){
cnt = 0;
}
}
int main(void)
{
DAVE_STATUS_t status;
status = DAVE_Init(); /* Initialization of DAVE Apps */
if(status == DAVE_STATUS_FAILURE)
{
XMC_DEBUG(("DAVE Apps initialization failed with status %d\n", status));
while(1U)
{
}
}
ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);
while(1U);
return 1;
}
How can I read the correct data from the 4 ADC-Channels?
Thanks
Bien Show Less
XMC™
Hello,Is it possible to flash a binary file with the XMC Flasher from the Infineon Toolbox? I need to build an binary because of EtherCat update abili...
Show More
Hello,
Is it possible to flash a binary file with the XMC Flasher from the Infineon Toolbox? I need to build an binary because of EtherCat update ability.
I only can Flash hex Files with the XMC Flasher....
Im trying to find a soltion that our production can flash the released version on our Hardware.... Have someone got a good hint for that?
Best regard
Florian Show Less
Is it possible to flash a binary file with the XMC Flasher from the Infineon Toolbox? I need to build an binary because of EtherCat update ability.
I only can Flash hex Files with the XMC Flasher....
Im trying to find a soltion that our production can flash the released version on our Hardware.... Have someone got a good hint for that?
Best regard
Florian Show Less
XMC™
Hello, i would like to use the XMC4100 for Multi-Phase PWM applications. There are lots of documentation available, stating that it would be possible ...
Show More
Hello, i would like to use the XMC4100 for Multi-Phase PWM applications. There are lots of documentation available, stating that it would be possible to use a compare channel to trigger the start of a slave CCU8 slice.
Eg like page 19: https://www.infineon.com/dgdl/Infineon-IP_CCU8_XMC-TR-v01_02-EN.pdf?fileId=5546d4624ad04ef9014b0780b3482262
But how is this done on the XMC4100? The app(s) and/or Hardware-signals dont shot such a route/connection:
- Setup of 2 clean HRPWM (Same for CCU8!)
-> Compare2 event output of HRPWM0
HRPWM1 input Event
No option for Event connection:
Whats wrong? How to fix? Is it a hardware or a DAVE APP problem? Same workflow on XMC4500 shows an event0 input at HRPWM1 in this place! Whats different on the CCU8 between XMC4100 and XMC4500 - application notes are written as like CCU8 units would be identical!? Plase note: Same problem for "pure" CCU8 as well. Thanks a lot! Show Less
Eg like page 19: https://www.infineon.com/dgdl/Infineon-IP_CCU8_XMC-TR-v01_02-EN.pdf?fileId=5546d4624ad04ef9014b0780b3482262
But how is this done on the XMC4100? The app(s) and/or Hardware-signals dont shot such a route/connection:
- Setup of 2 clean HRPWM (Same for CCU8!)
-> Compare2 event output of HRPWM0
HRPWM1 input Event
No option for Event connection:
Whats wrong? How to fix? Is it a hardware or a DAVE APP problem? Same workflow on XMC4500 shows an event0 input at HRPWM1 in this place! Whats different on the CCU8 between XMC4100 and XMC4500 - application notes are written as like CCU8 units would be identical!? Plase note: Same problem for "pure" CCU8 as well. Thanks a lot! Show Less
XMC™
Hallo All,since this chip shortage is a disaster we are in deep trouble since there is no XMC1302 in T038 packaging available.Some of the most importa...
Show More
Hallo All,
since this chip shortage is a disaster we are in deep trouble since there is no XMC1302 in T038 packaging available.
Some of the most important dealers have some part of the XMC1402. So, considering that the two versions in T038 package seems to have exactly the same PIN-OUT,
do you think it will be really painful to switch betwwen XMC1302 to XMC1402, same FLASH SIZE?
We tried to migrate in DAVE the project from one device to the other, but there is no possibility to do this.
Of course we can build a totally new project (is based on FOC library, to drive a PMSM motor), but before making tests
that are very time-consuming we prefer to ask....maybe is there something we are missing?
Thank you very much for your help!
Ciao to ALL
Fabio Show Less
since this chip shortage is a disaster we are in deep trouble since there is no XMC1302 in T038 packaging available.
Some of the most important dealers have some part of the XMC1402. So, considering that the two versions in T038 package seems to have exactly the same PIN-OUT,
do you think it will be really painful to switch betwwen XMC1302 to XMC1402, same FLASH SIZE?
We tried to migrate in DAVE the project from one device to the other, but there is no possibility to do this.
Of course we can build a totally new project (is based on FOC library, to drive a PMSM motor), but before making tests
that are very time-consuming we prefer to ask....maybe is there something we are missing?
Thank you very much for your help!
Ciao to ALL
Fabio Show Less
XMC™
Hello,I am currently using the XMC 2 GO kit and if i add the APP "ADC_MESUREMENT_0" and generate the code and build the project i always get an error ...
Show More
Hello,
I am currently using the XMC 2 GO kit and if i add the APP "ADC_MESUREMENT_0" and generate the code and build the project i always get an error ('XMC_VADC_GLOBAL_SHS_AREF_EXTERNAL_VDD_UPPER_RANGE' undeclared (first use in this function) and i can't solve it.
I am new with this microcontrollers so i have some dificulties. The error can be seen in the attached image and it is present in the library.
Can you help me please solving this error? Show Less
I am currently using the XMC 2 GO kit and if i add the APP "ADC_MESUREMENT_0" and generate the code and build the project i always get an error ('XMC_VADC_GLOBAL_SHS_AREF_EXTERNAL_VDD_UPPER_RANGE' undeclared (first use in this function) and i can't solve it.
I am new with this microcontrollers so i have some dificulties. The error can be seen in the attached image and it is present in the library.
Can you help me please solving this error? Show Less
XMC™
I seem to have encountered an bug in the libraryXMClib v2.2.0@file xmc_can.c@date 2020-03-17.function XMC_CAN_STATUS_t XMC_CAN_MO_ReceiveData (XMC_CAN...
Show More
I seem to have encountered an bug in the library
XMClib v2.2.0
@file xmc_can.c
@date 2020-03-17.
function
XMC_CAN_STATUS_t XMC_CAN_MO_ReceiveData (XMC_CAN_MO_t * can_mo)
Line 746 looks like this:
while ((rx_pnd! = 0U) || (new_data! = 0U));
this form hangs in an infinite loop, since new_data == 1.
in working library XMClib v2.1.24 xmc_can.c from 2019-06-26 this line looks different:
while ((rx_pnd! = 0U) && (new_data! = 0U));
And it works, the actual function of the new version is different only in this place. Show Less
XMClib v2.2.0
@file xmc_can.c
@date 2020-03-17.
function
XMC_CAN_STATUS_t XMC_CAN_MO_ReceiveData (XMC_CAN_MO_t * can_mo)
Line 746 looks like this:
while ((rx_pnd! = 0U) || (new_data! = 0U));
this form hangs in an infinite loop, since new_data == 1.
in working library XMClib v2.1.24 xmc_can.c from 2019-06-26 this line looks different:
while ((rx_pnd! = 0U) && (new_data! = 0U));
And it works, the actual function of the new version is different only in this place. Show Less
XMC™
Hello,I am unclear what the following section out of the XMC4400 Reference Manual means:15.5.4.2 Valid Master Transmit Data Formats[...]In case of a w...
Show More
Hello,
I am unclear what the following section out of the XMC4400 Reference Manual means:
15.5.4.2 Valid Master Transmit Data Formats
[...]
In case of a wrong TDF code, the frame will be aborted
immediately with a STOP condition if the USIC IIC master still owns the SDA line. But if
the accessed slave owns the SDA line (read transfer), the master must perform a dummy
read with a non-acknowledge so that the slave releases the SDA line before a STOP
condition can be sent. The received data byte of the dummy read will be stored in
RBUF0/1, but RDV0/1 will not be set. Therefore the dummy read will not generate a
receive interrupt and the data byte will not be stored into the receive FIFO.
[...]
What my question is about, what is the behaviour in the second mentioned case?
"...master must perform a dummy read with a non-acknowledge..." does this mean, like the other case, that these tasks are automatically performed by the USIC or do I have to implement that on my own?
Thanks in advance for the help!
Best regards
Michele Blank Show Less
I am unclear what the following section out of the XMC4400 Reference Manual means:
15.5.4.2 Valid Master Transmit Data Formats
[...]
In case of a wrong TDF code, the frame will be aborted
immediately with a STOP condition if the USIC IIC master still owns the SDA line. But if
the accessed slave owns the SDA line (read transfer), the master must perform a dummy
read with a non-acknowledge so that the slave releases the SDA line before a STOP
condition can be sent. The received data byte of the dummy read will be stored in
RBUF0/1, but RDV0/1 will not be set. Therefore the dummy read will not generate a
receive interrupt and the data byte will not be stored into the receive FIFO.
[...]
What my question is about, what is the behaviour in the second mentioned case?
"...master must perform a dummy read with a non-acknowledge..." does this mean, like the other case, that these tasks are automatically performed by the USIC or do I have to implement that on my own?
Thanks in advance for the help!
Best regards
Michele Blank Show Less
XMC™
XMC 4500 Relax Kit
Solved
Hello Community,I'm new to the XMC-Platform and I'm trying to generate some Code for the XMC4500 Relax Kit via Simulink.In the code generation setting...
Show More
Hello Community,
I'm new to the XMC-Platform and I'm trying to generate some Code for the XMC4500 Relax Kit via Simulink.
In the code generation settings I chose the downloaded "Infineon_XMC_Family.tlc" system target file and I've set the appropriate XMC target device.
When trying to generate code for a nearly blank model, it still throws me the following error in the attachment --> "Code generation information file does not exist."
Just before terminating, the diagnostic viewer gives the following output:
"C:\Data\Matlab/XMC4500_IPTS_xmc_rtw/Infineon/XMC4500_series/Source/system_XMC4500.c"
Das System kann den angegebenen Pfad nicht finden.
gmake: *** [system_XMC4500.o] Error 1
But the file which can't be found exists, as I had a look at it.
Did someone had similar issues and has a hint for me?
Best Regards
Tobias
Show Less
I'm new to the XMC-Platform and I'm trying to generate some Code for the XMC4500 Relax Kit via Simulink.
In the code generation settings I chose the downloaded "Infineon_XMC_Family.tlc" system target file and I've set the appropriate XMC target device.
When trying to generate code for a nearly blank model, it still throws me the following error in the attachment --> "Code generation information file does not exist."
Just before terminating, the diagnostic viewer gives the following output:
"C:\Data\Matlab/XMC4500_IPTS_xmc_rtw/Infineon/XMC4500_series/Source/system_XMC4500.c"
Das System kann den angegebenen Pfad nicht finden.
gmake: *** [system_XMC4500.o] Error 1
But the file which can't be found exists, as I had a look at it.
Did someone had similar issues and has a hint for me?
Best Regards
Tobias
Show Less
XMC™
Hello!I'm trying to get my head around quadrature decoder of XMC4x00 series to count the steps of a rotary encoder. What I've found out so far ... ple...
Show More
Hello!
I'm trying to get my head around quadrature decoder of XMC4x00 series to count the steps of a rotary encoder. What I've found out so far ... please correct me if wrong ...
- XMC4300 does not have POSIF, therefore there's no chance to read a rotary encoder (except high-frequency polling of general purposes I/Os).
- POSIF reads the input signals A and B, which are then provided as step/direction signals to a CCU4/CC8 slice to be counted by it.
- There's a ENCODER_POSIF application (for XMC4700 and others), which allows me to select PHASE A and PHASE B input pins.
Now my questions:
1. How to connect the POSIF output signals (STEP and DIRECTION) to a CCU4 to be able to count?
2. Is there a complete example? ENCODER_POSIF seems to have died half way to completion.
Best regards,
Ernie Show Less
I'm trying to get my head around quadrature decoder of XMC4x00 series to count the steps of a rotary encoder. What I've found out so far ... please correct me if wrong ...
- XMC4300 does not have POSIF, therefore there's no chance to read a rotary encoder (except high-frequency polling of general purposes I/Os).
- POSIF reads the input signals A and B, which are then provided as step/direction signals to a CCU4/CC8 slice to be counted by it.
- There's a ENCODER_POSIF application (for XMC4700 and others), which allows me to select PHASE A and PHASE B input pins.
Now my questions:
1. How to connect the POSIF output signals (STEP and DIRECTION) to a CCU4 to be able to count?
2. Is there a complete example? ENCODER_POSIF seems to have died half way to completion.
Best regards,
Ernie Show Less
XMC™
I am using the POSIF in a motor control application. I have got the POSIF.OUT1 connected to a CCU4 slice to measure the speed.After initialization (mo...
Show More
I am using the POSIF in a motor control application. I have got the POSIF.OUT1 connected to a CCU4 slice to measure the speed.
After initialization (motor not running) everything is normal.
While the motor is running, the CCU4 works correctly and I get the correct speed.
If I stop the motor, then the CCU4 generates very fast interrupts at a rate of about 5.5µs. It looks like the CCU4 is seeing the POSIF.OUT1 toggling at this speed. All the registers in the POSIF are stable, so I am not sure why the OUT1 is toggling.
I have seen that if I clear the internal status of the POSIF with the PRUNC.CSM bit, the OUT1 stops toggling.
Is there any reason why this is happening? Is clearing the internal status the correct use of the POSIF?
Any help to understand what is happening would be much appreciated. Show Less
After initialization (motor not running) everything is normal.
While the motor is running, the CCU4 works correctly and I get the correct speed.
If I stop the motor, then the CCU4 generates very fast interrupts at a rate of about 5.5µs. It looks like the CCU4 is seeing the POSIF.OUT1 toggling at this speed. All the registers in the POSIF are stable, so I am not sure why the OUT1 is toggling.
I have seen that if I clear the internal status of the POSIF with the PRUNC.CSM bit, the OUT1 stops toggling.
Is there any reason why this is happening? Is clearing the internal status the correct use of the POSIF?
Any help to understand what is happening would be much appreciated. Show Less