XMC™ Forum Discussions
Hello
I want to change the Uart configuration part in the firmware, but it is not possible because it is declared as a const type.
I want to change it by putting in values when adjusting the Uart configuration value using the switch case.
Please let me know if there is a way. Thank you.
Hi Team,
i am using XMC440 platform2go evaluation board and wanted to do SPI communication in loopback mode.
for that i am referring SPI_SLAVE example present in DAVE and configuring SPI pins present on the arduino board.
I am selecting only SPI_MASTER with direct mode and using SPI_MASTER_TRANSMIT function to check whether clock is generating.
Issue is i am not able to see any clock and chip select signal in CRO.
please suggest what are the steps i need to follow or anything i am missing.
Thanks,
Gargi
Show LessCan't upload a screenshot in jpg format, indicating that the file extensions don't match?
When uploading an image in jpg format, you are prompted to fix the highlighted errors and try again.
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/XMC/%E8%AF%B7%E9%97%AE%E7%94%A8DAVE-XMC4700%E7%94%9F%E6%88%90%E4%BB%A3%E7%A0%81-%E7%BC%96%E8%AF%91%E6%88%90%E5%8A%9F%E5%90%8E%E4%BB%BF%E7%9C%9F-%E6%8F%90%E7%A4%BA%E6%B2%A1%E6%9C%89%E7%A8%8B%E5%BA%8F%E6%96%87%E4%BB%B6-%E8%BF%9E%E6%8E%A5%E4%BA%86%E4%BB%BF%E7%9C%9F%E5%99%A8-%E8%BF%99%E6%98%AF%E6%80%8E%E4%B9%88%E5%9B%9E%E4%BA%8B/td-p/685459
Show LessHi
I am trying to implement the XMC4800 on a PCB but can only access the V1.0 design (https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc48_relax_ecat_v1/?tab=~%27pcb_data#!designsupport)
The supplied Eagle files were last updated in 2015 and do not contain the necessary components to use the ADIN1200 PHY and new magnetics.
Could you please supply a zip file with the relevant Eagle files for the V2.1 design?
Kind regards
Corben Taylor
Show LessHi
Myself : Nihal khan
i want to know the use of sample_time_std_conv (/**< Sample time for channels directly connected to VADC
<BR>Range: [0x0 to 0x1F] */) in adc configuration
Show Less
Hi everyone,
Using MTB I'm currently working on XMC4700, I need to measure an input PWM.
I've found https://github.com/Infineon/mtb-example-xmc-ccu4-capture but this example uses a busy-wait system, it's possible to enable an interrupt generated when a rising/falling edge is detected on the CCU4X_Y pin?
e.g.
MTB configuration:
/* NOTE: This is a preview only. It combines elements of the
* cycfg_peripherals.c and cycfg_peripherals.h files located in the folder
* F:/Progetti/MTB_workspace/XMC_App/bsps/TARGET_APP_KIT_XMC47_RELAX_V1/config/GeneratedSource.
*/
#include "cycfg_routing.h"
#include "xmc_ccu4.h"
#define ccu4_2_ch_2_NUM 2U
#define ccu4_2_ch_2_HW CCU42_CC42
#define ccu4_2_ch_2_TICK_NS 7U
const XMC_CCU4_SLICE_CAPTURE_CONFIG_t ccu4_2_ch_2_capture_config =
{
.fifo_enable = false,
.timer_clear_mode = XMC_CCU4_SLICE_TIMER_CLEAR_MODE_CAP_HIGH,
.same_event = false,
.ignore_full_flag = false,
.prescaler_mode = XMC_CCU4_SLICE_PRESCALER_MODE_NORMAL,
.prescaler_initval = XMC_CCU4_SLICE_PRESCALER_1,
.float_limit = XMC_CCU4_SLICE_PRESCALER_32768,
.timer_concatenation = false,
};
const XMC_CCU4_SLICE_EVENT_CONFIG_t ccu4_2_ch_2_event0_config =
{
.mapped_input = CCU42_IN2_EV0IS_VALUE,
.edge = XMC_CCU4_SLICE_EVENT_EDGE_SENSITIVITY_RISING_EDGE,
.level = XMC_CCU4_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_HIGH,
.duration = XMC_CCU4_SLICE_EVENT_FILTER_3_CYCLES,
};
const XMC_CCU4_SLICE_EVENT_CONFIG_t ccu4_2_ch_2_event1_config =
{
.edge = XMC_CCU4_SLICE_EVENT_EDGE_SENSITIVITY_NONE,
.level = XMC_CCU4_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_HIGH,
.duration = XMC_CCU4_SLICE_EVENT_FILTER_DISABLED,
};
const XMC_CCU4_SLICE_EVENT_CONFIG_t ccu4_2_ch_2_event2_config =
{
.edge = XMC_CCU4_SLICE_EVENT_EDGE_SENSITIVITY_NONE,
.level = XMC_CCU4_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_HIGH,
.duration = XMC_CCU4_SLICE_EVENT_FILTER_DISABLED,
};
void init_cycfg_peripherals(void)
{
XMC_CCU4_SLICE_CaptureInit(ccu4_2_ch_2_HW, &ccu4_2_ch_2_capture_config);
XMC_CCU4_SLICE_SetTimerPeriodMatch(ccu4_2_ch_2_HW, 65535U);
XMC_CCU4_SetMultiChannelShadowTransferMode(ccu4_2_HW, XMC_CCU4_MULTI_CHANNEL_SHADOW_TRANSFER_SW_SLICE2);
XMC_CCU4_EnableShadowTransfer(ccu4_2_HW,
XMC_CCU4_SHADOW_TRANSFER_SLICE_2 |
XMC_CCU4_SHADOW_TRANSFER_DITHER_SLICE_2 |
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_2 );
XMC_CCU4_SLICE_ConfigureEvent(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_EVENT_0, &ccu4_2_ch_2_event0_config);
XMC_CCU4_SLICE_ConfigureEvent(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_EVENT_1, &ccu4_2_ch_2_event1_config);
XMC_CCU4_SLICE_ConfigureEvent(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_EVENT_2, &ccu4_2_ch_2_event2_config);
XMC_CCU4_SLICE_Capture0Config(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_EVENT_0);
XMC_CCU4_SLICE_SetInterruptNode(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_IRQ_ID_EVENT0, XMC_CCU4_SLICE_SR_ID_0);
XMC_CCU4_SLICE_EnableEvent(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_IRQ_ID_EVENT0);
XMC_CCU4_EnableClock(ccu4_2_HW, ccu4_2_ch_2_NUM);
XMC_CCU4_SLICE_SetTimerValue(ccu4_2_ch_2_HW, 0U);
}
/* Set NVIC priority */
NVIC_SetPriority(CCU42_2_IRQn, 60U);
/* Enable IRQ */
NVIC_EnableIRQ(CCU42_2_IRQn);
XMC_CCU4_SLICE_SetInterruptNode(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_IRQ_ID_COMPARE_MATCH_UP, XMC_CCU4_SLICE_SR_ID_2);
XMC_CCU4_SLICE_StartTimer(ccu4_2_ch_2_HW);
void CCU42_2_IRQHandler(void)
{
XMC_CCU4_SLICE_ClearEvent(ccu4_2_ch_2_HW, XMC_CCU4_SLICE_IRQ_ID_COMPARE_MATCH_UP);
XMC_GPIO_ToggleOutput(XMC_GPIO_PORT5, 9);
}
I would like to achieve something like https://github.com/Infineon/mtb-example-xmc-eru-extint but using CCU4/8. I'm not sure if it's possible but with the old MCU generation XE167FM it was a standard practice so I hope there's a way.
Thanks for your support.
Regards.
Show LessHello expert,
I want to make the baud rate changeable when detect unmatched baud rate.
actually I have asked this question before, see https://community.infineon.com/t5/XMC/XMC4000-How-to-make-UART-baud-rate-changeable/m-p/652860#M14147
But I met new problem. You see in the code below, the first parameter in function "XMC_UART_CH_SetBaudrate" is defined as constant in library source code. Is it possible that I change the code in library?
XMC_UART_CH_STATUS_t XMC_UART_CH_SetBaudrate(XMC_USIC_CH_t *const channel, uint32_t rate, uint32_t oversampling)
{
XMC_UART_CH_STATUS_t status;
status = XMC_UART_CH_STATUS_ERROR;
if ((rate <= (XMC_SCU_CLOCK_GetPeripheralClockFrequency() >> 2U)) && (oversampling >= XMC_UART_CH_OVERSAMPLING_MIN_VAL))
{
if (XMC_USIC_CH_SetBaudrate(channel, rate, oversampling) == XMC_USIC_CH_STATUS_OK)
{
status = XMC_UART_CH_STATUS_OK;
}
}
return status;
}
Show Less
Hi!
I am using the XMC4800 Relax EtherCAT kit v1 and I need to direct the SYNC0 pulse to P1.14 to visualized it with an oscilloscope.
I enabled the DC from TWINCAT.
I connected the SYNC0-signal to an output port following the following procedure:
1. Add a DIGITAL_IO APP and configure it for output/push pull
2. Right click ECAT_SSC APP and select HW signal connections from context menu
3. Set source signal from Not Selected to sync_out0. Set your DIGITAL_IO APP you have added before as the Target.
4. Right click yout DIGITAL_IO APP and select Manual Pin Allocator from context menu. For SYNC0 you can select P3.7 or P1.14.
5. Start code generation and rebuild your project.
The result is: a continuously high signal on pin 1.14.
Can you suggest me something to do?
Thanks in advance.
Tiziana
Show LessHello,
I am looking at the example code and would like to know why is XMC_CCU4_EnableShadowTransfer API called twice
once in the void CCU40_0_IRQHandler(void) {
…
/* Enable shadow transfer for the new PWM value update */
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, XMC_CCU4_SHADOW_TRANSFER_SLICE_0);
}
and once in the int main(void) {
…
/* Enable shadow transfer */
XMC_CCU4_EnableShadowTransfer(MODULE_PTR, \
(uint32_t)(XMC_CCU4_SHADOW_TRANSFER_SLICE_0| \
XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_0));
…
}
Best regards
Show Less