DAVE™ Forum Discussions
DAVE™
You are connecting one of Infineon's develepmont boards, e.g. XMC boards with debugger chip XMC4200, to the PC and the board is not recognized by the ...
Show More
You are connecting one of Infineon's develepmont boards, e.g. XMC boards with debugger chip XMC4200, to the PC and the board is not recognized by the Windows OS Device Manager?
Probably you are using an USB charging cable instead of an USB data cable. You might sort your USB cables with the help of a smartphone.
In case you connect the phone with a charging cable it shows you with a thunderbold sign on the top right that the battery is being charged.
Using a data cable will change the situation, the USB connection will be shown by a dialog asking you if the computer is allowed to access the phone's data.
Please refer to this picture about the USB connection to the XMC4200 debugger chip.
Show Less
Probably you are using an USB charging cable instead of an USB data cable. You might sort your USB cables with the help of a smartphone.
In case you connect the phone with a charging cable it shows you with a thunderbold sign on the top right that the battery is being charged.
Using a data cable will change the situation, the USB connection will be shown by a dialog asking you if the computer is allowed to access the phone's data.
Please refer to this picture about the USB connection to the XMC4200 debugger chip.
Show Less
DAVE™
I am using XMC4800 to write code for a slave device. When the device connected to TwinCat 3, I got the error message as the following message:'INIT to...
Show More
I am using XMC4800 to write code for a slave device. When the device connected to TwinCat 3, I got the error message as the following message:
'INIT to PREOP' failed!
Error: 'check product code'. Comparison '0x00000b22' == '0x50f10002' failed.
the right side of comparison is the vendor ID and the left side is product ID.
I just don't understand it is a problem with Dave 4 or TwinCat 3 and how to fix the error.
Thanks! Show Less
'INIT to PREOP' failed!
Error: 'check product code'. Comparison '0x00000b22' == '0x50f10002' failed.
the right side of comparison is the vendor ID and the left side is product ID.
I just don't understand it is a problem with Dave 4 or TwinCat 3 and how to fix the error.
Thanks! Show Less
DAVE™
Hi there, I am using xmc4500 relax kit with sd card to store the matrix form of touch value of tft. now i can save the data but when i read the data f...
Show More
Hi there,
I am using xmc4500 relax kit with sd card to store the matrix form of touch value of tft. now i can save the data but when i read the data first three values dosnot come.
void SaveTouchMatrix(void)
{
uint8_t count = 0;uint8_t i =0;uint8_t read[1];
uint32_t data = 0; //int data3;
char data1[4]; UINT bw,br; /* Bytes written */
FRESULT res; /* API result code */
uint32_t address = REG_TOUCH_TRANSFORM_A + RAM_G;
MCU_Delay_20ms();
res = f_mount(&fs, "0:", 1);
if (res == FR_OK){
res = f_mkdir("XMC4500");
}
if ((res == FR_OK) || (res == FR_EXIST))
{
res = f_open(&fil, "XMC4500/hello.txt",FA_CREATE_ALWAYS | FA_WRITE | FA_READ);
}
if (res == FR_OK){
res = f_lseek(&fil, 0);}
do
{
data = EVE_MemRead32(address + (count * 4));
data1[0] = (data & 0x000000ff);
data1[1] = ((data & 0x0000ff00) >> 8);
data1[2] = ((data & 0x00ff0000) >> 16);
data1[3] = ((data & 0xff000000) >> 24);
SEGGER_RTT_printf(0,"%sindata =%d\r\n",RTT_CTRL_BG_BRIGHT_RED,data,RTT_CTRL_RESET);
if (res == FR_OK)
{
res = f_write(&fil,&data1, 4, &bw);
if(res == FR_OK)
{
res = f_read(&fil, &read, 4, &br);
}
MCU_Delay_20ms();
SEGGER_RTT_printf(0,"%sdatain =%d\r\n",RTT_CTRL_BG_BRIGHT_RED,read,RTT_CTRL_RESET);
res = f_lseek(&fil, i);
}
i = (count * 32);
DIGITAL_IO_SetOutputHigh(&LED);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[0],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[1],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[2],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[3],RTT_CTRL_RESET);
count++;
}while(count < 6);
if (res == FR_OK)
{
f_close(&fil);
}
}
// Read the touch digitizer calibration matrix values from a file and write them to the Eve.
bool LoadTouchMatrix(void)
{
uint8_t count = 0; uint32_t data = 0;uint8_t i =0;
uint8_t data1[4]; UINT br;uint8_t b=0;
uint32_t address = REG_TOUCH_TRANSFORM_A + RAM_G;
res = f_mount(&fs, "0:", 1);
if (res == FR_OK){
res = f_mkdir("XMC4500");
}
if ((res == FR_OK) || (res == FR_EXIST)){
res = f_open(&fil, "XMC4500/hello.txt",FA_READ);
if ((res == FR_OK) || (res == FR_EXIST)){
res = f_lseek(&fil, 0);}}
do
{
for (b=0;b<4;b++){
res = f_read(&fil, &data1, 1,&br);}
res = f_lseek(&fil, i);
i = (count * 32);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[0],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[1],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[2],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[3],RTT_CTRL_RESET);
data = data1[0] | (data1[1] << 8 )| (data1[2] << 16) | (data1[3] << 24);
EVE_MemWrite32(address + (count * 4),data);
SEGGER_RTT_printf(0,"%sDATAOUT =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data,RTT_CTRL_RESET);
count++;
}while(count < 6);
if (res == FR_OK)
{
f_close(&fil);
}
return true;
} Show Less
I am using xmc4500 relax kit with sd card to store the matrix form of touch value of tft. now i can save the data but when i read the data first three values dosnot come.
void SaveTouchMatrix(void)
{
uint8_t count = 0;uint8_t i =0;uint8_t read[1];
uint32_t data = 0; //int data3;
char data1[4]; UINT bw,br; /* Bytes written */
FRESULT res; /* API result code */
uint32_t address = REG_TOUCH_TRANSFORM_A + RAM_G;
MCU_Delay_20ms();
res = f_mount(&fs, "0:", 1);
if (res == FR_OK){
res = f_mkdir("XMC4500");
}
if ((res == FR_OK) || (res == FR_EXIST))
{
res = f_open(&fil, "XMC4500/hello.txt",FA_CREATE_ALWAYS | FA_WRITE | FA_READ);
}
if (res == FR_OK){
res = f_lseek(&fil, 0);}
do
{
data = EVE_MemRead32(address + (count * 4));
data1[0] = (data & 0x000000ff);
data1[1] = ((data & 0x0000ff00) >> 8);
data1[2] = ((data & 0x00ff0000) >> 16);
data1[3] = ((data & 0xff000000) >> 24);
SEGGER_RTT_printf(0,"%sindata =%d\r\n",RTT_CTRL_BG_BRIGHT_RED,data,RTT_CTRL_RESET);
if (res == FR_OK)
{
res = f_write(&fil,&data1, 4, &bw);
if(res == FR_OK)
{
res = f_read(&fil, &read, 4, &br);
}
MCU_Delay_20ms();
SEGGER_RTT_printf(0,"%sdatain =%d\r\n",RTT_CTRL_BG_BRIGHT_RED,read,RTT_CTRL_RESET);
res = f_lseek(&fil, i);
}
i = (count * 32);
DIGITAL_IO_SetOutputHigh(&LED);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[0],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[1],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[2],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sdata1 =%d\r\n",RTT_CTRL_BG_BRIGHT_GREEN,data1[3],RTT_CTRL_RESET);
count++;
}while(count < 6);
if (res == FR_OK)
{
f_close(&fil);
}
}
// Read the touch digitizer calibration matrix values from a file and write them to the Eve.
bool LoadTouchMatrix(void)
{
uint8_t count = 0; uint32_t data = 0;uint8_t i =0;
uint8_t data1[4]; UINT br;uint8_t b=0;
uint32_t address = REG_TOUCH_TRANSFORM_A + RAM_G;
res = f_mount(&fs, "0:", 1);
if (res == FR_OK){
res = f_mkdir("XMC4500");
}
if ((res == FR_OK) || (res == FR_EXIST)){
res = f_open(&fil, "XMC4500/hello.txt",FA_READ);
if ((res == FR_OK) || (res == FR_EXIST)){
res = f_lseek(&fil, 0);}}
do
{
for (b=0;b<4;b++){
res = f_read(&fil, &data1, 1,&br);}
res = f_lseek(&fil, i);
i = (count * 32);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[0],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[1],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[2],RTT_CTRL_RESET);
SEGGER_RTT_printf(0,"%sDATAOUT8bit =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data1[3],RTT_CTRL_RESET);
data = data1[0] | (data1[1] << 8 )| (data1[2] << 16) | (data1[3] << 24);
EVE_MemWrite32(address + (count * 4),data);
SEGGER_RTT_printf(0,"%sDATAOUT =%d\r\n",RTT_CTRL_BG_BRIGHT_BLUE,data,RTT_CTRL_RESET);
count++;
}while(count < 6);
if (res == FR_OK)
{
f_close(&fil);
}
return true;
} Show Less
DAVE™
Can demo distance20GO Development Board measure speed in the range of 0.5 m to 1.5m?What is the speed measurement accuracy?and can anti-interference...
Show More
Can demo distance20GO Development Board measure speed in the range of 0.5 m to 1.5m?What is the speed measurement accuracy?and can anti-interference test be carried out?
Show Less
DAVE™
Hi,I believe there is an "error" in the HW_EepromReload() function in the xmc_eschw.c generated/template code of the ECAT_SSC app.In HW_EepromReload()...
Show More
Hi,
I believe there is an "error" in the HW_EepromReload() function in the xmc_eschw.c generated/template code of the ECAT_SSC app.
In HW_EepromReload(), EEPROMReg is initialized to 0, and never updated with the value of ESC_EEPROM_CONTROL_OFFSET.
I does some and-ing with a couple of masks which makes no sense as it is 0.
Then it updates ESC_EEPROM_CONTROL_OFFSET with it's value which is 0.
I hope I have overlooked something.
I have no idea of the implications but just clearing a register seems wrong. I believe a change like the following should be made:
UINT16 EEPROMReg = 0U; /* Regvalue 0x502 - 0x5003 */
+HW_EscReadWord(EEPROMReg,ESC_EEPROM_CONTROL_OFFSET);
UINT32 cmd = (uint32_t)EEPROMReg & (uint32_t)ESC_EEPROM_CMD_MASK;
Just like it is done in the loop.
I see that ecatappl.c, generated by SSC Tool, does exactly this and handles the case where ESC_EEPROM_CONTROL_OFFSET bit 6 is set, which in your code is cleared.
Dave Version: 4.4.2, ECAT_SSC v4_0_26
Hope someone can confirm this so I can make the changes manually.
Best regards Mathias Show Less
I believe there is an "error" in the HW_EepromReload() function in the xmc_eschw.c generated/template code of the ECAT_SSC app.
In HW_EepromReload(), EEPROMReg is initialized to 0, and never updated with the value of ESC_EEPROM_CONTROL_OFFSET.
I does some and-ing with a couple of masks which makes no sense as it is 0.
Then it updates ESC_EEPROM_CONTROL_OFFSET with it's value which is 0.
I hope I have overlooked something.
I have no idea of the implications but just clearing a register seems wrong. I believe a change like the following should be made:
UINT16 EEPROMReg = 0U; /* Regvalue 0x502 - 0x5003 */
+HW_EscReadWord(EEPROMReg,ESC_EEPROM_CONTROL_OFFSET);
UINT32 cmd = (uint32_t)EEPROMReg & (uint32_t)ESC_EEPROM_CMD_MASK;
Just like it is done in the loop.
I see that ecatappl.c, generated by SSC Tool, does exactly this and handles the case where ESC_EEPROM_CONTROL_OFFSET bit 6 is set, which in your code is cleared.
Dave Version: 4.4.2, ECAT_SSC v4_0_26
Hope someone can confirm this so I can make the changes manually.
Best regards Mathias Show Less
DAVE™
Hi there,I am wondering if it is possible to use the ethercat out port as a regular TCP/IP port. I see that the BCM5241XA1 is not listed as a supporte...
Show More
Hi there,
I am wondering if it is possible to use the ethercat out port as a regular TCP/IP port. I see that the BCM5241XA1 is not listed as a supported PHY in the app, but the app does also allow for user defined phys. Has anyone done this before?
Regards
Dave Show Less
I am wondering if it is possible to use the ethercat out port as a regular TCP/IP port. I see that the BCM5241XA1 is not listed as a supported PHY in the app, but the app does also allow for user defined phys. Has anyone done this before?
Regards
Dave Show Less
DAVE™
It happens sometimes,but I couldnt find where the setting is.In normal situation,when start debugging,it stops at first line of main() and i ca...
Show More
It happens sometimes,but I couldnt find where the setting is.
In normal situation,when start debugging,it stops at first line of main() and i can start the program manually. Show Less
In normal situation,when start debugging,it stops at first line of main() and i can start the program manually. Show Less
DAVE™
Greetings from Germany,What I want to achieve seems quite simple but I am have problems.I have one CCU4 with 2 PWM slices controlling 2 MOSFETS. For b...
Show More
Greetings from Germany,
What I want to achieve seems quite simple but I am have problems.
I have one CCU4 with 2 PWM slices controlling 2 MOSFETS. For both PWMs, EVENT_0 "Synchronous Start" is checked in "External Event Settings".
I am controlling POSITIVE OR NEGITIVE current flow.
An ADC_ADV using FAST( 10 bit ) and two channels, (connected to the same ADC pin) provide a POS boundry flag and a NEG boundry flag. These work fine.
POS boundry flag event is connected to one PWM EVENT_2 using TRAP function. NEG boundry flag event is connected to the other PWM EVENT_2
using TRAP function as well.
( each boundry event through an Event Detector/Generator pair )
My desire is that BOTH PWMs Synchronously TRAP at the same time. I.E. when PMW 0 is trapped PWM 1 is also trapped and vice versa.
Dave does not allow me to interconnect/share same Event Generator to both PWMS.
DAVE seems to have restrictions, perhaps a solution using registers or low commands will solve my problem. I have searched the forums without result.
I hope this is clear. I will be glad to clarify.
Thanks, Ken Show Less
What I want to achieve seems quite simple but I am have problems.
I have one CCU4 with 2 PWM slices controlling 2 MOSFETS. For both PWMs, EVENT_0 "Synchronous Start" is checked in "External Event Settings".
I am controlling POSITIVE OR NEGITIVE current flow.
An ADC_ADV using FAST( 10 bit ) and two channels, (connected to the same ADC pin) provide a POS boundry flag and a NEG boundry flag. These work fine.
POS boundry flag event is connected to one PWM EVENT_2 using TRAP function. NEG boundry flag event is connected to the other PWM EVENT_2
using TRAP function as well.
( each boundry event through an Event Detector/Generator pair )
My desire is that BOTH PWMs Synchronously TRAP at the same time. I.E. when PMW 0 is trapped PWM 1 is also trapped and vice versa.
Dave does not allow me to interconnect/share same Event Generator to both PWMS.
DAVE seems to have restrictions, perhaps a solution using registers or low commands will solve my problem. I have searched the forums without result.
I hope this is clear. I will be glad to clarify.
Thanks, Ken Show Less
DAVE™
Hi there,I am using xmc4500 relax kit for my project. I need to use on board 32mbit FL032FIP flash memory to store the data. is there any prgram for i...
Show More
Hi there,
I am using xmc4500 relax kit for my project. I need to use on board 32mbit FL032FIP flash memory to store the data. is there any prgram for it?. i tried to connect the flash with spi master but cannot read from memory. Show Less
I am using xmc4500 relax kit for my project. I need to use on board 32mbit FL032FIP flash memory to store the data. is there any prgram for it?. i tried to connect the flash with spi master but cannot read from memory. Show Less
DAVE™
I know it's been asked for a long time, but there is no example project to demo the usage of encoder interface (A, B, I) for XMC1302. I am using the M...
Show More
I know it's been asked for a long time, but there is no example project to demo the usage of encoder interface (A, B, I) for XMC1302. I am using the MCU board with motor's encoder wires connected to the MCU board directly. The inverter board is not connected.
I found one for XMC4000 https://www.infineonforums.com/threads/3540-XMClib-POSIF-as-Quadrature-encoder-example, and I tried to follow the steps to configure POSIF and CCU4, just to test the encoder itself.
The code files are included in the zip file attached. The three files are used in the PMSM_FOC_SL_XMC13 project.
The encoder wires are connected this way: A to P0.13, B to P1.1, Index to P0.15 and of course 5V and GND. However, when the motor is manually rotated, there is no interrupt.
Would anyone please help to take a look what's wrong in the code? Thanks a lot in advance.
Steve Show Less
I found one for XMC4000 https://www.infineonforums.com/threads/3540-XMClib-POSIF-as-Quadrature-encoder-example, and I tried to follow the steps to configure POSIF and CCU4, just to test the encoder itself.
The code files are included in the zip file attached. The three files are used in the PMSM_FOC_SL_XMC13 project.
The encoder wires are connected this way: A to P0.13, B to P1.1, Index to P0.15 and of course 5V and GND. However, when the motor is manually rotated, there is no interrupt.
Would anyone please help to take a look what's wrong in the code? Thanks a lot in advance.
Steve Show Less