XMC™ Forum Discussions
XMC™
My program puts data into FIFO of USIC. But this data is not immediately transferred to transmitter buffer (USIC.TBUF). Transfer to USIC.TBUF is carri...
Show More
My program puts data into FIFO of USIC. But this data is not immediately transferred to transmitter buffer (USIC.TBUF). Transfer to USIC.TBUF is carried out only by a signal from timer.
Everything works correctly as I want. Except for one little thing: I connected this timer signal (which starts copying USIC.FIFO -> USIC.TBUF) to an external pin. And I see that beginning of start bit (on USIC.TXD) is delayed by ~0.25mcs relative to timer signal.
Why does this delay occur??? I expected edge of start bit will happen synchronously with edge of timer signal.
Clock frequency of timer and USIC == 144MHz. Baudrate of USIC == 1Mbod. Show Less
Everything works correctly as I want. Except for one little thing: I connected this timer signal (which starts copying USIC.FIFO -> USIC.TBUF) to an external pin. And I see that beginning of start bit (on USIC.TXD) is delayed by ~0.25mcs relative to timer signal.
Why does this delay occur??? I expected edge of start bit will happen synchronously with edge of timer signal.
Clock frequency of timer and USIC == 144MHz. Baudrate of USIC == 1Mbod. Show Less
XMC™
there is no surport for EBU peripherel in Dave App about XMC4000 mcu. And it is hard to search any demo for EBU too. I try hard to write some code abo...
Show More
there is no surport for EBU peripherel in Dave App about XMC4000 mcu. And it is hard to search any demo for EBU too.
I try hard to write some code about EBU peripherel , but it did'nt run well,it is dead,the debug led stop to flush.
target:access to multiplexed device. adv#, cs#, rd#,wr#,AD[15:0] signals is used. Show Less
I try hard to write some code about EBU peripherel , but it did'nt run well,it is dead,the debug led stop to flush.
target:access to multiplexed device. adv#, cs#, rd#,wr#,AD[15:0] signals is used. Show Less
XMC™
Hi guys,After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same tim...
Show More
Hi guys,
After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same time with BMI = SWD0? The goal of this would be to communicate over the UART while the firmware is been debug.
uC = XMC1302
Thank you in advance
Pablo Show Less
After reading a lot of papers and webpages I'm a little confused. Question: Can I use the swd interface and the UART interface at the same time with BMI = SWD0? The goal of this would be to communicate over the UART while the firmware is been debug.
uC = XMC1302
Thank you in advance
Pablo Show Less
XMC™
Hi ForumI have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.So yes, i have checked...
Show More
Hi Forum
I have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.
So yes, i have checked all the sample projects and the other threads around those two problems.
My setup is: XM4300 Device (EtherCAT is working fine)
I2C Slave TMP2 and TMP3 (tried both, same result)
Dave version 4.4.2 and newest apps. (I2C Master version 4.1.30)
Now my first problem:
I don`t get the I2C bus running, tried different approaches
On the oscilloscope, there is only repeated bit send, but no communication at all.
I am very confused about the different app versions, dos and don`t and i can`t find any clear tutorial with the newest version.. (also confusing with different parameters/options in the different I2C Master config dialog..
There is also something around regarding the slave address is not 1:1 usable and needs to be converted?
Second problem:
I want to have debug messages. So i tried all the stuff with XMC_DEBUG_ENABLE in preprosessor and the other options that needs to be activated and also checkec this one https://www.infineonforums.com/threads/3489-DAVE-TIP-of-the-day-Semihosting-in-DAVEv4?
.. but then i get compile error and its just not working..
So also there, i can`t find any document/tutorial based on the newest software/app versions.
I really hope you guys can help me, thank you!
Regards
Roman Show Less
I have two problem with my device and after consulting almost whole google and this forum, I`ve created now this thread.
So yes, i have checked all the sample projects and the other threads around those two problems.
My setup is: XM4300 Device (EtherCAT is working fine)
I2C Slave TMP2 and TMP3 (tried both, same result)
Dave version 4.4.2 and newest apps. (I2C Master version 4.1.30)
Now my first problem:
I don`t get the I2C bus running, tried different approaches
#define TMP2_ADDRESS (0x4B)
#define reg_TMP2 (0x00)
I2C_MASTER_Init(&I2C_MASTER_0);
I2C_MASTER_SendStart(&I2C_MASTER_0, TMP2_ADDRESS, XMC_I2C_CH_CMD_WRITE);
I2C_MASTER_SendRepeatedStart(&I2C_MASTER_0, TMP2_ADDRESS, XMC_I2C_CH_CMD_READ);
received_data = I2C_MASTER_GetReceivedByte(&I2C_MASTER_0);
On the oscilloscope, there is only repeated bit send, but no communication at all.
I am very confused about the different app versions, dos and don`t and i can`t find any clear tutorial with the newest version.. (also confusing with different parameters/options in the different I2C Master config dialog..
There is also something around regarding the slave address is not 1:1 usable and needs to be converted?
Second problem:
I want to have debug messages. So i tried all the stuff with XMC_DEBUG_ENABLE in preprosessor and the other options that needs to be activated and also checkec this one https://www.infineonforums.com/threads/3489-DAVE-TIP-of-the-day-Semihosting-in-DAVEv4?
.. but then i get compile error and its just not working..
So also there, i can`t find any document/tutorial based on the newest software/app versions.
I really hope you guys can help me, thank you!
Regards
Roman Show Less
XMC™
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
XMC™
We bought a Kit_XMC48_Relax_ECAT_V1 board and ran the sample program XMC4800 EhterCatAPP SSC Firmware updateSlave Example successfully.We modified the...
Show More
We bought a Kit_XMC48_Relax_ECAT_V1 board and ran the sample program XMC4800 EhterCatAPP SSC Firmware updateSlave Example successfully.
We modified the example code by adding CMSIS RTOS for thread control. We created create two threads.
osThreadId etherCat_thread_id;
void etherCat_thread(void const *argument);
osThreadDef(etherCat_thread, osPriorityNormal, 1U, 512U);
osThreadId etherCat_Isr_id;
void etherCat_Isr_thread(void const *argument);
osThreadDef(etherCat_Isr_thread, osPriorityAboveNormal1, 1U, 512U);
void etherCat_thread(void const *argument) {
while (1) {
MainLoop( );
}
}
void etherCat_Isr_thread(void const *argument) {
while (1) {
osEvent evt1 = osSignalWait (0x0004 osWaitForever);
if (evt1.status == osEventSignal)
PDI_Isr();
}
}
The second thread is for a deferred interrupt handling. The following is the interrupt handler:
void ECAT0_0_IRQHandler(void)
{
osSignalSet (etherCat_Isr_id, 0x0004);
// PDI_Isr( ); // uncomment this line, etherCat_Isr_thread runs fine.
}
When running the program, etherCat_Isr_thread got stuck at osSignalWait and PSI_Isr() in the thread did not get executed. After un-commenting PDI_Isr()
in ECAT0_0_IRQHandler, both PDI_Isr() in the interrupt handler and PDI_Isr() in the thread will get executed. This is not what we expected. We just want
PDI_Isr( ) in the thread get executed but not PDI_Isr() in the interruption handler as it is not under thread control. How can we prevent PDI_Isr() running in the
interrupt handler?
Need your help to solve the problem. If you need any more information or the modified example project, please let us know. Show Less
We modified the example code by adding CMSIS RTOS for thread control. We created create two threads.
osThreadId etherCat_thread_id;
void etherCat_thread(void const *argument);
osThreadDef(etherCat_thread, osPriorityNormal, 1U, 512U);
osThreadId etherCat_Isr_id;
void etherCat_Isr_thread(void const *argument);
osThreadDef(etherCat_Isr_thread, osPriorityAboveNormal1, 1U, 512U);
void etherCat_thread(void const *argument) {
while (1) {
MainLoop( );
}
}
void etherCat_Isr_thread(void const *argument) {
while (1) {
osEvent evt1 = osSignalWait (0x0004 osWaitForever);
if (evt1.status == osEventSignal)
PDI_Isr();
}
}
The second thread is for a deferred interrupt handling. The following is the interrupt handler:
void ECAT0_0_IRQHandler(void)
{
osSignalSet (etherCat_Isr_id, 0x0004);
// PDI_Isr( ); // uncomment this line, etherCat_Isr_thread runs fine.
}
When running the program, etherCat_Isr_thread got stuck at osSignalWait and PSI_Isr() in the thread did not get executed. After un-commenting PDI_Isr()
in ECAT0_0_IRQHandler, both PDI_Isr() in the interrupt handler and PDI_Isr() in the thread will get executed. This is not what we expected. We just want
PDI_Isr( ) in the thread get executed but not PDI_Isr() in the interruption handler as it is not under thread control. How can we prevent PDI_Isr() running in the
interrupt handler?
Need your help to solve the problem. If you need any more information or the modified example project, please let us know. Show Less
XMC™
Hi,I am using the above kit and trying to set or clear the registers as per Infineon-ReferenceManual_XMC4700_XMC4800-UM-v01_03-EN.pdf most of the reg...
Show More
Hi,
I am using the above kit and trying to set or clear the registers as per Infineon-ReferenceManual_XMC4700_XMC4800-UM-v01_03-EN.pdf most of the registers are not working
ex: trying to clear the PSR bits by setting the corresponding bits of PSCR bit and it is not working.
Do the processor mode to be set to supervisory mode to do this operation if then then please suggest how to do it.
Regards
TK Show Less
I am using the above kit and trying to set or clear the registers as per Infineon-ReferenceManual_XMC4700_XMC4800-UM-v01_03-EN.pdf most of the registers are not working
ex: trying to clear the PSR bits by setting the corresponding bits of PSCR bit and it is not working.
Do the processor mode to be set to supervisory mode to do this operation if then then please suggest how to do it.
Regards
TK Show Less
XMC™
HiI tried to change PWM duty using shadow transfer function with PCLK = MCLKx2.So, Automatic transfer is not work, then I write 0x1111 in GCSS registe...
Show More
Hi
I tried to change PWM duty using shadow transfer function with PCLK = MCLKx2.
So, Automatic transfer is not work, then I write 0x1111 in GCSS register.
CC1 to CC3 is work but CC0 doesn't generate pwm when write 1 in LSB of the GCSS register.
when I write 0x1110 to GCSS register, CC0 is work, but I cant using shadow transfer function.
I used DAVE APP and change duty of the PWM CC0 to CC2 in CC3 period match irq.
I attached my project file.
Is there any solution about this? Show Less
I tried to change PWM duty using shadow transfer function with PCLK = MCLKx2.
So, Automatic transfer is not work, then I write 0x1111 in GCSS register.
CC1 to CC3 is work but CC0 doesn't generate pwm when write 1 in LSB of the GCSS register.
when I write 0x1110 to GCSS register, CC0 is work, but I cant using shadow transfer function.
I used DAVE APP and change duty of the PWM CC0 to CC2 in CC3 period match irq.
I attached my project file.
Is there any solution about this? Show Less
XMC™
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
XMC™
Hello,I'm trying to import an existing Simulink Model code into Dave. I used the XMCLib for matlab which includes the periphals such as VADC, CCU4x......
Show More
Hello,
I'm trying to import an existing Simulink Model code into Dave.
I used the XMCLib for matlab which includes the periphals such as VADC, CCU4x...
Since there is literally no info guide about this, I'm having probelms.
Importing the project folder didn't work, for me, even though it worked for someone else in the forum.
I tried importing the model by manually copying all c and h files from
$Project$\Infineon\XMC4400_series\Source\
$Project$\Infineon\XMC4400_series\Include\
$Project$\Lib\
$Project$\Newlib\
and from the top level folder.
This threw the least amount of errors at me.
The Code generation in simulink of the model didn't show any errors.
The Dave console says the following:
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
'Invoking: ARM-GCC C++ Compiler'
};
"C:/Program Files (x86)/DAVE-IDE-4.4.2-64Bit/eclipse/ARM-GCC-49/bin/arm-none-eabi-g++" -MMD -MT "BATT_DCDC_12VFAN_XMC4400.o" -DXMC4400_F100x512 -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/XMCLib/inc" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/CMSIS/Include" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/CMSIS/Infineon/XMC4400_series/Include" -I"C:/Users/Steve/OneDrive - Technische Universität Ilmenau/Docs/5 Poject Porsche/EVALUATION BOARD/BATT_DCDC_12VFAN_XMC4400_xmc_rtw" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Dave/Generated" -I"C:/Users/S...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries" -O0 -ffunction-sections -fdata-sections -Wall -mfloat-abi=softfp -Wa,-adhlns="BATT_DCDC_12VFAN_XMC4400.o.lst" -fno-exceptions -fno-rtti -pipe -c -fmessage-length=0 -MMD -MP -MF"BATT_DCDC_12VFAN_XMC4400.d" -MT"BATT_DCDC_12VFAN_XMC4400.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g -gdwarf-2 -o "BATT_DCDC_12VFAN_XMC4400.o" "../BATT_DCDC_12VFAN_XMC4400.cpp"
^
subdir.mk:166: recipe for target 'BATT_DCDC_12VFAN_XMC4400.o' failed
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: error: too many initializers for 'XMC_VADC_CHANNEL_CONFIG_t {aka XMC_VADC_CHANNEL_CONFIG}'
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
};
^
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: error: too many initializers for 'XMC_VADC_CHANNEL_CONFIG_t {aka XMC_VADC_CHANNEL_CONFIG}'
../BATT_DCDC_12VFAN_XMC4400.cpp:117:1: sorry, unimplemented: non-trivial designated initializers not supported
};
^
and the same for all the following initiazations....
This is the BATT_DCDC_12VFAN_XMC4400.cpp file:
//
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
//
// File: BATT_DCDC_12VFAN_XMC4400.cpp
//
// Code generated for Simulink model : BATT_DCDC_12VFAN_XMC4400.
// Model version : 1.30
// Simulink Coder version : 9.3 (R2020a) 18-Nov-2019
// TLC version : 9.3 (Jan 23 2020)
// C/C++ source code generated on : Tue Oct 6 22:02:20 2020
//
// Target selection: Infineon_XMC_Family.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex
// Code generation objectives: Unspecified
// Validation result: Not run
//
#include "BATT_DCDC_12VFAN_XMC4400.h"
#include "BATT_DCDC_12VFAN_XMC4400_private.h"
// Global variable definition for Interrupt
#define INTSR_22 IRQ_Hdlr_22
// Block signals (default storage)
B_BATT_DCDC_12VFAN_XMC4400_T BATT_DCDC_12VFAN_XMC4400_B;
// Block states (default storage)
DW_BATT_DCDC_12VFAN_XMC4400_T BATT_DCDC_12VFAN_XMC4400_DW;
// Real-time model
RT_MODEL_BATT_DCDC_12VFAN_XMC_T BATT_DCDC_12VFAN_XMC4400_M_ =
RT_MODEL_BATT_DCDC_12VFAN_XMC_T();
RT_MODEL_BATT_DCDC_12VFAN_XMC_T *const BATT_DCDC_12VFAN_XMC4400_M =
&BATT_DCDC_12VFAN_XMC4400_M_;
// Channel 0 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch0_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 0,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
uint8_t regG1Ch0;
// Channel 1 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch1_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 1,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
uint8_t regG1Ch1;
// Channel 2 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch2_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 2,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
.
.
.
I included the cpp file in the attachements
I see now, that importing my project worked, but obviously my periphals aren't configured correctly. My mistake.
Can still someone help me at configuring VADC and CCU4 on which configs are missing? Show Less
I'm trying to import an existing Simulink Model code into Dave.
I used the XMCLib for matlab which includes the periphals such as VADC, CCU4x...
Since there is literally no info guide about this, I'm having probelms.
Importing the project folder didn't work, for me, even though it worked for someone else in the forum.
I tried importing the model by manually copying all c and h files from
$Project$\Infineon\XMC4400_series\Source\
$Project$\Infineon\XMC4400_series\Include\
$Project$\Lib\
$Project$\Newlib\
and from the top level folder.
This threw the least amount of errors at me.
The Code generation in simulink of the model didn't show any errors.
The Dave console says the following:
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
'Invoking: ARM-GCC C++ Compiler'
};
"C:/Program Files (x86)/DAVE-IDE-4.4.2-64Bit/eclipse/ARM-GCC-49/bin/arm-none-eabi-g++" -MMD -MT "BATT_DCDC_12VFAN_XMC4400.o" -DXMC4400_F100x512 -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/XMCLib/inc" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/CMSIS/Include" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries/CMSIS/Infineon/XMC4400_series/Include" -I"C:/Users/Steve/OneDrive - Technische Universität Ilmenau/Docs/5 Poject Porsche/EVALUATION BOARD/BATT_DCDC_12VFAN_XMC4400_xmc_rtw" -I"C:/Users/...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Dave/Generated" -I"C:/Users/S...___.../BATT_DCDC_12VFAN_XMC4400_xmc_rtw/Libraries" -O0 -ffunction-sections -fdata-sections -Wall -mfloat-abi=softfp -Wa,-adhlns="BATT_DCDC_12VFAN_XMC4400.o.lst" -fno-exceptions -fno-rtti -pipe -c -fmessage-length=0 -MMD -MP -MF"BATT_DCDC_12VFAN_XMC4400.d" -MT"BATT_DCDC_12VFAN_XMC4400.o" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g -gdwarf-2 -o "BATT_DCDC_12VFAN_XMC4400.o" "../BATT_DCDC_12VFAN_XMC4400.cpp"
^
subdir.mk:166: recipe for target 'BATT_DCDC_12VFAN_XMC4400.o' failed
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:61:1: error: too many initializers for 'XMC_VADC_CHANNEL_CONFIG_t {aka XMC_VADC_CHANNEL_CONFIG}'
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
};
^
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: sorry, unimplemented: non-trivial designated initializers not supported
../BATT_DCDC_12VFAN_XMC4400.cpp:89:1: error: too many initializers for 'XMC_VADC_CHANNEL_CONFIG_t {aka XMC_VADC_CHANNEL_CONFIG}'
../BATT_DCDC_12VFAN_XMC4400.cpp:117:1: sorry, unimplemented: non-trivial designated initializers not supported
};
^
and the same for all the following initiazations....
This is the BATT_DCDC_12VFAN_XMC4400.cpp file:
//
// Academic License - for use in teaching, academic research, and meeting
// course requirements at degree granting institutions only. Not for
// government, commercial, or other organizational use.
//
// File: BATT_DCDC_12VFAN_XMC4400.cpp
//
// Code generated for Simulink model : BATT_DCDC_12VFAN_XMC4400.
// Model version : 1.30
// Simulink Coder version : 9.3 (R2020a) 18-Nov-2019
// TLC version : 9.3 (Jan 23 2020)
// C/C++ source code generated on : Tue Oct 6 22:02:20 2020
//
// Target selection: Infineon_XMC_Family.tlc
// Embedded hardware selection: ARM Compatible->ARM Cortex
// Code generation objectives: Unspecified
// Validation result: Not run
//
#include "BATT_DCDC_12VFAN_XMC4400.h"
#include "BATT_DCDC_12VFAN_XMC4400_private.h"
// Global variable definition for Interrupt
#define INTSR_22 IRQ_Hdlr_22
// Block signals (default storage)
B_BATT_DCDC_12VFAN_XMC4400_T BATT_DCDC_12VFAN_XMC4400_B;
// Block states (default storage)
DW_BATT_DCDC_12VFAN_XMC4400_T BATT_DCDC_12VFAN_XMC4400_DW;
// Real-time model
RT_MODEL_BATT_DCDC_12VFAN_XMC_T BATT_DCDC_12VFAN_XMC4400_M_ =
RT_MODEL_BATT_DCDC_12VFAN_XMC_T();
RT_MODEL_BATT_DCDC_12VFAN_XMC_T *const BATT_DCDC_12VFAN_XMC4400_M =
&BATT_DCDC_12VFAN_XMC4400_M_;
// Channel 0 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch0_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 0,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
uint8_t regG1Ch0;
// Channel 1 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch1_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 1,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
uint8_t regG1Ch1;
// Channel 2 Configuration
XMC_VADC_CHANNEL_CONFIG_t ch2_config_g1 = {
.input_class = XMC_VADC_CHANNEL_CONV_GROUP_CLASS0,
.event_gen_criteria = XMC_VADC_CHANNEL_EVGEN_NEVER,
.sync_conversion = true,
.result_reg_number = 2,
.use_global_result = false,
.result_alignment = XMC_VADC_RESULT_ALIGN_RIGHT,
.broken_wire_detect_channel = XMC_VADC_CHANNEL_BWDCH_VAGND,
.broken_wire_detect = false,
.channel_priority = false,
.alias_channel = XMC_VADC_CHANNEL_ALIAS_DISABLED,
.boundary_flag_mode_ch0 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch0 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch0 = false,
.boundary_flag_mode_ch1 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch1 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch1 = false,
.boundary_flag_mode_ch2 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch2 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch2 = false,
.boundary_flag_mode_ch3 = XMC_VADC_GROUP_BOUNDARY_FLAG_MODE_DISABLED,
.flag_output_condition_ch3 = XMC_VADC_CHANNEL_BOUNDARY_CONDITION_ABOVE_BAND,
.invert_boundary_flag_ch3 = false,
};
.
.
.
I included the cpp file in the attachements
I see now, that importing my project worked, but obviously my periphals aren't configured correctly. My mistake.
Can still someone help me at configuring VADC and CCU4 on which configs are missing? Show Less