XMC™ Forum Discussions
XMC™
Hello,I am currently using an XMC1400 boot kit. I understand the concept of 'veneers'. The code at 0x00000000 is actually ROM and those entries have h...
Show More
Hello,
I am currently using an XMC1400 boot kit. I understand the concept of 'veneers'. The code at 0x00000000 is actually ROM and those entries have hard coded in them addresses to RAM which contain the actual
address of the interrupt handlers. The default linker script has the flash section starting at 0x10001000. I would like to reserve some space (maybe 64 bytes or so) ahead of this and start the flash area at 0x10001040. Changing the linker
script causes some sort of fault.
If this is achievable, what else am I missing?
Thanks Show Less
I am currently using an XMC1400 boot kit. I understand the concept of 'veneers'. The code at 0x00000000 is actually ROM and those entries have hard coded in them addresses to RAM which contain the actual
address of the interrupt handlers. The default linker script has the flash section starting at 0x10001000. I would like to reserve some space (maybe 64 bytes or so) ahead of this and start the flash area at 0x10001040. Changing the linker
script causes some sort of fault.
If this is achievable, what else am I missing?
Thanks Show Less
XMC™
I think the XMC4700 (and the XMC4800) a great product for motor control, thanks to its flexible and performing devices, but it has a big flaw: it's ju...
Show More
I think the XMC4700 (and the XMC4800) a great product for motor control, thanks to its flexible and performing devices, but it has a big flaw: it's just a 144 MHz Arm M4!
As all of your competitors offer the new microcontrollers with the new Arm M7 (with frequencies of up to 400/500 MHz), I was wondering if Infineon also plans to upgrade the XMC using the M7?
Having to start a new project, I would need to understand which product to orientate, considering the latest news.
Regards
Andrea. Show Less
As all of your competitors offer the new microcontrollers with the new Arm M7 (with frequencies of up to 400/500 MHz), I was wondering if Infineon also plans to upgrade the XMC using the M7?
Having to start a new project, I would need to understand which product to orientate, considering the latest news.
Regards
Andrea. Show Less
XMC™
Max spi rates in the data sheets are cryptic.Is there any xmc11000,1200,1300 where a 64MHz Peripheral clk can be used for something more than on a CCU...
Show More
Max spi rates in the data sheets are cryptic.
Is there any xmc11000,1200,1300 where a 64MHz Peripheral clk can be used for something more than on a CCU4/CCU8?, if not why not just call it what it is, a CCU CLK.
A xmc1100 data sheet mention that shortest spi clk period is 62.5ns so that is equal 16MHz, so is that is the max rate for all xmc1100-1300 (xmc1400 24MHz)? Show Less
Is there any xmc11000,1200,1300 where a 64MHz Peripheral clk can be used for something more than on a CCU4/CCU8?, if not why not just call it what it is, a CCU CLK.
A xmc1100 data sheet mention that shortest spi clk period is 62.5ns so that is equal 16MHz, so is that is the max rate for all xmc1100-1300 (xmc1400 24MHz)? Show Less
XMC™
Hello!I'm trying to establish a communication between an XMC4500 and a computer (Windows) via USB. I downloaded the USB example from Infineon website ...
Show More
Hello!
I'm trying to establish a communication between an XMC4500 and a computer (Windows) via USB. I downloaded the USB example from Infineon website and it comes with a software built in Visual Studio. Is there any possibility of sharing the visual studio project of that interface?
Thanks in advance.
Best Regards,
Persike. Show Less
I'm trying to establish a communication between an XMC4500 and a computer (Windows) via USB. I downloaded the USB example from Infineon website and it comes with a software built in Visual Studio. Is there any possibility of sharing the visual studio project of that interface?
Thanks in advance.
Best Regards,
Persike. Show Less
XMC™
Hi All,im trying to implement a dsd sampling in sync with the pwm of several already synced ccu8 slices. The ccu8 slice 0 generates an event for perio...
Show More
Hi All,
im trying to implement a dsd sampling in sync with the pwm of several already synced ccu8 slices.
The ccu8 slice 0 generates an event for period match and upcounting 1 which i use to triggern an interrupt.
The dsd is configured with additional integrator with 1 blanking sample and as a start 2 integration samples. If i set it to trigger allways every thing works as expected.
What i do not get from the dsd app note and the rm is how to route the CCU8 interrupt event to the dsd integrators trigger input. Does any one have an XMC Lib example for this?
I tryed to use CCU80 ST0 status routed by the ERU to the dsd integrator but i seem to miss something. Please see the code below.
pwm init code:
dsd init code:
regards
Alex Show Less
im trying to implement a dsd sampling in sync with the pwm of several already synced ccu8 slices.
The ccu8 slice 0 generates an event for period match and upcounting 1 which i use to triggern an interrupt.
The dsd is configured with additional integrator with 1 blanking sample and as a start 2 integration samples. If i set it to trigger allways every thing works as expected.
What i do not get from the dsd app note and the rm is how to route the CCU8 interrupt event to the dsd integrators trigger input. Does any one have an XMC Lib example for this?
I tryed to use CCU80 ST0 status routed by the ERU to the dsd integrator but i seem to miss something. Please see the code below.
pwm init code:
const XMC_SCU_CLOCK_CONFIG_t clock_config =
{
.syspll_config.n_div = 80U,
.syspll_config.p_div = 2U,
.syspll_config.k_div = 4U,
.syspll_config.mode = XMC_SCU_CLOCK_SYSPLL_MODE_NORMAL,
.syspll_config.clksrc = XMC_SCU_CLOCK_SYSPLLCLKSRC_OSCHP,
.enable_oschp = true,
.enable_osculp = false,
.calibration_mode = XMC_SCU_CLOCK_FOFI_CALIBRATION_MODE_FACTORY,
.fstdby_clksrc = XMC_SCU_HIB_STDBYCLKSRC_OSI,
.fsys_clksrc = XMC_SCU_CLOCK_SYSCLKSRC_PLL,
.fsys_clkdiv = 1U,
.fcpu_clkdiv = 1U,
.fccu_clkdiv = 1U,
.fperipheral_clkdiv = 1U
};
const XMC_CCU8_SLICE_COMPARE_CONFIG_t slice_config =
{
.timer_mode = (uint32_t)XMC_CCU8_SLICE_TIMER_COUNT_MODE_CA,
.monoshot = (uint32_t)XMC_CCU8_SLICE_TIMER_REPEAT_MODE_REPEAT,
.shadow_xfer_clear = 0U,
.dither_timer_period = 0U,
.dither_duty_cycle = 0U,
.prescaler_mode = (uint32_t)XMC_CCU8_SLICE_PRESCALER_MODE_NORMAL,
.mcm_ch1_enable = 0U,
.mcm_ch2_enable = 0U,
.slice_status = (uint32_t)XMC_CCU8_SLICE_STATUS_CHANNEL_1,
.passive_level_out0 = (uint32_t)XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_LOW,
.passive_level_out1 = (uint32_t)XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_LOW,
.passive_level_out2 = (uint32_t)XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_LOW,
.passive_level_out3 = (uint32_t)XMC_CCU8_SLICE_OUTPUT_PASSIVE_LEVEL_LOW,
.asymmetric_pwm = 0U,
.invert_out0 = 0U,
.invert_out1 = 1U,
.invert_out2 = 0U,
.invert_out3 = 1U,
.prescaler_initval = 0U,
.float_limit = 0U,
.dither_limit = 0U,
.timer_concatenation = 0U,
};
const XMC_CCU8_SLICE_EVENT_CONFIG_t slice_event0_config =
{
.mapped_input = XMC_CCU8_SLICE_INPUT_H, //Connected to SCU.GSC80
.edge = XMC_CCU8_SLICE_EVENT_EDGE_SENSITIVITY_RISING_EDGE,
.level = XMC_CCU8_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_LOW,
.duration = XMC_CCU8_SLICE_EVENT_FILTER_DISABLED,
};
void initialize(void)
{
XMC_GPIO_CONFIG_t config;
/* Ensure clock frequency is set at 120 MHz */
XMC_SCU_CLOCK_Init(&clock_config);
/* Enable CCU8 module */
XMC_CCU8_Init(CCU80, XMC_CCU8_SLICE_MCMS_ACTION_TRANSFER_PR_CR);
/* Start the prescaler */
XMC_CCU8_StartPrescaler(CCU80);
/* Ensure fCCU reaches CCU80 */
XMC_CCU8_SetModuleClock(CCU80, XMC_CCU8_CLOCK_SCU);
/* Configure CCU8x_CC8y slice as timer */
XMC_CCU8_SLICE_CompareInit(CCU80_CC80, &slice_config);
XMC_CCU8_SLICE_CompareInit(CCU80_CC82, &slice_config);
XMC_CCU8_SLICE_CompareInit(CCU80_CC83, &slice_config);
/* Set period match value of the timer */
XMC_CCU8_SLICE_SetTimerPeriodMatch(CCU80_CC80, 1249U);
XMC_CCU8_SLICE_SetTimerPeriodMatch(CCU80_CC82, 1249U);
XMC_CCU8_SLICE_SetTimerPeriodMatch(CCU80_CC83, 1249U);
/* Set timer compare match valuew for channel 1 Duty Cycle */
XMC_CCU8_SLICE_SetTimerCompareMatch(CCU80_CC80,XMC_CCU8_SLICE_COMPARE_CHANNEL_1, 750U);
XMC_CCU8_SLICE_SetTimerCompareMatch(CCU80_CC82,XMC_CCU8_SLICE_COMPARE_CHANNEL_1, 750U);
XMC_CCU8_SLICE_SetTimerCompareMatch(CCU80_CC83,XMC_CCU8_SLICE_COMPARE_CHANNEL_1, 750U);
/* Transfer value from shadow timer registers to actual timer registers */
XMC_CCU8_EnableShadowTransfer(CCU80, XMC_CCU8_SHADOW_TRANSFER_SLICE_0);
XMC_CCU8_EnableShadowTransfer(CCU80, XMC_CCU8_SHADOW_TRANSFER_SLICE_2);
XMC_CCU8_EnableShadowTransfer(CCU80, XMC_CCU8_SHADOW_TRANSFER_SLICE_3);
/* Configure events */
XMC_CCU8_SLICE_ConfigureEvent(CCU80_CC80, XMC_CCU8_SLICE_EVENT_0, &slice_event0_config);
XMC_CCU8_SLICE_ConfigureEvent(CCU80_CC82, XMC_CCU8_SLICE_EVENT_0, &slice_event0_config);
XMC_CCU8_SLICE_ConfigureEvent(CCU80_CC83, XMC_CCU8_SLICE_EVENT_0, &slice_event0_config);
XMC_CCU8_SLICE_StartConfig(CCU80_CC80, XMC_CCU8_SLICE_EVENT_0, XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(CCU80_CC82, XMC_CCU8_SLICE_EVENT_0, XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
XMC_CCU8_SLICE_StartConfig(CCU80_CC83, XMC_CCU8_SLICE_EVENT_0, XMC_CCU8_SLICE_START_MODE_TIMER_START_CLEAR);
/* Enable events */
XMC_CCU8_SLICE_EnableEvent(CCU80_CC80, XMC_CCU8_SLICE_IRQ_ID_PERIOD_MATCH);
XMC_CCU8_SLICE_EnableEvent(CCU80_CC80, XMC_CCU8_SLICE_IRQ_ID_ONE_MATCH);
/* Connect period match and one match event to SR0 */
XMC_CCU8_SLICE_SetInterruptNode(CCU80_CC80, XMC_CCU8_SLICE_IRQ_ID_PERIOD_MATCH, XMC_CCU8_SLICE_SR_ID_0);
XMC_CCU8_SLICE_SetInterruptNode(CCU80_CC80, XMC_CCU8_SLICE_IRQ_ID_ONE_MATCH, XMC_CCU8_SLICE_SR_ID_0);
/* Set NVIC priority */
NVIC_SetPriority(CCU80_0_IRQn, 63U);
/* Enable IRQ */
NVIC_EnableIRQ(CCU80_0_IRQn);
/* Get the slice out of idle mode */
XMC_CCU8_EnableClock(CCU80, 0U);
XMC_CCU8_EnableClock(CCU80, 2U);
XMC_CCU8_EnableClock(CCU80, 3U);
/* Start the PWM on a rising edge on SCU.GSC80 */
XMC_SCU_SetCcuTriggerHigh(XMC_SCU_CCU_TRIGGER_CCU80);
dsd init code:
const XMC_DSD_CH_FILTER_CONFIG_t filter_config0 = {
.clock_divider = XMC_DSD_CH_CLK_DIV_2,
.clock_source = XMC_DSD_CH_CLOCK_SOURCE_A,
.data_source = XMC_DSD_CH_DATA_SOURCE_A_DIRECT,
.decimation_factor = 32U,
.filter_start_value = 32U,
.filter_type = XMC_DSD_CH_FILTER_TYPE_CIC3,
.offset = 0U,
.result_event = XMC_DSD_CH_RESULT_EVENT_DISABLE,
.strobe = XMC_DSD_CH_STROBE_DIRECT_CLOCK_RISE,
};
const XMC_DSD_CH_FILTER_CONFIG_t filter_config1 = {
.clock_divider = XMC_DSD_CH_CLK_DIV_2,
.clock_source = XMC_DSD_CH_CLOCK_SOURCE_B,
.data_source = XMC_DSD_CH_DATA_SOURCE_B_DIRECT,
.decimation_factor = 32U,
.filter_start_value = 32U,
.filter_type = XMC_DSD_CH_FILTER_TYPE_CIC3,
.offset = 0U,
.result_event = XMC_DSD_CH_RESULT_EVENT_DISABLE,
.strobe = XMC_DSD_CH_STROBE_DIRECT_CLOCK_RISE,
};
const XMC_DSD_CH_FILTER_CONFIG_t filter_config2 = {
.clock_divider = XMC_DSD_CH_CLK_DIV_2,
.clock_source = XMC_DSD_CH_CLOCK_SOURCE_A,
.data_source = XMC_DSD_CH_DATA_SOURCE_A_DIRECT,
.decimation_factor = 32U,
.filter_start_value = 32U,
.filter_type = XMC_DSD_CH_FILTER_TYPE_CIC3,
.offset = 0U,
.result_event = XMC_DSD_CH_RESULT_EVENT_DISABLE,
.strobe = XMC_DSD_CH_STROBE_DIRECT_CLOCK_RISE,
};
const XMC_DSD_CH_INTEGRATOR_CONFIG_t integrator_config = {
.counted_values = 2,
.discarded_values = 1,
.integration_loop = 1,
.integrator_trigger = XMC_DSD_CH_TRIGGER_SOURCE_B,
.start_condition = XMC_DSD_CH_INTEGRATOR_START_TRIGGER_RISE,
.stop_condition = XMC_DSD_CH_INTEGRATOR_STOP_END_OF_LOOPS,
};
XMC_ERU_ETL_CONFIG_t pwm_event_generator =
{
.input = ERU1_ETL0_INPUTB_CCU80_ST0,
.source = XMC_ERU_ETL_SOURCE_B,
.edge_detection = XMC_ERU_ETL_EDGE_DETECTION_RISING,
.status_flag_mode = XMC_ERU_ETL_STATUS_FLAG_MODE_HWCTRL,
.enable_output_trigger = true,
.output_trigger_channel = XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL1
};
void initialize(void)
{
XMC_DSD_Enable(DSD);
XMC_DSD_EnableClock(DSD);
XMC_DSD_CH_MainFilter_Init(DSD_CH0, &filter_config0);
XMC_DSD_CH_MainFilter_Init(DSD_CH1, &filter_config1);
XMC_DSD_CH_MainFilter_Init(DSD_CH2, &filter_config2);
XMC_DSD_CH_Integrator_Init(DSD_CH0, &integrator_config);
XMC_DSD_CH_Integrator_Init(DSD_CH1, &integrator_config);
XMC_DSD_CH_Integrator_Init(DSD_CH2, &integrator_config);
XMC_ERU_ETL_Init(ERU0_ETL1, &pwm_event_generator);
XMC_DSD_Start(DSD, XMC_DSD_CH_ID_0 | XMC_DSD_CH_ID_1 | XMC_DSD_CH_ID_2);
}
regards
Alex Show Less
XMC™
Hi.I use the build in ASC BootStrapLoader and need to write a RAM-Code to handle a own Bootloader protocol over the USIC.Is it possible to debug the r...
Show More
Hi.
I use the build in ASC BootStrapLoader and need to write a RAM-Code to handle a own Bootloader protocol over the USIC.
Is it possible to debug the ram code on the Chip, because the build in ASC-BSL from the Chip has to receive the code over uart first,
and than the chip executes the ramcode if the lenght has reached....
If i connect a JLink to the device and try to debug, i havn't the ASC-BSL funktion and i havn't the ramcode present.. ....
What tools can i use for this? I use Dave4 and the OzoneDebugger.
Thanks for help. Show Less
I use the build in ASC BootStrapLoader and need to write a RAM-Code to handle a own Bootloader protocol over the USIC.
Is it possible to debug the ram code on the Chip, because the build in ASC-BSL from the Chip has to receive the code over uart first,
and than the chip executes the ramcode if the lenght has reached....
If i connect a JLink to the device and try to debug, i havn't the ASC-BSL funktion and i havn't the ramcode present.. ....
What tools can i use for this? I use Dave4 and the OzoneDebugger.
Thanks for help. Show Less
XMC™
We are presently working on V/f control of inverter using space vector PWM technique. Along with that I am reading and calculating RMS values Line to ...
Show More
We are presently working on V/f control of inverter using space vector PWM technique. Along with that I am reading and calculating RMS values Line to Line voltages and line currents. I am even calculating the mean values of DC bus and DC current.
We are using XMC4400 F100X256 with P14.6, P14.7,P14.8 for line currents sensing, P14.9,P14.12, P14.13 for the line to line voltages sensing, P15.2, P15.3 for half DC bus sensing and P15.8 for DC current sensing.
The space vector PWM is generated using 2 PWM_CCU8 APPs operating in center aligned mode. I am updating the timing for each sample in space vector, using the event form compare 2 match while counting down(By setting the unused compare 2 register as least compare value possible). The SPACE VECTOR PWM is working fine and giving desired results.
Now I am using 4 ADC_MEASUREMENT_ADV APPs in SCAN SOURCE MODE for measuring since channels are in different ADC groups (P14.6, P14.7 in GROUP -0, P14.8 , P14.9,P14.12,P14.13 in GROUP -1, P15.2,P15.3 in GROUP-2 and P15.8 in GROUP-3). For 3 cycles of the centre aligned clock of PWM_CCU8 APP I am taking 1 sample each of all these measurements. With in 1st Timing cycle of CCU8 I am taking samples of all the line to line voltages, in the 2nd cycle the DC voltage and DC current and in the 3rd Timing cycle taking sample of all the line currents. I am triggering the ADC conversion of each group using software. I am generating a result event using the last channel of each group. With the interrupt service routine I am performing RMS values calculations. As of now I am assuming 50Hz frequency of the AC signals measured. So while calculating RMS values the number of samples taken over each cycle is 66 (For a switching frequency in Space vector as 9900Hz).
The Space vector PWM is working fine and output is also tested in hardware. But When I am trying to measure the line voltages and watch the corresponding expression in DAVE the line voltages and Total DC bus is coming correctly. But the Line currents, Positive DC bus voltage and DC bus current are showing same incorrect value over and over again even when I change the parameters. I have been playing around in DAVE trying all possible settings without any form of success. Also been reading the Device Guide for the ADC, but it has not brought me any closer.
Any suggestions, comments or help is welcome! Show Less
We are using XMC4400 F100X256 with P14.6, P14.7,P14.8 for line currents sensing, P14.9,P14.12, P14.13 for the line to line voltages sensing, P15.2, P15.3 for half DC bus sensing and P15.8 for DC current sensing.
The space vector PWM is generated using 2 PWM_CCU8 APPs operating in center aligned mode. I am updating the timing for each sample in space vector, using the event form compare 2 match while counting down(By setting the unused compare 2 register as least compare value possible). The SPACE VECTOR PWM is working fine and giving desired results.
Now I am using 4 ADC_MEASUREMENT_ADV APPs in SCAN SOURCE MODE for measuring since channels are in different ADC groups (P14.6, P14.7 in GROUP -0, P14.8 , P14.9,P14.12,P14.13 in GROUP -1, P15.2,P15.3 in GROUP-2 and P15.8 in GROUP-3). For 3 cycles of the centre aligned clock of PWM_CCU8 APP I am taking 1 sample each of all these measurements. With in 1st Timing cycle of CCU8 I am taking samples of all the line to line voltages, in the 2nd cycle the DC voltage and DC current and in the 3rd Timing cycle taking sample of all the line currents. I am triggering the ADC conversion of each group using software. I am generating a result event using the last channel of each group. With the interrupt service routine I am performing RMS values calculations. As of now I am assuming 50Hz frequency of the AC signals measured. So while calculating RMS values the number of samples taken over each cycle is 66 (For a switching frequency in Space vector as 9900Hz).
The Space vector PWM is working fine and output is also tested in hardware. But When I am trying to measure the line voltages and watch the corresponding expression in DAVE the line voltages and Total DC bus is coming correctly. But the Line currents, Positive DC bus voltage and DC bus current are showing same incorrect value over and over again even when I change the parameters. I have been playing around in DAVE trying all possible settings without any form of success. Also been reading the Device Guide for the ADC, but it has not brought me any closer.
Any suggestions, comments or help is welcome! Show Less
XMC™
Hi,I am trying to use the 1100 to control stepper motors. In order to take care of dead time I would like to use two timers in center aligned mode. Bu...
Show More
Hi,
I am trying to use the 1100 to control stepper motors. In order to take care of dead time I would like to use two timers in center aligned mode.
But it is not clear to me, how I can synchronize the two timers to get both signals symmetric to the center.
Could anybody help?
Thanks Show Less
I am trying to use the 1100 to control stepper motors. In order to take care of dead time I would like to use two timers in center aligned mode.
But it is not clear to me, how I can synchronize the two timers to get both signals symmetric to the center.
Could anybody help?
Thanks Show Less
XMC™
Hello,I have been fighting to get the ADC to operate in "slow standby" mode on an XMC1300 as defined in section 16.5.1 of the reference manual because...
Show More
Hello,
I have been fighting to get the ADC to operate in "slow standby" mode on an XMC1300 as defined in section 16.5.1 of the reference manual because I am taking infrequent measurements and would like to save power.
Can someone please provide some low level code indicating the steps in order? The reference manual is proving insufficient detail to do this.
What I am finding is that using this code results in zero value measurements:
Thanks,
Jason Show Less
I have been fighting to get the ADC to operate in "slow standby" mode on an XMC1300 as defined in section 16.5.1 of the reference manual because I am taking infrequent measurements and would like to save power.
Can someone please provide some low level code indicating the steps in order? The reference manual is proving insufficient detail to do this.
What I am finding is that using this code results in zero value measurements:
// Converter is running
WR_REG( VADC_G0->ARBCFG, VADC_G_ARBCFG_ANONC_Msk, VADC_G_ARBCFG_ANONC_Pos, 3 );
// Start calibration
SET_BIT( VADC_G0->GLOBCFG, VADC_GLOBCFG_SUCAL_Pos );
// Await completion of calibration
while (RD_REG( VADC_G0->ARBCFG, VADC_G_ARBCFG_CAL_Msk, VADC_G_ARBCFG_CAL_Pos ) == 1) {};
// Converter is running only when requested
WR_REG( VADC_G0->ARBCFG, VADC_G_ARBCFG_ANONC_Msk, VADC_G_ARBCFG_ANONC_Pos, 1 ); //Both 2 and 1 have been tried without luck, 3 works without savings
// Enable conversion based on ANONC settings
WR_REG( SHS0->SHSCFG, SHS_SHSCFG_SCWC_Msk | SHS_SHSCFG_ANOFF_Msk, SHS_SHSCFG_ANOFF_Pos, 8 );
Thanks,
Jason Show Less
Trending discussions