XMC™ Forum Discussions
XMC™
I need your help,I'm going to init an adc on my XMC1200 in DAVE 4.3.2.There are some problems in my Init()://wait till module clock is enabled while((...
Show More
I need your help,
I'm going to init an adc on my XMC1200 in DAVE 4.3.2.
There are some problems in my Init():
//wait till module clock is enabled
while((RD_REG(VADC->CLC, VADC_CLC_DISS_Msk, VADC_CLC_DISS_Pos)) != 0);
//Wait till calibration is complete
while((RD_REG(VADC_G1->ARBCFG, VADC_G_ARBCFG_CAL_Msk, VADC_G_ARBCFG_CAL_Pos)) != 0);
THE LOOP'S ARE ENDLESS !
It works well in Dave3 and in Keil5!?
What is wrong?
Bernd Show Less
I'm going to init an adc on my XMC1200 in DAVE 4.3.2.
There are some problems in my Init():
//wait till module clock is enabled
while((RD_REG(VADC->CLC, VADC_CLC_DISS_Msk, VADC_CLC_DISS_Pos)) != 0);
//Wait till calibration is complete
while((RD_REG(VADC_G1->ARBCFG, VADC_G_ARBCFG_CAL_Msk, VADC_G_ARBCFG_CAL_Pos)) != 0);
THE LOOP'S ARE ENDLESS !
It works well in Dave3 and in Keil5!?
What is wrong?
Bernd Show Less
XMC™
We are using the XMC4500. We have about 50 boards in the department and all can be reprogrammed either with our own application code or the debugger (...
Show More
We are using the XMC4500. We have about 50 boards in the department and all can be reprogrammed either with our own application code or the debugger (ULINK Pro), except for 2 boards, which have suddenly stopped working.
Both show exactly the same error. Both can be erased, but the reprogramming fails from address 0x0C040000. This seems a strange coincidence!
I have tried to understand the Reference Manual on the subject of Flash protection, but I am totally confused.
In Table 8-1 it is shown that the User Configuration Blocks start at address 0x0C000000, this is the same as the start of the Program Flash. Is this address correct?
I do not understand how the 3 UCB relate to the sectors in the Flash.
The Flash Status Register (0x58002010) is set ot zero and all three Flash Protections Configuration Registers are also zero. So it would seem nothing is protected, so why can I not program the Flash? Show Less
Both show exactly the same error. Both can be erased, but the reprogramming fails from address 0x0C040000. This seems a strange coincidence!
I have tried to understand the Reference Manual on the subject of Flash protection, but I am totally confused.
In Table 8-1 it is shown that the User Configuration Blocks start at address 0x0C000000, this is the same as the start of the Program Flash. Is this address correct?
I do not understand how the 3 UCB relate to the sectors in the Flash.
The Flash Status Register (0x58002010) is set ot zero and all three Flash Protections Configuration Registers are also zero. So it would seem nothing is protected, so why can I not program the Flash? Show Less
XMC™
I implemented an CANopen Bootloader running out of PSRAM on a XMC4500 (@60MHz). When I send the CANopen command to erase the application flash (0x0C01...
Show More
I implemented an CANopen Bootloader running out of PSRAM on a XMC4500 (@60MHz). When I send the CANopen command to erase the application flash (0x0C010000..0x0C07FFFF, 484kB), The 500ms heartbeat messages are not send for about 10s (time to erase flash). The heartbeat messages are triggered by the 250us SysTick Interrupt which handles the whole Task system...
The whole Projekt is a bare metal implementation without a operating system, the Tasks are handled by the SW-Interrupts of the NVIC. When the erase command is received a interrupt with Priority 20 is triggered and the ISR handles the flash erase. The CANopen Task is running with a priority of 10 (higher -> this interrupt will interrupt the flash erase task) which is started by the SysTick (Prio 0, highest).
If I replace the code to erase the flash by a 10s long while-loop within the Flash ISR everything works fine. The code to erase the flash does not disable Interrupts or something similar. It writes only the flash command sequences to the When I toggle a pin within the SysTick task I can see on the Oszilloscope that the toggling stops for about 10s (sometimes one SysTick Interrupt is handled).
Is the CPU/SysTick influenced by the flash erase operation?
Thanks for your help!
Best regards Mario Show Less
The whole Projekt is a bare metal implementation without a operating system, the Tasks are handled by the SW-Interrupts of the NVIC. When the erase command is received a interrupt with Priority 20 is triggered and the ISR handles the flash erase. The CANopen Task is running with a priority of 10 (higher -> this interrupt will interrupt the flash erase task) which is started by the SysTick (Prio 0, highest).
If I replace the code to erase the flash by a 10s long while-loop within the Flash ISR everything works fine. The code to erase the flash does not disable Interrupts or something similar. It writes only the flash command sequences to the When I toggle a pin within the SysTick task I can see on the Oszilloscope that the toggling stops for about 10s (sometimes one SysTick Interrupt is handled).
Is the CPU/SysTick influenced by the flash erase operation?
Thanks for your help!
Best regards Mario Show Less
XMC™
Hi, I am new to BLDC. I have BLDC project for fan application, customer request using sinusoidal drive and must be sensor base. I just found BLDC scal...
Show More
Hi, I am new to BLDC. I have BLDC project for fan application, customer request using sinusoidal drive and must be sensor base.
I just found BLDC scalar Hall and FOC code examples on Dave 4. Scalar hall example look are using Trapezoidal control instead of sinusoidal, is there BLDC code example that with hall base and sinusoidal drive ? Show Less
I just found BLDC scalar Hall and FOC code examples on Dave 4. Scalar hall example look are using Trapezoidal control instead of sinusoidal, is there BLDC code example that with hall base and sinusoidal drive ? Show Less
XMC™
Hello everyone!I'm trying to Enable interrupts for reciveing data from UART0 on XMC 2 GO board. Data sending works ok but I can't enable interrupts fo...
Show More
Hello everyone!
I'm trying to Enable interrupts for reciveing data from UART0 on XMC 2 GO board. Data sending works ok but I can't enable interrupts for incoming data. Can you help me with the cosde? I'm using Atollic True Studio and CMSIS Library pack.
I'm trying to Enable interrupts for reciveing data from UART0 on XMC 2 GO board. Data sending works ok but I can't enable interrupts for incoming data. Can you help me with the cosde? I'm using Atollic True Studio and CMSIS Library pack.
Show Less
#include "xmc_uart.h"
#include "xmc_gpio.h"
#include "xmc_scu.h"
#include
#include
#include
volatile uint32_t timer1;
void uart_putchar (char data)
{
XMC_UART_CH_Transmit(XMC_UART0_CH0 , data);
}
void uart_putS (char * data)
{
char znak = 0;
while( (znak = *data++) ) uart_putchar(znak);
}
void SysTick_Handler (void)
{
if(timer1) timer1--;
}
void USIC0_0_IRQHandler (void)
{
}
/* main function */
int main(void)
{
// SystemInit();
// SystemCoreClockUpdate();
XMC_GPIO_CONFIG_t TX_pin =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT6,
.output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH
};
XMC_GPIO_CONFIG_t RX_pin =
{
.mode = XMC_GPIO_MODE_INPUT_TRISTATE,
.input_hysteresis = XMC_GPIO_INPUT_HYSTERESIS_STANDARD,
};
XMC_GPIO_CONFIG_t LED1 =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL,
.output_level = XMC_GPIO_OUTPUT_LEVEL_LOW
};
XMC_GPIO_CONFIG_t LED2 =
{
.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL,
.output_level = XMC_GPIO_OUTPUT_LEVEL_LOW
};
XMC_UART_CH_CONFIG_t UART_board =
{
.baudrate = 9600UL,
.data_bits = 8UL,
.stop_bits = 1UL,
.parity_mode = XMC_USIC_CH_PARITY_MODE_NONE,
};
XMC_USIC_CH_t *uart_0 = XMC_UART0_CH0;
XMC_UART_CH_Init(uart_0, &UART_board);
XMC_UART_CH_SetInputSource(uart_0, XMC_UART_CH_INPUT_RXD1, USIC0_C0_DX3_P2_2);
XMC_UART_CH_Start(uart_0);
USIC0_CH0->INPR &= ~(USIC_CH_INPR_RINP_Msk);
XMC_UART_CH_ClearStatusFlag(uart_0, XMC_UART_CH_STATUS_FLAG_RECEIVE_INDICATION);
XMC_UART_CH_EnableEvent(uart_0, XMC_UART_CH_EVENT_STANDARD_RECEIVE);
NVIC_ClearPendingIRQ(USIC0_0_IRQn);
NVIC_EnableIRQ(USIC0_0_IRQn);
XMC_GPIO_Init( P2_1, &TX_pin );
XMC_GPIO_Init( P2_2, &RX_pin );
XMC_GPIO_EnableDigitalInput(P2_2);
XMC_GPIO_Init( P1_0, &LED1 );
XMC_GPIO_Init( P1_1, &LED2 );
SysTick_Config(SystemCoreClock/1000);
uint8_t licznik = 1;
char itoa_buf[10];
/* Infinite loop */
while (1)
{
if(!timer1)
{
timer1 = 500;
XMC_GPIO_ToggleOutput(P1_0);
XMC_GPIO_ToggleOutput(P1_1);
uart_putS(itoa(licznik++, itoa_buf, 10));
uart_putS("\r\n");
}
}
}
XMC™
Hi everyone,I want to update the compare value of the CCU80 Slice 0 channel 1 via software directly. I am using the XMCLib functions in the following ...
Show More
Hi everyone,
I want to update the compare value of the CCU80 Slice 0 channel 1 via software directly.
I am using the XMCLib functions in the following sequence:
-I configure the Shadow transfer as follows:
XMC_CCU8_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU8_SHADOW_TRANSFER_SLICE_0| \
XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_0));
XMC_CCU8_SLICE_EnableAutomaticShadowTransferRequest(SLICE0_PTR, XMC_CCU8_SLICE_AUTOMAIC_SHADOW_TRANSFER_WRITE_INTO_COMPARE1_SHADOW);
-For changing the compare value I use the following function:
XMC_CCU8_SLICE_SetTimerCompareMatch(SLICE0_PTR,XMC_CCU8_SLICE_COMPARE_CHANNEL_1,(uint16_t) y);
However, it seems that the Duty Cycle is not changing. I suspect that I am not changing well the compare value.
Any help would be highly appreciated Show Less
I want to update the compare value of the CCU80 Slice 0 channel 1 via software directly.
I am using the XMCLib functions in the following sequence:
-I configure the Shadow transfer as follows:
XMC_CCU8_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU8_SHADOW_TRANSFER_SLICE_0| \
XMC_CCU8_SHADOW_TRANSFER_PRESCALER_SLICE_0));
XMC_CCU8_SLICE_EnableAutomaticShadowTransferRequest(SLICE0_PTR, XMC_CCU8_SLICE_AUTOMAIC_SHADOW_TRANSFER_WRITE_INTO_COMPARE1_SHADOW);
-For changing the compare value I use the following function:
XMC_CCU8_SLICE_SetTimerCompareMatch(SLICE0_PTR,XMC_CCU8_SLICE_COMPARE_CHANNEL_1,(uint16_t) y);
However, it seems that the Duty Cycle is not changing. I suspect that I am not changing well the compare value.
Any help would be highly appreciated Show Less
XMC™
Hello,I am very amateur on Infineon XMC1400. Previously i worked on TI MSP430 MCU's.AS a beginner its very overwhelming to digest all the features on ...
Show More
Hello,
I am very amateur on Infineon XMC1400. Previously i worked on TI MSP430 MCU's.
AS a beginner its very overwhelming to digest all the features on this highly advanced MCU.
Can anybody direct me towards starting point for beginner? Show Less
I am very amateur on Infineon XMC1400. Previously i worked on TI MSP430 MCU's.
AS a beginner its very overwhelming to digest all the features on this highly advanced MCU.
Can anybody direct me towards starting point for beginner? Show Less
XMC™
Dear all,I'm using the XMC 4800-F100x2048 chip on a custom build circuit board. And Dave 4.3.2 with the DAVE CE apps. For the ADC results I'm using J-...
Show More
Dear all,
I'm using the XMC 4800-F100x2048 chip on a custom build circuit board. And Dave 4.3.2 with the DAVE CE apps. For the ADC results I'm using J-scope to see actual values of the variables.
For our application we need to convert 4 analog signals (Later even more). Preferably we need the conversion of the ADC signals simultaniously at a frequency of 20kHz. But more important is that the converted values are equal when applied with same input signal.
So i tried the ADC_MEASUREMENT_ADV app and the ADC_MEASUREMENT app. I've noticed that the ADC conversion introduces a noise signal on top of the actual converted signal. This is the case for both apps. I'm using the same input signal for all the 4 analog inputs.
I'm using pins 14.0, 14.2, 14.4 15.8. (15.8 not available on group 0)
What I have seen is that the noise level is depending on the adc group set in the resource list. When I'm using 4 times the same group the noise level is the same for all four groups. But when I use different groups the noise level between all the converted values is different.
That is why I think it has something to do with the adc conversion inside the chip and not with using the Dave apps.
When I want to use the ADC_MEASUREMENT_ADV app and use the sync conversion with three slaves then all inputs need to be at different groups and same chanel, so this wont work for me because of the difference in noise. And when I want the noise level to be the same for all four inputs I'm not free to choose the pins I want to use.
Filtering the signal won't work because the noise is on top of the signal and averaging the signal still keeps a difference between the inputs.
Hopefully I've explained the problem clearly. I've atached a test application that I've used.
Is there any solution for this problem?
Thanks for your help.
Kind regards Nicky Show Less
I'm using the XMC 4800-F100x2048 chip on a custom build circuit board. And Dave 4.3.2 with the DAVE CE apps. For the ADC results I'm using J-scope to see actual values of the variables.
For our application we need to convert 4 analog signals (Later even more). Preferably we need the conversion of the ADC signals simultaniously at a frequency of 20kHz. But more important is that the converted values are equal when applied with same input signal.
So i tried the ADC_MEASUREMENT_ADV app and the ADC_MEASUREMENT app. I've noticed that the ADC conversion introduces a noise signal on top of the actual converted signal. This is the case for both apps. I'm using the same input signal for all the 4 analog inputs.
I'm using pins 14.0, 14.2, 14.4 15.8. (15.8 not available on group 0)
What I have seen is that the noise level is depending on the adc group set in the resource list. When I'm using 4 times the same group the noise level is the same for all four groups. But when I use different groups the noise level between all the converted values is different.
That is why I think it has something to do with the adc conversion inside the chip and not with using the Dave apps.
When I want to use the ADC_MEASUREMENT_ADV app and use the sync conversion with three slaves then all inputs need to be at different groups and same chanel, so this wont work for me because of the difference in noise. And when I want the noise level to be the same for all four inputs I'm not free to choose the pins I want to use.
Filtering the signal won't work because the noise is on top of the signal and averaging the signal still keeps a difference between the inputs.
Hopefully I've explained the problem clearly. I've atached a test application that I've used.
Is there any solution for this problem?
Thanks for your help.
Kind regards Nicky Show Less
XMC™
Hi all,I am currently developing one application for generating PWM signals on a XMC1400 device. For this, I am using a CCU8 slice in Compare mode.It ...
Show More
Hi all,
I am currently developing one application for generating PWM signals on a XMC1400 device. For this, I am using a CCU8 slice in Compare mode.
It would like that the counter of this slice increases with the system clock. Is this possible? If it is, how should I configure the Event for Counting mode?
Thx Show Less
I am currently developing one application for generating PWM signals on a XMC1400 device. For this, I am using a CCU8 slice in Compare mode.
It would like that the counter of this slice increases with the system clock. Is this possible? If it is, how should I configure the Event for Counting mode?
Thx Show Less
XMC™
I use xmc4300 to accept A/B phase signal.But there is not POSIF module in XMC4300. And i can not find POSIF app in the Dave 4.3.2.Is that true there ...
Show More
I use xmc4300 to accept A/B phase signal.
But there is not POSIF module in XMC4300.
And i can not find POSIF app in the Dave 4.3.2.
Is that true there is no posif module in the xmc4300? Show Less
But there is not POSIF module in XMC4300.
And i can not find POSIF app in the Dave 4.3.2.
Is that true there is no posif module in the xmc4300? Show Less