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

Ethernet demo falshing to TC299B

$
0
0
The code is now running on the device and I can step through the entire src code using UDE.

But the eth_demo I cannot see any output on a listening linux pc. I have changed the receiving MacAddress in the code to the linux pc's MAC, but nothing has been received. Has anybody made this demo run on a TC29x device and listent to the communication output, so I can have some pointers?

Brushed DC motor controller with the XMC

$
0
0
Hi
I would like to develop a Brushed DC motor controller with fully closed loop capabilities (quadrature encoder for position & speed control). The motors rated power will not exceed 50W.
What is my best option regarding development board? which controller will best suit me? Is there any reference design?
I would like to have the latest controller in terms of speed and capabilities for this project.

Thanks.

UART XMCLIB code unable to communicate

$
0
0
I have an XMC4500 relax kit.
I have an application to read ADC values and send them over UART to PC.
I have used the UART APP generated code and it works fine.
UART RXD - P1.4
UART TXD - P1.5
I was attempting to write the UART code by myself using XMCLIB but have not succeeded so far.
I have pasted my code bellow :
Code:

#include <xmc_uart.h>
#include <XMC4500.h>
#include <xmc_gpio.h>

#define        LED1                P1_0
#define        LED2                P1_1

uint8_t indexTX = 0;
uint8_t indexRX = 0;
uint8_t message[] = "Hello World!!!\n";
uint8_t dataRecieved[80];
size_t messageTXLen;
XMC_USIC_CH_t *uart = XMC_UART0_CH0;

void USIC0_0_IRQHandler(void)
{
        uint8_t readTemp;
        if(XMC_UART_CH_GetStatusFlag(uart) == XMC_UART_CH_STATUS_FLAG_TRANSMITTER_FRAME_FINISHED)
        {
                if(indexTX < messageTXLen)
                {
                        XMC_UART_CH_Transmit(uart, message[indexTX++]);
                        XMC_UART_CH_ClearStatusFlag(uart, XMC_UART_CH_STATUS_FLAG_TRANSMITTER_FRAME_FINISHED);
                }
        }
        if(XMC_UART_CH_GetStatusFlag(uart) == XMC_UART_CH_STATUS_FLAG_RECEIVE_FRAME_FINISHED)
        {
                readTemp = (uint8_t)XMC_UART_CH_GetReceivedData(uart);
                if(readTemp != ';')
                {
                        if(indexRX < 80)
                        {
                                message[indexRX++] = readTemp;
                                XMC_UART_CH_ClearStatusFlag(uart, XMC_UART_CH_STATUS_FLAG_RECEIVE_FRAME_FINISHED);
                        }
                }
        }
}

int main(void)
{

        XMC_GPIO_CONFIG_t LEDConfig;

        const XMC_GPIO_CONFIG_t tx_config  =
        {
          .mode            = XMC_GPIO_MODE_OUTPUT_PUSH_PULL_ALT2,
          .output_level    = XMC_GPIO_OUTPUT_LEVEL_HIGH,
          .output_strength  = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE
        };

        const XMC_GPIO_CONFIG_t rx_config  = {
          .mode            = XMC_GPIO_MODE_INPUT_TRISTATE,
          .output_level    = XMC_GPIO_OUTPUT_LEVEL_HIGH,
          .output_strength  = XMC_GPIO_OUTPUT_STRENGTH_STRONG_SOFT_EDGE
        };

        messageTXLen = strlen(message);

        XMC_UART_CH_CONFIG_t uart_config = {
                .baudrate = 9600U,
                .oversampling = 16U,
                .data_bits = 8U,
                .frame_length = 8U,
                .stop_bits = 1U,
                .parity_mode = XMC_USIC_CH_PARITY_MODE_NONE
        };

        /*Configure RX*/
        XMC_GPIO_Init(P1_4, &rx_config);

        /*Configure TX*/
        XMC_GPIO_Init(P1_5, &tx_config);

        /*Initialize and configure UART0 on channel 0 */
        XMC_UART_CH_Init(uart, &uart_config);

        /*Set input source path*/
        XMC_USIC_CH_SetInputSource(uart, XMC_USIC_CH_INPUT_DX0, 1U);

        /*Configure transmit FIFO*/
        //XMC_USIC_CH_TXFIFO_Configure(uart, 16U, XMC_USIC_CH_FIFO_SIZE_16WORDS, 1U);

        /*Configure receive FIFO*/
        //XMC_USIC_CH_RXFIFO_Configure(uart, 0U, XMC_USIC_CH_FIFO_SIZE_16WORDS, 15U);

        XMC_UART_CH_EnableEvent(uart, XMC_UART_CH_EVENT_STANDARD_RECEIVE);
        XMC_UART_CH_EnableEvent(uart, XMC_UART_CH_EVENT_TRANSMIT_SHIFT);

        /*Start UART */
        XMC_UART_CH_Start(uart);

        __enable_irq();

        XMC_UART_CH_Transmit(uart, message[indexTX++]);

        //Relax Kit LED Operation
        LEDConfig.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL;
        LEDConfig.output_level = XMC_GPIO_OUTPUT_LEVEL_HIGH;
        LEDConfig.output_strength = XMC_GPIO_OUTPUT_STRENGTH_MEDIUM;

        XMC_GPIO_Init(LED1, &LEDConfig);
        XMC_GPIO_Init(LED2, &LEDConfig);
        XMC_GPIO_ToggleOutput(LED1);


        /* Placeholder for user application code. The while loop below can be replaced with user application code. */
        while(1U)
        {

        }
}

Kindly review the code and inform me where I went wrong.
I also want to know how to select transmit pin as the user manual list P1.5 or P1.7 or P5.1 or P1.5.HW0_OUT for USIC0_CH0.DOUT0 just as we have a dedicated function to set SetInputSource.

Thanking You,
IK.

XMClib POSIF as Quadrature encoder example.

$
0
0
Hi Daryl,

In your example you connected the index flag to P2.8. We are using Ethernet and hence this port can't be used for the index signal since Ethernet needs it.
We suggest that we use P2.15 instead.

It seems that P2.15 can not be connected to the current timer slice. Can you make a change in your example or can you explain the dependencies so that we can make the change ourselves?
Or can you see another solution to our problem?

Many thanks in advance!
Elin

Settings for DC-syncronous (or SM+SYNC0) mode

$
0
0
Hi,


Firstly at the TwinCAT you have to enable the DC.

If you are using the XMC4800 relaxkit you can direct the SYNC pulse to the GPIO P1.14 which you can observe this on a scope or see the LED turns on.
Typically the SYNC pulse interval should be around 4msec.

Of course you can also link the SYNC pulse to the ERU which will trigger an interrupt on the XMC48.

USBBL001 Example not found

$
0
0
Hi, I'm Martino.

I tried the example of Dave 3.1.10 USBBL001 Example, because i want to indroduce an usb flash memory into my project but this example never enter on Host_Configured.

Can Some one help me?

Does the XMC4700/XMC4300 support EtherCAT cable redundancy?

$
0
0
As for the XMC4700/XMC4300, is there any support available from Infineon for EtherCAT cable redundancy?

Problems with Ethernet without RTOS

$
0
0
Hello Jesus,

Using Dave4 IDE and latest updates,
I tried to adapt the xmc4500_relaxkit_lwip_httpserver_raw application you attached in this previous post
to run on XMC4400 Hexagon board, but I cannot make it build.
Aparently the link file "linker_script.ld" of the XMC4400 is not compatible (see error below)

Can someone tell me why ?
Eventually point me to an example of lwip use WITHOUT RTOS on XMC4400 ?
I just need to send UDP packets.

Any help is welcome

Jorge
Attached Images
Attached Files

ABM Header

$
0
0
The ABM Headers ( which can be one of the two memory places) are also located in the flash for .text, what if the .text of a firmware is so large that the space of flash_abm is partially or completely occupied by the .text? I think, the linker script needs to adapted.

VADC Data Reduction not working as expected

$
0
0
I am using the VADC on a XMC4500. I have 10 channels that are scanned by the background scan. The conversion is triggered every 100ms from a CCU4 timer. The result of channel 10 triggers an Interrupt. So far everything works as expected, but if I try to use the data reduction, I get incorrect results.
Summary:
Code:

DRCTR Setting          Result        Interrupt timing      Comment
0x00                  x                100ms                correct result
0x01                  x                200ms                incorrect, I would expect 2*x
0x02                  2*x              300ms                incorrect, I would expect 3*x
0x03                  3*x              400ms                incorrect, I would expect 4*x

The interrupt timing is always as expected but the result is not the correct value.
Is this some kind of bug or is there something wrong with my settings?

Application Kit TC2X7 - Flashing not possible after testing an example from hightex

$
0
0
Hi,

after flashing (iROM) the LCDDemo provided by the Free Aurix Entry Toolchain, the TC2X7 V1.0 Application Kit Board is performing an reset within an second after every startup of the application. Therefore i can't flash the board by the Toolchain anymore, because no connection can be estabiled or the board is disconnected after the board resets.

Is there any possiblity to halt the board after the startup and stop the execution of the the application code e.g. by an hardware pin, so that i can erase the application code or flash a new one?

I'm thankful for every hint, which could lead to an solution of my problem!

Best regards
Lukas

How to Work with ASC BSL in XMC4000 Family

$
0
0
Hi Sir/Madam,
i am working on xmc4200. i want to Change Boot mode ASC_BSL through software. As per the Reference manual i got that STCON register will do the job easy by setting the bits 11:8 to
0001 it will change the mode. as per the procedure i wrote and observed in peripheral windows of my ide it is showing ASC BSL mode. now when I am trying to Power On Reset the changes are reverted(normal mode).
i want to write the code through ASC BSL in xmc4200. for that after R&D on Internet i got "XMC4000_TOO_ASC_BSL_Bootloader-AN-v01_02-EN.pdf". on that document it mentioned to send 0x00 then
it will respond with 0x5D but i am not getting this reponse how can i achive this.

Thanks and Regards,
Harshan.

XMCLib USB OTG

$
0
0
May I know when it is going to be ready?

XMC4500 relax kit, UDP event based Receive function

$
0
0
Hi everyone,

Is it possible to create an event based UDP function?
I want to create a project that waits for a UDP message, once a message is arrived after few ms, send it back to a certain IP, PORT.
Now I am able to ping the xmc4500 relax kit and also send a hard coded message "Hello world" to a certain IP, PORT.

Could someone help me to create a receive/send back project?

Thanks,

H. Hafezi

Drawing Spidercam project with Infineon XMC4500 relax kit


Loading the Application to PSRAM and Run

$
0
0
Hi Sir/Madam,
I am Working on XMC4200 my requirement is Run the Application from PSRAM after user input signal, Let us say application is Running From Flash and user sends signal,
Then the already stored code should be Loaded Into PSRAM and need to Run.

in order to achieve i have done the following procedure.

1) i have taken a simple LED blink program and Converted to array format using bintohex.exe

2) waiting for the user signal

3) when ever i got the signal i am copying the (LED Blink array) to PSRAM location From 0x1FFFC000 ( verified with memory window the entire array was loaded success fully)

Please Let me know is the above procedure is Correct ?? if Correct Please guide me how to run the code.

if the above procedure was Wrong then guide the right procedure to full fill my requirement.

Note: Signal Refers Interrupt.

Thanks and Regards,
Harshan

XMC4800 EtherCAT with TwinCAT2 connect problem

$
0
0
This is related to the Beckoff TwinCAT2/3 nothing related to the XMC48 software or chip. TwinCAT2/3 are quite selective on the network card or will have conflict with the company IT securities.

If you are using a 32bit Window system, this should be working good with TwinCAT2. However for 64bit Window, it is recommended to use TwinCAT3.

Application Note: XMC1000 Oscillator handling

$
0
0
The XMC1000 Oscillator handling Application Note is available at the Infineon Technologies website:
http://www.infineon.com/cms/en/produ...a0029#ispnTab3

Application Note

About this document
This application note describes the calibration of the frequency of the on-chip oscillator in the XMC1000
microcontroller family. Two methods for calibrating the internal clock are covered: 1) Using an external reference signal, 2) Using the on-chip temperature sensor

XMC4700 Errata Sheet

$
0
0
Hi Niclas

Thanks that helped me a lot !!

Ingo

after loading the application through ASCBSL The Application Not Running ????

$
0
0
Hi Travis,
Thanks for Reply, confirm me is it necessary that loader program only should be loaded after Initialise sequence i.e, no LED blink program will not run from PSRAM???

My Requirement is i want to Execute the code from PSRAM.

i.e.,

Let say a uart based application is running from the flash.

and it received a command to update

then i should need to Write the peace of code to PSRAM which is already stored on external EEPROM

then switch the control to PSRAM.

So that on PSRAM i will write such Code that it take the User Input and Write Into Flash.

in clear view

Application Running from Flash

<- update Request Received from external Source

Take the Input from EEPROM and Write Into PSRAM

Give Control to PSRAM

<- Get Data From External Source (UART) and Write Into Flash

after Finishing the code Give Control to Flash and Run the New Code.

i hope you understand My Requirement. if any input you need from my side regarding explanation let me know.

Thanks and Regards,
harshan.
Viewing all 9892 articles
Browse latest View live