XMC™ Forum Discussions
XMC™
Hello,I would like to generate two Inverleaving (PUSHPULL) PWM signals with same duty cycle.how can i achieve using PWM CCU8?see attached picture of w...
Show More
Hello,
I would like to generate two Inverleaving (PUSHPULL) PWM signals with same duty cycle.
how can i achieve using PWM CCU8?
see attached picture of waveform. Show Less
I would like to generate two Inverleaving (PUSHPULL) PWM signals with same duty cycle.
how can i achieve using PWM CCU8?
see attached picture of waveform. Show Less
XMC™
Hello,Is it possible to write/erase flash logical and physical sectors of XMC internal flash when the program is running from other flash sectors? Are...
Show More
Hello,
Is it possible to write/erase flash logical and physical sectors of XMC internal flash when the program is running from other flash sectors? Are there any implications/restrictions?
rum Show Less
Is it possible to write/erase flash logical and physical sectors of XMC internal flash when the program is running from other flash sectors? Are there any implications/restrictions?
rum Show Less
XMC™
I am trying to generate a PWM with a 32Bit resolution and 50% duty-cycle on P3.7 using CCU41_CC42 and CCU41_CC43. I wrote the following code to initia...
Show More
I am trying to generate a PWM with a 32Bit resolution and 50% duty-cycle on P3.7 using CCU41_CC42 and CCU41_CC43. I wrote the following code to initialize the hardware:
The following function is used to set the period and duty-cycle (fixed to 50%):
This all works fine with a period up to 0xFFFF. Everything above that (more than 16Bit set) deactivates the PWM output. Using the debugger I can see that the timer itself is running and the registers are set correctly. What am I doing wrong? Show Less
const XMC_GPIO_CONFIG_t PWM_pin_config =
{
XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT3, //Mode
XMC_GPIO_OUTPUT_LEVEL_LOW, //level
XMC_GPIO_OUTPUT_STRENGTH_MEDIUM //strength
};
XMC_GPIO_Init(P3_7, &PWM_pin_config);
XMC_CCU4_SLICE_COMPARE_CONFIG_t SLICE_config;
SLICE_config.timer_mode = (uint32_t) XMC_CCU4_SLICE_TIMER_COUNT_MODE_EA;
SLICE_config.monoshot = (uint32_t) false;
SLICE_config.shadow_xfer_clear = (uint32_t) 0;
SLICE_config.dither_timer_period = (uint32_t) 0;
SLICE_config.dither_duty_cycle = (uint32_t) 0;
SLICE_config.prescaler_mode = (uint32_t) XMC_CCU4_SLICE_PRESCALER_MODE_NORMAL;
SLICE_config.mcm_enable = (uint32_t) 0;
SLICE_config.prescaler_initval = (uint32_t) XMC_CCU4_SLICE_PRESCALER_1;
SLICE_config.float_limit = (uint32_t) 0;
SLICE_config.dither_limit = (uint32_t) 0;
SLICE_config.passive_level = (uint32_t) XMC_CCU4_SLICE_OUTPUT_PASSIVE_LEVEL_LOW;
SLICE_config.timer_concatenation = (uint32_t) 0;
XMC_CCU4_Init(CCU41, XMC_CCU4_SLICE_MCMS_ACTION_TRANSFER_PR_CR);
XMC_CCU4_StartPrescaler(CCU41);
XMC_CCU4_SetModuleClock(CCU41, XMC_CCU4_CLOCK_SCU);
XMC_CCU4_SLICE_CompareInit(CCU41_CC42, &SLICE_config);
SLICE_config.timer_concatenation = 1;
XMC_CCU4_SLICE_CompareInit(CCU41_CC43, &SLICE_config);
XMC_CCU4_SLICE_StartTimer(CCU41_CC42);
XMC_CCU4_SLICE_StartTimer(CCU41_CC43);
The following function is used to set the period and duty-cycle (fixed to 50%):
void setPeriod(std::uint32_t period)
{
const uint32_t compare = period/2; //50% PWM
XMC_CCU4_SLICE_SetTimerPeriodMatch(CCU41_CC42, static_cast(period & 0xFFFF));
XMC_CCU4_SLICE_SetTimerPeriodMatch(CCU41_CC43, static_cast(period >> 16));
XMC_CCU4_SLICE_SetTimerCompareMatch(CCU41_CC42, static_cast(compare & 0xFFFF));
XMC_CCU4_SLICE_SetTimerCompareMatch(CCU41_CC43, static_cast(compare >> 16));
XMC_CCU4_EnableShadowTransfer(CCU41, XMC_CCU4_SHADOW_TRANSFER_SLICE_2);
XMC_CCU4_EnableShadowTransfer(CCU41, XMC_CCU4_SHADOW_TRANSFER_SLICE_3);
}
This all works fine with a period up to 0xFFFF. Everything above that (more than 16Bit set) deactivates the PWM output. Using the debugger I can see that the timer itself is running and the registers are set correctly. What am I doing wrong? Show Less
XMC™
Hello all,I have question regarding changing Dave app parameter on the fly.I am using BUCK_VC_FIX_FQ app where there is Vout reference parameter which...
Show More
Hello all,
I have question regarding changing Dave app parameter on the fly.
I am using BUCK_VC_FIX_FQ app where there is Vout reference parameter which is currently set at 2V (see attached picture).
In our product, when Vout ref is 2V the output of Buck app is 200Vdc and when ref is 4V output is 400Vdc.
Is there a way we can change Vout ref based on I/O pin status on the fly. For e.g. when Pin status is High set Vout ref 2V and when low set 4V.
Thanks,
Show Less
I have question regarding changing Dave app parameter on the fly.
I am using BUCK_VC_FIX_FQ app where there is Vout reference parameter which is currently set at 2V (see attached picture).
In our product, when Vout ref is 2V the output of Buck app is 200Vdc and when ref is 4V output is 400Vdc.
Is there a way we can change Vout ref based on I/O pin status on the fly. For e.g. when Pin status is High set Vout ref 2V and when low set 4V.
Thanks,
Show Less
XMC™
Hello,I have a project to make flicker simulation. I use Arduino shield RGB XMC1202.I try to make a square wave with changing CURRENT parameter at Red...
Show More
Hello,
I have a project to make flicker simulation. I use Arduino shield RGB XMC1202.
I try to make a square wave with changing CURRENT parameter at Red channel but there is time to take 0-100% Current.
I read infineon manual board on page 31 there is information that
Is this information and what I make is related? Can I make fast changing current from 0-100% instantly?
I already try this way from the previous thread but nothing change.
I hope someone can help me with this.
Best regards
Eko Show Less
I have a project to make flicker simulation. I use Arduino shield RGB XMC1202.
I try to make a square wave with changing CURRENT parameter at Red channel but there is time to take 0-100% Current.
I read infineon manual board on page 31 there is information that
Fade Time 0 -> 100%
It takes 20479 dimming clocks for the lamp to dim up from 0 to 100% brightness. The dimming clock frequency is 292.237kHz.
Hence, 20479 dimming clock last approximately 0.07001s.
Fade Time = FADERATE * 0.07001s
A FADERATE value of 0xA leads to a fade time of approximately 700ms
Is this information and what I make is related? Can I make fast changing current from 0-100% instantly?
I already try this way from the previous thread but nothing change.
I hope someone can help me with this.
Best regards
Eko Show Less
XMC™
Hello, I have one question regarding the Infineon Arduino Shield shield with an XMC1202, KITLEDXMC1202AS01TOBO1 Does anyone know why it is not possibl...
Show More
Hello, I have one question regarding the Infineon Arduino Shield shield with an XMC1202, KITLEDXMC1202AS01TOBO1
Does anyone know why it is not possible to set WALKTIME lower than 15?
This code:
I2CWRITE2BYTES (ADDRESS, WALKTIME, 25);
works fine, while this code:
I2CWRITE2BYTES (ADDRESS, WALKTIME, 5)
sets the walktime to 15.
I suppose there is some coding in the XMC1202 itself?
I need to switch off the walktime entirely, so any help would be appreciated very much.
Thanks a lot! Show Less
Does anyone know why it is not possible to set WALKTIME lower than 15?
This code:
I2CWRITE2BYTES (ADDRESS, WALKTIME, 25);
works fine, while this code:
I2CWRITE2BYTES (ADDRESS, WALKTIME, 5)
sets the walktime to 15.
I suppose there is some coding in the XMC1202 itself?
I need to switch off the walktime entirely, so any help would be appreciated very much.
Thanks a lot! Show Less
XMC™
Hi, I have to report, that variable "days_of_week" is not updated caused by missing time_val.daysofweek=current_time->daysofweek; in rtc.c at line 2...
Show More
Hi, I have to report, that variable "days_of_week" is not updated caused by missing
time_val.daysofweek=current_time->daysofweek; in rtc.c at line 288+1
existing Code in Function RTC_GetTime()
/* copy to local structure to keep data safe */
time_val.year = current_time->year;
time_val.month = current_time->month;
time_val.days = current_time->days;
time_val.hours = current_time->hours;
time_val.minutes = current_time->minutes;
time_val.seconds = current_time->seconds;
//pls. add following line to function RTC_SetTime()
time_val.daysofweek=current_time->daysofweek;
In RTC_GetTime(), days_of_week is already provided, but is always 0;
System: DAVE V4.3.2,
APP: RTC_0 4.1.12
µC: XMC4500
Function: RTC_SetTime() Show Less
time_val.daysofweek=current_time->daysofweek; in rtc.c at line 288+1
existing Code in Function RTC_GetTime()
/* copy to local structure to keep data safe */
time_val.year = current_time->year;
time_val.month = current_time->month;
time_val.days = current_time->days;
time_val.hours = current_time->hours;
time_val.minutes = current_time->minutes;
time_val.seconds = current_time->seconds;
//pls. add following line to function RTC_SetTime()
time_val.daysofweek=current_time->daysofweek;
In RTC_GetTime(), days_of_week is already provided, but is always 0;
System: DAVE V4.3.2,
APP: RTC_0 4.1.12
µC: XMC4500
Function: RTC_SetTime() Show Less
XMC™
Hi,
I need to buy a debuger for XMC 1302 Microcontroller. Any recommendation?
thanks,
I need to buy a debuger for XMC 1302 Microcontroller. Any recommendation?
thanks,
XMC™
Hi, I am trying to do some modifications for uart drivers for xmc4800 (on relax kit xmc 4800) and extending them to LIN drivers. When I followed the d...
Show More
Hi, I am trying to do some modifications for uart drivers for xmc4800 (on relax kit xmc 4800) and extending them to LIN drivers.
When I followed the documentation of Infineon reference manual for LIN support, in page 18-72 under
18.3.5 Hardware LIN Support gave some explaination as follows:
A complete LIN frame contains the following symbols:
• Synchronization break:
The master sends a synchronization break to signal the beginning of a new frame. It
contains at least 13 consecutive bit times at 0 level, followed by at least one bit time
at 1 level (corresponding to 1 stop bit). Therefore, TBUF11 if the transmit buffer is
used, (or IN11 if the FIFO buffer is used) has to be written with 0 (leading to a frame
with SOF followed by 12 data bits at 0 level).
A slave device shall detect 11 consecutive bit times at 0 level, which done by the
synchronization break detection. Bit PSR.SBD is set if such an event is detected and
a protocol interrupt can be generated. Additionally, the received data value of 0
appears in the receive buffer and a format error is signaled.
Following that I have made changes in the following lines of code.
into following lines of code
But I am unable to generate break field for LIN following the documentation. Can anyone help in this. Show Less
When I followed the documentation of Infineon reference manual for LIN support, in page 18-72 under
18.3.5 Hardware LIN Support gave some explaination as follows:
A complete LIN frame contains the following symbols:
• Synchronization break:
The master sends a synchronization break to signal the beginning of a new frame. It
contains at least 13 consecutive bit times at 0 level, followed by at least one bit time
at 1 level (corresponding to 1 stop bit). Therefore, TBUF11 if the transmit buffer is
used, (or IN11 if the FIFO buffer is used) has to be written with 0 (leading to a frame
with SOF followed by 12 data bits at 0 level).
A slave device shall detect 11 consecutive bit times at 0 level, which done by the
synchronization break detection. Bit PSR.SBD is set if such an event is detected and
a protocol interrupt can be generated. Additionally, the received data value of 0
appears in the receive buffer and a format error is signaled.
Following that I have made changes in the following lines of code.
if ( !(USIC_CH_TCSR_TDV_Msk & tmp_pChannel->TCSR) )
{
tmp_pChannel->TBUF[0] = ((arg_ByteToSend << USIC_CH_TBUF_TDATA_Pos) & USIC_CH_TBUF_TDATA_Msk);
}
into following lines of code
int j =0;
while(j<12)
{
//tmp_pChannel->TBUF&= ~(1 << tmp_pChannel->TBUF );
tmp_pChannel->TBUF=0;
j++;
}
if ( !(USIC_CH_TCSR_TDV_Msk & tmp_pChannel->TCSR) )
{
tmp_pChannel->TBUF[12] = ((arg_ByteToSend << USIC_CH_TBUF_TDATA_Pos) & USIC_CH_TBUF_TDATA_Msk);
}
But I am unable to generate break field for LIN following the documentation. Can anyone help in this. Show Less
XMC™
Hello everyone! I'm now using MATLAB/Simulink to develop my algorithm and plan to verify it on an XMC4700 microcontroller.I just want to know, if XMC ...
Show More
Hello everyone!
I'm now using MATLAB/Simulink to develop my algorithm and plan to verify it on an XMC4700 microcontroller.
I just want to know, if XMC Library for Embedded Coder supports PIL test. If yes, what is the workflow? Are there some tutorials from Infineon?
Best regards,
qiu Show Less
I'm now using MATLAB/Simulink to develop my algorithm and plan to verify it on an XMC4700 microcontroller.
I just want to know, if XMC Library for Embedded Coder supports PIL test. If yes, what is the workflow? Are there some tutorials from Infineon?
Best regards,
qiu Show Less