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

recommondation for Mosfet in 3DPrinters

$
0
0
Hello,
my company is building on a 3D printer. I heared Infineon has good MOSFET for powersupply.
Do you have any recommondation?

XMC4800 TSL client sample code

$
0
0
Hi,
I have compiled mbedTLS and ssl_client1.c sample code onto XMC4800 in Keil MDK,
but still it hangs after it enters mbedtls_entropy_init( &entropy );

Where can I find a working mbedtls ssl_client sample code ?

I am using XMC4800 EtherCAT relax EVB, it has one ethernet port that I am using.

I also saw SharkSSL_Lite in Keil MDK package,
since mbedTLS is not working, should I use SharkSSL ? any sample code available ?

Frontsite and backsite metalliyation of IPC171N04N

$
0
0
Hello,
Does someone know the Frontsite and backsite metalliyation of the MOSFET IPC171N04N?

Thank you in advance.

GPDMA - Source transaction complete interrupt if source is a peripheral

$
0
0
xmc4500 relax kit board,I have already solve the problem thanks!

Asserts

$
0
0
DAVE newbie question: I find that asserts are not triggering. Tried XMC_ASSERT, and plain assert. Couldn't find anything in Forum or DAVE help that tells me how I enable assert support, should I need to. DAVE-generated modules and stock DAVE APPs, include XMC_ASSERT and plain assert statements. I've tried flipping the sense of one each of those, and breakpointing just after, to check the relevant code is executing, but neither of those asserts trigger, either. Obviously I'm doing something basic wrong here. Any ideas?

Modbus TCP without RTOS

$
0
0
Hi Jesus. I'm trying out 'MODBUS_TCP_MODE_NOOS_XMC47.zip'. Main has just the following while loop:

while(1)
{
sys_check_timeouts();
}

sys_check_timeout() normally takes microseconds to run.
But I've noticed that sys_check_timeouts() takes a whole 2 seconds to run, about a second after the while loop starts running.
Is this normal?
Can it be avoided?
Can it occur at other times, apart from a second after the while loop starts running.
The 2 second 'hang' in sys_check_timeouts(), will prevent other actions I want to perform within the while-loop, from being performed.

I found out this 2 second 'hang' was occurring, by turning an LED off just before the sys_check_timeouts() call, and turning it back on after
Most of the time, the LED just glows half-brightness, showing it's being turned on and off very rapidly.
But for the 2 second period mentioned, the LED goes off completely.

If I pause during the 2 second period, the debugger shows the code is within the following retry loop,
XMC_ETH_MAC_PHY_MAX_RETRIES being set to 65535 iterations!

:
/* Read physical layer and obtain status */
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_ReadPhy(XMC_ETH_MAC_t *eth_mac, uint8_t phy_addr, uint8_t reg_addr, uint16_t *data)
{
uint32_t retries;
:
/* Poll busy bit during max PHY_TIMEOUT time */
retries = 0U;
do
{
if ((eth_mac->regs->GMII_ADDRESS & ETH_GMII_ADDRESS_MB_Msk) == 0U)
{
*data = (uint16_t)(eth_mac->regs->GMII_DATA & ETH_GMII_DATA_MD_Msk);
return XMC_ETH_MAC_STATUS_OK;
}
++retries;
} while (retries < XMC_ETH_MAC_PHY_MAX_RETRIES);
:

Alternatively, within the following retry loop, likewise 65535 iterations:

/* Write physical layer and return status */
XMC_ETH_MAC_STATUS_t XMC_ETH_MAC_WritePhy(XMC_ETH_MAC_t *eth_mac, uint8_t phy_addr, uint8_t reg_addr, uint16_t data)
{
uint32_t retries;
:
/* Poll busy bit during max PHY_TIMEOUT time */
retries = 0U;
do
{
if ((eth_mac->regs->GMII_ADDRESS & ETH_GMII_ADDRESS_MB_Msk) == 0U)
{
return XMC_ETH_MAC_STATUS_OK;
}
++retries;
} while (retries < XMC_ETH_MAC_PHY_MAX_RETRIES);
:

Do you know if I can reduce XMC_ETH_MAC_PHY_MAX_RETRIES to something lower than 65535, and still accord with the TCP/IP spec? With Modbus TCP spec?
XMC_ETH_MAC_PHY_MAX_RETRIES is set within xmc_eth_mac.h:

:
* The Ethernet MAC (ETH) is a major communication peripheral that supports 10/100
* MBit/s data transfer rates in compliance with the IEEE 802.3-2002 standard. The ETH
* may be used to implement internet connected applications using IPv4 and IPv6. The
* ETH also includes support for IEEE1588 time synchronisation to allow implementation
* of Real Time Ethernet protocols.
:
/************************************************** ************************************************** ******************
* MACROS
************************************************** ************************************************** *****************/
:
#define XMC_ETH_MAC_PHY_MAX_RETRIES (0xffffUL) /**< Maximum retries */
:

Best regards,

David King

memtool - jlink batch file

$
0
0
Quote:

Originally Posted by Aaron Walsh View Post
Thanks Mike, I will have a look at the professional version of Memtool.

I have received the Memtool batch command application note (see attached). It meets some of the requirements. So far I have not found a way to launch it silently and execute batch files so the end user doesn't have to speak English.

Attachment 505

Best regards
Aaron

Example Batch File
The following example batch file connects the target system. Than it loads a starter software
(starter.hex), a firmware and a device specific serial number. The firmware is loaded twice. The second
time it is loaded using an offset of 0x40000. So the firmware image is programmed twice into the
FLASH memory device. Please note that after each open_file operation the loaded sections have to be
added to the FLASH Buffers before the next open_file operation can take place. Finally all loaded
sections are programmed into the FLASH memory device.
connect
open_file c:\Data\starter.hex
select_all_sections
add_selected_sections
open_file c:\Data\firmware.hex
select_all_sections
add_selected_sections
open_file c:\Data\firmware.hex , +40000h
select_all_sections
add_selected_sections
open_file c:\Data\sernum.hex
select_all_sections
add_selected_sections
program
disconnect

I2C to EEPROM memory, XMClib and XMC1300

$
0
0
Hi

Im doing a little program using the USIC module as I2C. For this mi using the XMC1200 boot kit.
I need to do a driver to control a I2C serial EEPROM (24LC16B).
I did two functions, one for write and another to read the momery. In link is the component datasheet.

http://www.microchip.com/wwwproducts/en/24LC16B

I think I configure properly but it doesn't run. Can someone help?? I cant see the I2C signals with the oscilloscope.


This is my code:

#include "xmc_scu.h"
#include "xmc_gpio.h"
#include "xmc_i2c.h"


#define EEPROM_I2C_ADR 0xA0

#define SDA_PIN P0_7
#define SCL_PIN P0_8

void EEPROM_SendByte (void);
void EEPROM_ReadByte (void);

uint8_t DataToSend = 0x55;
uint8_t ReceivedData;
uint8_t MemoryAddress = 0x00;

XMC_SCU_CLOCK_CONFIG_t clock_config;

XMC_GPIO_CONFIG_t led1_config;

XMC_GPIO_CONFIG_t sda_pin_config;
XMC_GPIO_CONFIG_t scl_pin_config;

/* I2C configuration */
XMC_USIC_CH_t *i2c = XMC_I2C0_CH1;

XMC_I2C_CH_CONFIG_t i2c_cfg;

void EEPROM_SendByte (void){
XMC_I2C_CH_MasterStart(i2c, EEPROM_I2C_ADR, XMC_I2C_CH_CMD_WRITE); // I2C send repeated start command (with slave address) to write Data to PCA9502
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED); // clear ACK flag in register PSR

XMC_I2C_CH_MasterTransmit(i2c, MemoryAddress); // I2C send TxData=IO_STATE
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED);

XMC_I2C_CH_MasterTransmit(i2c, DataToSend); // I2C send TxData=IO_STATE
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED);

XMC_I2C_CH_MasterStop(i2c);
}

void EEPROM_ReadByte (void){
//Random read operations allow the master to access any memory location in a random manner
XMC_I2C_CH_MasterStart(i2c, EEPROM_I2C_ADR, XMC_I2C_CH_CMD_WRITE); // I2C send repeated start command (with slave address) to write Data to PCA9502
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED); // clear ACK flag in register PSR

XMC_I2C_CH_MasterTransmit(i2c, MemoryAddress); // I2C send TxData=IO_STATE
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED); // clear ACK flag in register PSR

XMC_I2C_CH_MasterStop(i2c);

XMC_I2C_CH_MasterStart(i2c, EEPROM_I2C_ADR, XMC_I2C_CH_CMD_READ); // I2C send repeated start command (with slave address) to Read Data from PCA9502
while((XMC_I2C_CH_GetStatusFlag(i2c) & XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED) == 0U){} // wait until ACK
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_ACK_RECEIVED); // clear ACK flag in register PSR

XMC_I2C_CH_MasterReceiveNack(i2c); // I2C send dummy with NACK to read only one byte
while((XMC_I2C_CH_GetStatusFlag(i2c) & (XMC_I2C_CH_STATUS_FLAG_RECEIVE_INDICATION |
XMC_I2C_CH_STATUS_FLAG_ALTERNATIVE_RECEIVE_INDICAT ION)) == 0U){} // wait until AIR or RI ('USIC_AI.007')
XMC_I2C_CH_ClearStatusFlag(i2c, XMC_I2C_CH_STATUS_FLAG_RECEIVE_INDICATION |
XMC_I2C_CH_STATUS_FLAG_ALTERNATIVE_RECEIVE_INDICAT ION); // clear both AIR and RI

ReceivedData = XMC_I2C_CH_GetReceivedData(i2c); // get RxData from RBUF

XMC_I2C_CH_MasterStop(i2c);
}

int main(void)
{
/* Configure Clock */
clock_config.pclk_src = XMC_SCU_CLOCK_PCLKSRC_MCLK; /*PCLK = MCLK*/
clock_config.fdiv = 0; /**< Fractional divider */
clock_config.idiv = 0; /**MCLK = 32MHz */

XMC_SCU_CLOCK_Init(&clock_config);

/* Configure LED1 */
led1_config.mode = XMC_GPIO_MODE_OUTPUT_PUSH_PULL;
XMC_GPIO_Init(XMC_GPIO_PORT0,6, &led1_config);

/* I2C configuration */
i2c_cfg.baudrate = 400000U;

XMC_I2C_CH_Init(i2c, &i2c_cfg);
XMC_I2C_CH_Start(i2c);

/* I2C initialization sequence*/
XMC_I2C_CH_SetInputSource(i2c, XMC_I2C_CH_INPUT_SDA , USIC0_C0_DX1_P0_7);
XMC_I2C_CH_SetInputSource(i2c, XMC_I2C_CH_INPUT_SCL , USIC0_C0_DX1_P0_8);

/* I2C port pin configuration*/
sda_pin_config.mode = XMC_GPIO_MODE_OUTPUT_OPEN_DRAIN_ALT7;
XMC_GPIO_Init(SDA_PIN, &sda_pin_config);
scl_pin_config.mode = XMC_GPIO_MODE_OUTPUT_OPEN_DRAIN_ALT7;
XMC_GPIO_Init(SCL_PIN, &scl_pin_config);

while(1U){
ReceivedData = 0;
EEPROM_SendByte();
EEPROM_ReadByte();
if (DataToSend==ReceivedData){
XMC_GPIO_ToggleOutput(XMC_GPIO_PORT0,6);
}
}
}



Regards
Paul

IPG16N10S4-61A weight

$
0
0
Hi,

What does the part IPG16N10S4-61A weight.

Thanks!

Adding user files in Dave IDE

$
0
0
Hi! I'm creating a Dave CE project and I want to create different driver files. May I please know where I can add C source file and its header files?? Which are the main Source and Include directories for user files?? In all the examples given, the complete code is in main.c

24GHz automotive radar development kit - Unreliable measurements

$
0
0
Hello,

I am using the 24GHz automotive radar kit. The measurements returned by the radar kit for the distance, speed, angle and RCS seem to be very inconsistent and unreliable. Is anyone else having this problem too?

TC237 - QSPI - ClockPolarity to be changed from Low to High - Startup sequence

$
0
0
Hi,

I have to realise an scenario

CPOL is either set to HIGH or LOW..

Scenario , CPOL to be set LOW initially, during SERIAL DATA transmission i have make CPOL - HIGH for a specific duration. After that Normal Clock operation.

This scenario should be done only once during initial first DATA byte transmission.

is it possible to realise the above scenario? If yes Kindly help with the solution.

printf in Keil MDK (v5.23)

Programming XMC1302

$
0
0
Have you solved the problem.

If your XMC1302 is a new blank chip. You should first change the BMI configuration via the UART. Because new chip is configured as such.
Attachment 2826
?????

USBD_VCOM_SendData Problem

$
0
0
I want to send 2048 bytes data at once with USBD_VCOM_SendData on XMC4500, but I can not do it.
If I send 2048 bytes data twice with USBD_VCOM_SendData on the XMC4500, 4096 bytes data is transmitted in the second transmission.
If I transmit 2049 bytes data with USBD_VCOM_SendData on the XMC4500, it is sent at once.
Please tell me how to transmit 2048 bytes data at once with USBD_VCOM_SendData on XMC4500.

what the best way to calculate Rg gate driver for Mosfet

$
0
0
I need to drive a MOSFET IPW90R120C3(datasheet:http://www.kynix.com/uploadfiles/pdf...PW90R120C3.pdf ) from Infineon here the Specification of MOSFET

VDS @ TJ=25°C 900 V
Rdson @ TJ=25°C : 0.12ohm
Qg = 270nC
Specification of driver IR2110

Isource: 2A
Isink : 2A
VOUT 10 - 20V
ton/off (typ.) 120 & 94 ns
Driver supply : 15V
The switch frequency Fsw= 50KH

what the best way to calculate the resistance Rg to drive proprely the MOSFET ? best regards
?????

Ecat_ssc

$
0
0
Hi. I've been successfully using the following DAVE example project, on an XMC4300 board:

XMC4300 EtherCAT APP SSC Slave Example V2.1

I can see the example uses an 'ECAT_SSC [4.0.8]' APP. In the 'Add New APP' dialogue, it's listed under the Communication > Industrial category.

However, if I start a new DAVE project, XMC4700 based, I don't have that category.

I've tried everything I've read online and within DAVE, about adding a new APP. Going via 'Help > Install DAVE APP/Example/Device Library...'
But the ECAT_SSC APP is nowhere to be found. It doesn't exist within the UpdateSiteDAVEApps_1_0_66.zip I've downloaded (252GB).
And following the online Infineon instructions to install those APPs locally for use, failed anyway, with file not found errors on every APP..

Within the example project, 'Help > Uninstall DAVE APP/Example/Device Library...' lists the ECAT_SSC APP,
and gives the URI as 'http://resources/DaveAppLibrary/XMC4000/ECAT_SSC'. Within my new project, trying to install ECAT_SSC from that location, fails.

I've also tried switching the example project from XMC4300 to XMC4700, which is all I really want to do. However, the DAVE Project Upgrade > Device Migration,
lists no other available devices as migration targets. Hence, the attempt to create a new project, XMC4700-based.

I've searched the DAVE Forum and the web generally for any further insights, without luck.

Any ideas?

Thanks!

David King

DC/DC converter

$
0
0
Hello,
I on my way designing circuits for a DC/DC converter. I should find circuit details about the microllcontroller that we use.
So I was wondering where the block diagramm of PX3517 .

Thank you in advance.

How of determine clock speed of TC29x Microcontroller ?

$
0
0
The microcontroller is wired with external Crystal / Ceramic Resonator Mode with external components.

EtherCAT + ModbusTCP

$
0
0
Hi,

I'm working on an XMC4800 project, that requires EtherCAT comms and ModbusTCP comms.
I've got both working individually, based on the respective example DAVE projects. The project
specification, is to perform reads with each at 1kHz, or as near to that as can be achieved.

For each, comms is running nice and fast. The EtherCAT project is reading at 1kHz. For the ModbusTCP project,
I can use the following modpoll command line, reading 4 integers, with the minimum specifiable poll rate, of 0 ms
(option -l 0). Per the following command line, I'm reading 4 registers, addresses 1-4:

modpoll -m tcp -r 1 -c 4 -t 3 -l 0 192.168.0.10

I achieve a poll rate, measured using an incrementing counter and stopwatch, of around 990Hz.
If I try dropping the specified poll rate, to 1 ms (option -l 1), then I achieve a measured poll rate of around 710Hz.
I can do anything I like on my PC, and there and there are no upsets to the ModbusTCP comms.
So far, so good.

Now, I try 'merging' the two projects, so I have EtherCAT and ModbusTCP, within the same project.
The EtherCAT still works fast. But unfortunately, the ModbusTCP becomes flaky:

After a few seconds running, ModPoll stops with a 'TCP/IP connection was closed by remote peer!' error.
Or, starts reporting continual 'Invalid MPAB indentifer!' errors, ModPoll can be stopped with Ctrl-C as usual.
Modpoll can be restarted, but only runs for a few seconds, before another error.

Infact, I could only get ModbusTCP to run for any length of time, by specifying a ModPoll poll rate, of 100 ms
(option -1 100). Although I imagine if I wait long enough, it might still stop.

I have three LAN adaptors on my PC, one each for EtherCAT, ModbusTCP, and corporate LAN. So each has
a dedicated LAN adaptor. One adaptor is onboard, the other two are USB-to-LAN devices.

After many hours of comparing all elements of my 'merged' project, with my ModbusTCP-only project,
including comparing the APP properties, source code using WinMerge, etc, etc, and finding no
differences at all in the ModbusTCP implementation, I had a thought:

Try stripping out from the 'merged' project, the ECAT_SSC APP, the subsidiary clock-sync APPs,
and the EtherCAT callback code. And lo-and-behold, ModbusTCP robustness and performance, was restored.
So, seems something about having EtherCAT infrastructure present, is causing ModbusTCP flakiness.

Within the pre-strip copy of the 'merged' project, I notice that the interrupt handlers for the EtherCAT and ModbusTCP
APPS, namely ECAT_SSC_0 and ETH_LWIP_0, both have the maximum DAVE interrupt priority, of 63. I thought,
why not try lowering the former, to 62. But that had no effect, on the ModbusTCP flakiness.

I also have other priority 63 interrupt handlers in the project, so I tried lowering those also to 62. But likewise,
no effect on the ModbusTCP flakiness.

Infact, I electrically disconnected all external sources of interrupts other than ModbusTCP. Even the EtherCAT LAN cable.
But still, the ModbusTCP flakiness persisted. So, seems just the presence of EtherCAT infrastructure within the project,
is resulting in the ModbusTCP flakiness.

Lastly, I tried commenting within the main loop, everything except for ModbusTCP polling. I'm running RTOS-less,
per project specification. So I have a sys_check_timeouts call, in the main loop, as well as the ModbusTCP poll call.
Also an LED toggle call, that shows me that nothing is hanging within the main loop, causing the flakiness. So I'm at
a bit of a loss, if it's not main loop hanging, or interrupts, that are causing the ModbusTCP flakiness.

eMBPoll( MB_TCP );
sys_check_timeouts();
XMC_GPIO_ToggleOutput(P_LED1);

Any ideas!?

Best regards,

David
Viewing all 9892 articles
Browse latest View live


Latest Images

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