Quantcast
Channel: Infineon Forums
Viewing all 9892 articles
Browse latest View live

How to get a XMC14xx running without Debugger

$
0
0
Hello.

I've a big problem: my XMC14xx microcontroller doesn't start the program in flash after a reset.

I've set the BMI to 0xF8C3 -> User Mode Debug enable over SWD.

Programming and debugging over SWD0 is working without problems.
The programm is working fine in debug mode or after a neu flash/program process.

But if i turn of power (and disconnecting the SWD-Interface) and turn it on again,
the microcontroller do noting, like a none existing program in flash, or a ASC-Boot strap loader...

Is there a additial secret in the Chip to start the program from flash?
I didn't configure the HWCON-Pin's for startup. The SWDIO and SWDCLK-Pins (P0.14 and P0.15) have pullup's.

The app note: Infineon-ApplicationNote_XMC1000_Microcontroller_BootModeHa ndling-AN-v01_00-EN.pdf
says: User Debug Mode -> run user code (flash)

There is no RAM-Code in my program.

Any idea?

Cirrus Logic USB Core in XMC4700

$
0
0
Hello Everybody

I hear that a Cirrus Logic USB Core was implemented in XMC Series.
Can someone confirm that? And if answer yes which core are implemented?
If the answer no, maybe someone knows the core?

Thanks

EbbeSand

Vadc fifo

$
0
0
Hi,

I've problems with the vadc and result registers in fifo mode. Has someone an example, how to configure fifo mechanism? Or someone worked with it already?

I'm oriented at the description in application note AP32304-AN-v01_10-EN (site 62) but without success.

Thanks

Jan

USB Bootloader IAP example application will not be recognized by Windows 10

$
0
0
Hi,

The Infineon example application USBD_MS_BOOTLOADER_IAP_XMC47 does not work in combination with Windows 10. (I tried 2 Win 10 PC’s, none of these works)
The problem is that the USB device will not be recognized when the XMC4800 Relax Kit is connected to a Windows 10 PC. (In Windows 7 it works fine)
See for detailed information attached error messages. (translations: ‘Unknown USB-device (encountering by device has failed.)’ and ‘USB-device is not recognized. The last to the computer connected USB-device has caused a malfunction. Windows does not recognize this device anymore.’)
I used the original example DeviceDescriptor,.VendorID = 0x058B, .ProductID = 0x0060

Please can anybody tell me what is needed to be done to make this example code Windows10 compatible?

Regards,
Gerrard
?????

How to program the BMI value with Debug/Flasher Tool?

$
0
0
Hello Jesus,

I've managed to program a "virgin" device using the following tools

1. XMC-Flasher software
2. Segger JLink V6.30j software
3. XMC Link hardware

The software allows me to program an "unprogrammed" device only once. After it has been programmed then I cannot reprogram it again (even though a connection can still be made).
The only way to reprogram it is to use the DAVE IDE sofware with JLink Debugger.

I noticed that after programming, the unique chip ID number has changed from "200004......" to "AAAAAAAA.....AAA", when reconnecting with the XMC-Flasher software.

Do you know why the XMC-Flasher software only allows a device to be programmed once, even though DAVE IDE allows it to be re-programmed?

Thanks in advance,

Kfw

Problem with start and stop timer by pin

$
0
0
Hi everyone, I'm trying to start and clear timer on falling edge on the pin and stop&read timer value on the rising edge. Do you have some idea?
Code:

XMC_CCU4_SLICE_COMPARE_CONFIG_t SLICE0_config =
        {
                .timer_mode = XMC_CCU4_SLICE_TIMER_COUNT_MODE_EA,
                .monoshot = XMC_CCU4_SLICE_TIMER_REPEAT_MODE_SINGLE,
                .shadow_xfer_clear = 0,
                .dither_timer_period = 0,
                .dither_duty_cycle = 0,
                .prescaler_mode = XMC_CCU4_SLICE_PRESCALER_MODE_NORMAL,
                .mcm_enable = 0,
                .prescaler_initval = XMC_CCU4_SLICE_PRESCALER_32768,
                .float_limit = 0,
                .dither_limit = 0,
                .passive_level = XMC_CCU4_SLICE_OUTPUT_PASSIVE_LEVEL_LOW,
                .timer_concatenation = 0
        };

XMC_CCU4_SLICE_EVENT_CONFIG_t timer_start_config =
        {
                .mapped_input = CCU40_IN0_P0_12,
                .edge = XMC_CCU4_SLICE_EVENT_EDGE_SENSITIVITY_FALLING_EDGE,
                .level = XMC_CCU4_SLICE_EVENT_LEVEL_SENSITIVITY_COUNT_UP_ON_LOW,
                .duration = XMC_CCU4_SLICE_EVENT_FILTER_7_CYCLES
        };

XMC_CCU4_SLICE_EVENT_CONFIG_t timer_stop_config =
        {
                .mapped_input = CCU40_IN0_P0_12,
                .edge = XMC_CCU4_SLICE_EVENT_EDGE_SENSITIVITY_RISING_EDGE,
                .level = XMC_CCU4_SLICE_EVENT_LEVEL_SENSITIVITY_ACTIVE_HIGH,
                .duration = XMC_CCU4_SLICE_EVENT_FILTER_7_CYCLES
        };

int main(void)
{
        XMC_SCU_CLOCK_Init(&clock_config);

    XMC_CCU4_Init(CCU40, XMC_CCU4_SLICE_MCMS_ACTION_TRANSFER_PR_CR_PCMP);
    XMC_CCU4_StartPrescaler(CCU40);
    XMC_CCU4_SetModuleClock(CCU40, XMC_CCU4_CLOCK_SCU);

    XMC_CCU4_SLICE_CompareInit(CCU40_CC40, &SLICE0_config);

    XMC_CCU4_EnableShadowTransfer(CCU40, (XMC_CCU4_SHADOW_TRANSFER_SLICE_0 | XMC_CCU4_SHADOW_TRANSFER_PRESCALER_SLICE_0));

    XMC_CCU4_SLICE_ConfigureEvent(CCU40_CC40, XMC_CCU4_SLICE_EVENT_0, &timer_start_config);
    XMC_CCU4_SLICE_ConfigureEvent(CCU40_CC40, XMC_CCU4_SLICE_EVENT_1, &timer_stop_config);

    XMC_CCU4_SLICE_StartConfig(CCU40_CC40, XMC_CCU4_SLICE_EVENT_0, XMC_CCU4_SLICE_START_MODE_TIMER_START_CLEAR);
    XMC_CCU4_SLICE_StopConfig(CCU40_CC40, XMC_CCU4_SLICE_EVENT_1, XMC_CCU4_SLICE_END_MODE_TIMER_STOP);               
       
    XMC_CCU4_SLICE_SetInterruptNode(CCU40_CC40, XMC_CCU4_SLICE_IRQ_ID_EVENT1, XMC_CCU4_SLICE_SR_ID_1);                       
   
    XMC_CCU4_SLICE_EnableEvent(CCU40_CC40, XMC_CCU4_SLICE_IRQ_ID_EVENT0);
    XMC_CCU4_SLICE_EnableEvent(CCU40_CC40, XMC_CCU4_SLICE_IRQ_ID_EVENT1);
       
    __NVIC_SetPriority(CCU40_1_IRQn, 3U);
    __NVIC_EnableIRQ(CCU40_1_IRQn);               

    XMC_CCU4_EnableClock(CCU40, 0);

        while (1)
    {
    }       
}       


void CCU40_1_IRQHandler(void)               
    {
        XMC_CCU4_SLICE_ClearEvent(CCU40_CC40, XMC_CCU4_SLICE_IRQ_ID_EVENT0);
    XMC_CCU4_SLICE_ClearEvent(CCU40_CC40, XMC_CCU4_SLICE_IRQ_ID_EVENT1);       

    Button_MeasuredTime = XMC_CCU4_SLICE_GetTimerValue(CCU40_CC40);               
        test_flag++;
    if (Button_MeasuredTime < ButtonShortPush_threshold) {}       
    else if ((ButtonShortPush_threshold < Button_MeasuredTime) & (Button_MeasuredTime < ButtonLongPush_threshold))
        {
        ButtonLongPush_flag = false;
        ButtonShortPush_flag = true;
        }
    else if ((ButtonLongPush_threshold < Button_MeasuredTime) & (Button_MeasuredTime < ButtonStuck_threshold))
        {
        ButtonLongPush_flag = true;
        ButtonShortPush_flag = false;
        }
    else
        {
        reset_button();
        erase_push_flags();
        }
    }

Example of dave4 for USB HID XMC4500

$
0
0
Hi everone

Could someone help me with some example for the XMC4500 for usb HID

Linked list multi block DMA transfer with DAVE 4 / XMCLib

$
0
0
Hi,

Here is another example to copy with the GDMA from a pheripheral to memory via linked list.
Regards
Eric


* This example shows a DMA transfer from VADC to an array.
* With a CCU8 trigger the sampling of 2 Pins is started (P15.3, P15.2, @10kHz).
* The Result is stored in an array of 16 elements. The order is A,B,A,B.
*
* To enlarge the time between 2 transfers 4 channels instead of 2 channels are used.
* The additional 2 channels are also connected to P15.3 and P15.2. (VADC Alias feature)
* But have their own result registers.
* The 4th result generates an DMA trigger where all 4 results are stored in an array.
*
* The DMA is configured as list with 3 elements. After the 3th transfer is completed an interrupt occurs.
* The ISR "GPDMA0_0_IRQHandler" in global_dma_conf.c checks the correct interrupt and calls the function "user_event_handler".
*
* For debugging purpose the the function "user_event_handler" disables the DMA, provide a breakpoint and enable the DMA again.
*
* Function reinit_ADC() is called as workaround for errata ADC_CM.001
?????

LIN communication for TLE9879QXA40 and TLE987x_3phase board

$
0
0
Please share the LIN code. I tried the LIN Slave example from µVision Keil 5 pack file. But it is not working. Your code might be helpful.

Watch Now

$
0
0
It looks like Infineon doesn't care what is in their forum. Anyone can post shit here. Haha;)
Don't know if the forum moderator still alive!!!

DAVE Older releases

$
0
0
Hi all, is it possible to download older releases of DAVE4?

I really need to import the example project called Encoder_FOC_Motor_Example2, but it doesn't work in the latest DAVE, nor in the 4.3.2 version.
Thanks in advance

POSIF App

$
0
0
I'm working with the XMC4800. Ist there any App to configure the POSIF for Encoder quadrature counter acquisition ?

TLE9879 and KEIL RTOS2

$
0
0
Hello,
has someone experience in use KEIL RTOS on TLE9879.
Especially handling of the WDT1.

At the moment my evalboard Resets every second although I put in every task a wdt1_Service() ...
I tested also without wdt1_Service() and different other ways also a separate watchdog task.

Could it be that is not possible to use RTOS on the TLE9879? I think I can't see the forest for the trees...
A downloadable Example would help.

regards

Bricked XMC 1400 devices after changing BMI to mode 0 (ASC boot loader)

$
0
0
I'm having some trouble getting the switching of boot mode to work correctly. I used the JLink commander tool (version 6.30j) to change the boot mode on an XMC1400 BootKit from mode 2 to mode 0. I should then have been able to use either JLink commander or Memtool to switch the mode back to mode 2, but once this change has been made the device no longer responds.

I then connected a scope to the UART0C1 Tx and Rx lines, and I see Memtool sending data to the device, but the device does not respond. I also bricked another device using the BMI setting feature of DAVE. Is there some systemic bug in the SEGGER drivers or someplace else that corrupts the BMI value when it's written?

All of this worked okay about 4-5 months ago when I put this project away, but now that I've come back to it it's all broken.

Regards,
Josh

CAN_NODE APP: Use more than 32 CAN Message Object Buffers on a single node

$
0
0
Hi,

You may use the MULTICAN_CONFIG APP.

Regards,
Jesus

Development tool for SAF-XC161cj-16F40F bb

Disable motor PWM when breakpoints are hit.

$
0
0
Hello, I noticed that the PWM_SVM app keeps its outputs active while execution is stopped during debugging.
This could be dangerous in motor control application. I would prefer to have all outputs off.

How can this be achieved?

Best regards and thanks.

Alberto

Bug in ASC boot loader from XMC140x

$
0
0
I have a question for the Infineon employees.

It looks like there is a bug in the ASC bootloader of the XMC1403/4
through which it is not possible to communicate with the IC.

The smaller devices from the series are probably not affected.


When delivered, the XMC is configured to ASC-BL via BMI.
If after a power-up the sequence 0x00 0x12 is sent to the XMC (P0.14),
he usually answers with BSL_ID (0x5D).

Apparently, the ASC bootloader in the XMC140x has an autobaud function,
with the bug that the first found baud rate is retained forever, even if it is completely wrong.

As a result, the smallest voltage dip (e.g., turning on a JLINK) on pin P0.14 is considered communication and baud rate detection.

The effect looks like this:

- Voltage on and P0.14 stuck on 3.3V. Then sequence 0x00 0x12.
Reaction: successful answer.

- Voltage on and sometime after that a short or long break (glitch) in the voltage at pin P0.14.
Reaction: A response will NEVER be sent again.


Is there any way to communicate with the XMC,
if once after switching on, a (switch-on) pulse on the line P0.14
and the XMC has set the baud rate (wrong) to this glitch?

This currently prevents the JLink from being able to change the BMI on XMC140x devices!!!!

Cyclic transmission of the sequence (even over hours) is not a solution!

VADC Sample and Conversion time longer than defined?

$
0
0
Hello,

I am trying to use the ADC of XMC4800 as fast as possible.
So I took the DAVE APP "ADC_MEASUREMENT" and defined sample time as 55.6nsec which results in a total conversion time of 458.333nsec.
I set "Start conversion after initialization" so that I get a first conversion. I set up a "End of measurement interrup" in which I call "ADC_MEASUREMENT_StartConversion" at the end so that it starts the next conversion.

What I now see with my oscilloscope is that I get a conversion time of around 2microsec instead of 458

Code:

void ADC_INT()
{
        DEBUG_ON;                                                                                    // set Digital IO

        DEBUG_OFF;                                                                                  // reset Digital IO
        ADC_MEASUREMENT_StartConversion(&ADC_MEASUREMENT_0);

}

The time in the interrupt routine takes about 1microsec (measured on oscilloscope with the digital IO).

Does anyone know why it takes so long? Did I miss some configurations (that is my assumption)?
Should I use other APPs?
Should I use a DMA transfer so that I can save time with not going into the interrupt routine? Nevertheless, somehow I have to read and process the ADC data. Actually I wanted to use "ADC_MEASUREMENT_GetResult()" in the interrupt to read the values, but this consume even more time for the interrupt handling and conversion time.....

Hopefully there is someone who had similar problems.

Appreciate your help!

Err (Error output) of ISO1I811T always stays low .

$
0
0
Hello,
i do not know if this will help but it is written in page 14 in the datasheet the following remark:
Important: Since the UV and MV (as well as the TE and W4S) bits used for generating the ERR signal are preset
to High during UVLO, the ERR pin is Low after power up. Therefore the ERR signal requires to be explicitly cleared
after power up. At least one read access to the GLERR and INTERR registers is needed to update those status
bits and thus release the ERR pin.
I hope this would help you
Bests
Viewing all 9892 articles
Browse latest View live