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

XMC4000 TIP of the day: Event Request Unit (ERU) for peripherals trigger.

$
0
0
I have a problem..I have set up three buttons on three pins to trigger interrupts using the ERU (Button pad signal connects to eru001 signal A input, eru001 connected to eru002 and eru002 connected to nvic002) but unfortunately only one of them works. Can you help?
Thanks

Video: Embedded Graphics Library for TFT Displays

$
0
0
Embedded Graphics Library for TFT Displays
For EPSON TFT S1D13781 CTRL ICs and XMC™ microcontrollers within DAVE™ IDE

Attachment 2468
Link to video: bit.ly/tft-epson

Easy TFT display control, combining XMC™ microcontroller with EPSON S1D13781 TFT CTRL IC.
The S1D13781 embedded graphic accelerator and video memory is controlled by EPSON’s free-of-charge Graphics Library/API running on XMC™ microcontroller.
System resource free-up, scalability up to 7“ displays and 800x480 resolution, and exciting HMI experience are only some of the benefits.


For more information:
www.infineon.com/epson
Attached Images

SPI timing problem

$
0
0
In the APP, go to adv settings, then the field control has "Clock Settings". Here you select the SPI Modes.
The Delay Settings are something else entirly - you shouldn't change them unless understanding them (leave at 1).
Then don't forget to click the "generate code" button (the notepad symbol with red pen on it).

XMC4500 Relax Lite - if built-in programmer may be used for XMC4200 & XMC4400 ?

Boot loader custom, jump to application

$
0
0
Hello,
I resolved!!!
the problem was in the function for jumping to the application.
In uVision Keil Tools the function for jump to the application is:

JumpToUserApplication
msr msp, r0
msr psp, r0
bx r1
END

is called in the main function:

#define RELOCATED_VECTORS 0x10005000 // Start address of relocated interrutp vector table
void JumpToUserApplication(LWord userSP, LWord userStartup);

/**
************************************************** **************************
* Funzione di main
*
* \param nessuno
*
* \return nessuno
*
************************************************** **************************
*/
int main ( void )
{

JumpToUserApplication(*((unsigned long*)RELOCATED_VECTORS), *((unsigned long*)(RELOCATED_VECTORS+4)));

while(1)
{
}

}

U.I.

ADC_MEASUREMENT_ADV: How to sync. channels?

$
0
0
I get the impression, that the check-box is disabled by intention,
I have not found a project, were the synchronisation feature works/is used.

Leistungselektroniker

Example for PRNG

$
0
0
it seems that the DAC of XMC4500 can be used for the same purpose. However, there is so sample code about this. The documentation is also very limited in the reference manual.


Quote:

Originally Posted by chismo View Post
Hello,

With the PRNG XMC lib, it is quite easy.
The PRNG configuration needs to be defined first:
Code:

/* PRNG configuration */
XMC_PRNG_INIT_t prng_config =
{
  .block_size = XMC_PRNG_RDBS_WORD,
  .key_words = 5
};

And after the PRNG is initialized with the defined configuration, the random data can be read.
Code:

        /* Initialize PRNG */
        XMC_PRNG_Init(&prng_config);

        /* Read into a variable */
        random_data = XMC_PRNG_GetPseudoRandomNumber();

The file "xmc_prng.h" must be included of course.

Regards,
Min Wei

Initialization fails after Reset the CAN module.

$
0
0
Hi Sir/Madam,
i am working on xmc4200. inside main() after clock configuration i am initialising the can module, and i am successfully communicate with can based devices. Now as per Requirement
in my project requirement i need to reset the CAN module, and again need to reinitialise the can module and communicate with device.

for reset can module i was done like below

PRCLR1 |= 0x00000010;
PRSET1 |= 0x00000010;
RSTCLR |= 0x01;

by doing the above procedure i can able to reset the can module i.e., all the CAN register are turned into 0xFFFFFFFF (Observed in Keil).
now if i am trying to reinitialize the CAN then it is not able initialize. should i had missed any thing else in resetting the module?

Thanks and regards,
Harshan.

Dave 4 How to include static Libraries?

$
0
0
Hi,

if static Libraries are used, Thex can be added in "Libraries" and the paths can be added in "Library Paths" in Dave 3. But in Dave 4 (4.2.8) I cannot find the option "Library Paths". Without Paths the Projekt cannot be linked.
Is it a Bug? Or have I forget something?

Best Regards,
XC

Problems with XMC1100 core

MPPT charge controller

$
0
0
Hi Mr.Rick,

I am also working on development of MPPT charge controller using XMC 4500. We are planning to add the features for our product like Ethernet modbus(For updating the parameters through a web page) and USB(For Data logging and Field firmware Update).

Also we want to interface touch screen display to our product, for the feasibility of the user. Please guide us for the implementation of these 3 features.Please guide us to follow better way of implementation.


Thanks,

M.Ramarao.

SPI Master and Slave using DMA

$
0
0
Hi all,

I have a question how to set up a SPI communication between 2 microcontrollers. On a PCB I have one XMC4500 and one XMC4400 connected by a SPI bus. The task is to transmit data of a certain data structure from the 4500 to the 4400 and, at the same time, other data of the same data structure back. The data structure is called IO_DATA_t. The data are located at defined addresses inside the two controllers, and for not loading the CPU too much, I thought that DMA would be a good way to transmit and receive the data. On the 4500, I added a SPI_MASTER app, configuring it in DMA transmit/receive mode, full duplex, 10kHz bus speed, and left all other settings to default. I did not forget to specify the actual pins mapped to this app. On the 4400, I configured a SPI_SLAVE app in DMA receive/transmit mode, full duplex, a slave select input event callback named "spi_request_handler" and all other settings as default.

When I try to initiate a communication, I want the master to transmit a struct of type IO_DATA_t to the slave (it is called IO_OUTPUT_DATA) and receive simultaneously data into the IO_INPUT_DATA struct (of the same data type) - therefore I call in a systimer handler every one second:

SPI_MASTER_Transfer(&SPI_MASTER_0, (uint8_t*)(&IO_OUTPUT_DATA), (uint8_t*)(&IO_INPUT_DATA), sizeof(IO_DATA_t));

On the 4400, I would now expect the slave select input event callback to execute and I want the 4400 to receive the data from the 4500 and to transmit some other data:

void spi_request_handler(void)
{
SPI_SLAVE_Transfer(&SPI_SLAVE_0, (uint8_t*)(&IO_OUTPUT_DATA), (uint8_t*)(&IO_INPUT_DATA), sizeof(IO_DATA_t));
}

All of this does not seem to work. My oscilloscope tells me that the SCK line is working as expected (every one second it pulses at 10kHz for a short time), the slave select line does not seem to do anything (it is continuously low), the MOSI line is continuously low and the MISO line is continuously high. Therefore I'm not surprised that the callback on the 4400 does not execute, but why is the slave select line continuously low?

Then I started debugging the software, and surprisingly on the 4500, the transfer routine always exits with SUCCESS code. Even more surprisingly, the very first transfer after initialization is successful, I receive sensible data from the 4400 - after that, I always receive only ones (as the MISO line is continuously high). So the first transmission actually works! On the 4400, I enter the callback routine once when I press the reset button for the 4500 (the first transmission), but it is not good to debug if the 4500 keeps sending data and I'm halting the 4400 with my debugger. After this, the callback routine is never again entered.

Which routines do I have to call on both microcontrollers to get it right? Do I have to use another routine? Or reset some flag or some status for the next transmission? I have the feeling that I'm doing quite a bit wrong, so maybe you can help me.

Thank you very much and kind regards
Niklas

XMC class b library on XMC

$
0
0
Hello !

I use Dave4 and have the same issue trying to use ClassB safety libraries for XMC4400 :
I cannot build the example for XMC4500, nor adapt it to XMC4400

Any clue ?
Any example available ?

Thank you.

Get active on XMC, DAVE Forums and Be Rewarded!

$
0
0
How to win the Apple Watch?
:o
Gain User Points (by starting new thread, replying to post, or rating a thread)
Gain Reputation Points (by receiving reputation ratings from fellow forum users)
Be active! At least 1 post in the past month

XMC4300 Relax CAN_NODE0 pin allocation issue in Dave4

$
0
0
There are a lot of information and questions in your post, so I will try to provide answers to all of them :)

I can confirm that DAVE pin allocation currently does not offer pin 2.0 as a CAN TX pin. The colleagues are informed and we will find fix it as soon as possible.

Referring to the second part of your post (simple CAN transmission example using LLD), as you mentioned you took the example from another forum member. This example was done for XMC4500 Relax kit, and while it seems that only change of include files is sufficient, devil is in details :p

1. I saw that you noticed that for XMC4300 "XMC_CAN_Init()" function expects 3 parameters. This is true while XMC4300/4700/4800 have the MultiCAN+ module which has an option to use either peripheral clock as a clock source for CAN or external high precision oscillator. XMC4500 uses MultiCAN module (notice lack of "+"), so different function call is necessary.

2. In the example that you copied and modified, pins P1.8 and P1.9 are used as a CAN TX and RX pins. In your case you need to use P14.3 as an input pin. The problem is that port 14 (and 15) is analog port, so if you need to use it as a digital input pin, you need to specify that. Just add additional function call:

"XMC_GPIO_EnableDigitalInput(CAN_PIN_RX);"

right after you set CAN_PIN_RX to input tristate, and everything should be fine.

One more tip, I would suggest you to check and use function "XMC_GPIO_Init()". By using this function you will avoid forgetting things like enable digital pin for ports 14/15, while the function checks that for you. Also, it not necessary to call several functions like "XMC_GPIO_SetMode()", "XMC_GPIO_SetOutputLevel()", while function "XMC_GPIO_Init()" does everything what is necessary.

If you have any additional questions, please feel free to ask :)

XMC4700: CAN Message object 0 not working

$
0
0
So, I don´t have all the information, but just by looking at the MOSTAT register values, I´ve noticed that in case of CAN NODE0, MO0 the MOSTAT.DIR value is "1". That means that you defined that MO as a transmit message object, which is wrong if you want to have a RX FIFO structure. Can you please double check your settings?

Of course, please feel free to ask additional questions :)

Problem with XMC4700 Start kits using the ETH_LWIP

Dave 4.2.8 - XMC4500 relax kit "live" debuging

$
0
0
I am playing with this dev. board and i wonder if there is an option to see "live" updated values of variables while program is running? Now i get error message "target not available" and i have to click suspend button to see values.
If I try to export and open same project in keil, variables in watch window refreshes while program is running.

Dave 4.2.4 - ETH_LWIP app version 4.0.6 problem

$
0
0
Hi friends,

I had a LWIP server in Dave 4.2.4 which was working well. I performed Dave Apps Updates and the ETH_LWIP app upgraded itself from 4.0.4 to 4.0.6. Now - using the same code - i can only connect a client to my server.
When I want to send a message, I receive a RST & ACK flags (not PSH & ACK as in the older version) and the connection is interrupted.

Some explanations for RST return flag that i found are that the port and the IP address are not binded, or the socket is closed. The error status of these two cases is ERR_OK, so this should not be the problem.
The generated files are almost identical. The app configuration is identical. I don't know where could be the problem. I attached 2 print screens of the Ethernet traffic.

A quick and dirty solution was to replace the entire ETH_LWIP generated folder with the one from the older version. This way it works. But why?

I would really appreciate some ideas if not a solution.


Attachment 2476
Attachment 2477

Thank you,
Petru S.
Attached Images

Event Request Unit (ERU) Problems

$
0
0
About point 1:

The mentioned ("XMC_ERU_Enable()")function is defined in "xmc4_eru.c" file.
Viewing all 9892 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>