XMC™ Forum Discussions
3 phase motor 2ea FOC control
- Difference in gate control signal method
MCU: XMC4400
a . Use 12 DAVE app 'PWM_CCU8' → CCU8 *12
b . Use 2 DAVE app 'PWM_SVM' → CCU8 *12 + Enable, Trap
When developing motor control SW,
1. please explain the difference in control method when designing 'PWM_CCU8' and 'PWM_SVM' in DAVE app.
2. If you have a 2 motor FOC control example, please share.
Show Less
Hi All,
Does anyone knows the max voltage of XMC1302 GPIO can output?
In my PCB, I connected a Nmos Gate to XMC GPIO, Nmos Source to GND, Nmos Drain to another IC's Chip enable pin which has 4V (active high, pull this pin to logic low can disable the chip).
I want to control the IC's enable/disable. But when I pull up the GPIO, only about 0.9V I got. Can't reach the GS threshold voltage. (Min 1.0V, typ 1.75V)
Thanks.
Show LessDear Receive,
How to build a selected file in DAVE 4.5...?!
I found there is a function that can be built a selected file but when I pressed it and no any response.
Please check the attached file...
Thank you so much.
Show LessI can't get an Interrupt to work with the XMC4800 Controller.
The rising edge of Pin 0.9 is supposed to trigger the interrupt, please tell me where i am mistaking:
//Setting p0.9 as Input
XMC_GPIO_SetMode(XMC_GPIO_PORT0, 9,XMC_GPIO_MODE_INPUT_PULL_DOWN);
//ERU Config
XMC_ERU_ETL_CONFIG_t eruInit;
eruInit.input_b = ERU0_ETL1_INPUTB_P0_9;
eruInit.edge_detection = XMC_ERU_ETL_EDGE_DETECTION_RISING;
eruInit.enable_output_trigger = true;
eruInit.output_trigger_channel = XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL0;
//OGU Config
XMC_ERU_OGU_CONFIG_t oguInit;
oguInit.service_request = XMC_ERU_OGU_SERVICE_REQUEST_ON_TRIGGER;
//ERU and OGU Init:
XMC_ERU_ETL_Init(ERU0_ETL1, &eruInit);
XMC_ERU_OGU_Init(ERU0_OGU0, &oguInit);
//enable Interrupt
NVIC_SetPriority(ERU0_0_IRQn,3);
NVIC_EnableIRQ(ERU0_0_IRQn);
and then my IRQ Handler:
void ERU0_0_IRQHandler(void)
{
//set breakpoint and be happy when the code arrives here
}
Do I use the right ERU, ETL, OGU? Is everything configured properly? I read something that I have to call a Method "ClearEventStatus" in xmc4800, but I don't know what could be a valid argument.
Show LessThe UART can send data but cannot receive data. The UART port uses P2.0 and P2.1. The following is my code. Can you explain what went wrong? Thank you!
#include "xmc_gpio.h"
#include "xmc_uart.h"
#define TICKS_PER_SECOND 1000
#define TICKS_WAIT 1000
const uint8_t message[] = "Hello world!!\n";
XMC_GPIO_CONFIG_t led1_config;
XMC_GPIO_CONFIG_t rx_pin_config;
XMC_GPIO_CONFIG_t tx_pin_config;
XMC_UART_CH_CONFIG_t uart_config;
int main(void)
{
/* Configure LED1 */
led1_config.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL;
XMC_GPIO_Init(XMC_GPIO_PORT0,6, &led1_config);
/* UART configuration */
uart_config.data_bits = 8U;
uart_config.stop_bits = 1U;
uart_config.baudrate = 115200;
/* Configure RX pin */
rx_pin_config.mode = XMC_GPIO_MODE_INPUT_INVERTED_TRISTATE;
XMC_GPIO_Init(XMC_GPIO_PORT2,1, &rx_pin_config);
XMC_UART_CH_SetInputSource(XMC_UART0_CH0,XMC_UART_CH_INPUT_RXD,USIC0_C0_DX0_P2_1);
/* Configure UART channel */
XMC_UART_CH_Init(XMC_UART0_CH0, &uart_config);
/* Start UART channel */
XMC_UART_CH_Start(XMC_UART0_CH0);
/* Configure TX pin */
tx_pin_config.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT6;
XMC_GPIO_Init(XMC_GPIO_PORT2,0, &tx_pin_config);
/* Send a message via UART periodically */
SysTick_Config(SystemCoreClock / TICKS_PER_SECOND);
while(1)
{
/* Infinite loop */
uint16_t recvdata=XMC_UART_CH_GetReceivedData(XMC_UART0_CH0);
if(recvdata!=0)
{
XMC_UART_CH_Transmit(XMC_UART0_CH0, recvdata);
}
}
}
Show Less
Hi,
I am developing a board with XMC1400 micro. Can you explain how to output printf() to one of the serial uart ports? I looked at some examples but they all use Jlink connection and DAVE IDE console.
Thanks,
mh09
Show LessHello
I want to use the XMC family of microcontrollers (xmc1000 and xmc4000) but I only have J-Link BASE and J-Link EDU Mini programmer, I have two questions.
- Can I use any of these two programmers with the XMC family? -
Where can I find the programming pins of these microcontrollers?
Thanks for the help
Show LessHi,
I followed this link to enable XMC_DEBUG/printf() function.
However, I got this error at the end. Can you guide me to resolve this? Thank you
<Error content>
"\"C:\\Infineon\\Tools\\DAVE IDE\\4.5.0.202105191637\\eclipse\\ARM-GCC-49\\bin\\make\"" --output-sync -j8 all
arm-none-eabi-gcc: fatal error: c:/infineon/tools/dave ide/4.5.0.202105191637/eclipse/arm-gcc-49/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/nosys.specs: attempt to rename spec 'link_gcc_c_sequence' to already defined spec 'nosys_link_gcc_c_sequence'
'Building target: 1300_LC.elf'
compilation terminated.
'Invoking: ARM-GCC C Linker'
make: *** [1300_LC.elf] Error 1
"C:/Infineon/Tools/DAVE IDE/4.5.0.202105191637/eclipse/ARM-GCC-49/bin/arm-none-eabi-gcc" -T"../linker_script.ld" -nostartfiles -Xlinker --gc-sections -specs=nano.specs -specs=nosys.specs -u _printf_float -u _scanf_float -Wl,-Map,"1300_LC.map" -specs=rdimon.specs -specs=nosys.specs -mcpu=cortex-m0 -mthumb -g -gdwarf-2 -o "1300_LC.elf" "@objects.rsp" -lm
makefile:54: recipe for target '1300_LC.elf' failed
Hi, I would like to know what is the expected total ADC error rate for the part number XMC1402Q048X0032AAXUMA1.Along with that I would Iike to know whether the error rate is after calibration is done or not.
Show LessHello everyone,
I am trying to make the following code run. After building there seems to be no error and everything looks fine.
#include <DAVE.h>
// int8_t RxBuffer[64] = { 0 };
// int8_t TxBuffer[64] = { 0 };
uint8_t Bytes;
uint32_t event_count;
uint32_t result_Isignal;
uint32_t i = 0;
bool Isignalstatus = 0;
int8_t TxBuffer[64];
int main(void)
{
DAVE_STATUS_t status;
status = DAVE_Init();
if (status == DAVE_STATUS_FAILURE)
{
XMC_DEBUG(("DAVE Apps initialization failed with status %d\n", status));
while (1U)
{
}
}
if(USBD_VCOM_Connect() != USBD_VCOM_STATUS_SUCCESS)
{
return -1;
}
while(!USBD_VCOM_IsEnumDone());
ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);
while (1U)
{
if (Isignalstatus==1)
{
sprintf(TxBuffer,"\n\rResult=%d",result_Isignal);
for(int i=0;TxBuffer != '\0';i++)
{
USBD_VCOM_SendByte(TxBuffer);
CDC_Device_USBTask(&USBD_VCOM_0);
}
Isignalstatus = 0;
}
}
return 1;
}
void Time_Interval_Event(void)
{
/* Acknowledge Period Match interrupt generated on TIMER_CCU_1 */
TIMER_ClearEvent(&TIMER_0);
ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);
}
/*End of measurements interrupt*/
void Adc_Measurement_Handler(void)
{
/*Read out conversion results*/
result_Isignal = ADC_MEASUREMENT_GetResult(&ADC_MEASUREMENT_Channel_A_handle);
Isignalstatus = 1;
}
/*
{
Bytes = USBD_VCOM_BytesReceived();
if (Bytes)
{
USBD_VCOM_ReceiveByte(&RxBuffer[0]);
USBD_VCOM_SendByte(RxBuffer[0]);
}
CDC_Device_USBTask(&USBD_VCOM_cdc_interface);
}
return 1;
}
*/
Now my XMC4500 is connected to my laptop. After debugging I on
I can't run the code after debugging as you can see. Also When Using Teraterm (instead of putty) there is no data flow.
Best regards 🙂
Show Less