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

Using program scratch pad

$
0
0
Hello,

I am not sure if this will work out because even if I copy my code from flash to PSPR, any code that calls my code will still jump to original location address in the flash and not in location address in the PSPR because was known location address at link time.
Or did I understand it differently?

What is the End User Data Width Size for each of the 6 Store Locations in TC1.6.2P

$
0
0
The maximum width is 64 bits. You can infer that from the merging behavior:
Quote:

To improve performance the store buffer will merge consecutive data values to reduce the number of memory
accesses required. The following operations are merged in the store buffer
• Consecutive byte writes to the same half word location.
• Consecutive half-word writes to the same word location.
• Consecutive word writes to the same double word location.

F4-23MR12W1M1P_B11 heatsink

$
0
0
Hello Hamza,

Unfortunately, I cannot recommend any particular brand or model for the heat sink.
I understand that finding the correct one might be difficult.
There is no standard heatsink type that is intended for your module, so you will have to be guided by the dimensions of the backplate.
This module is mostly used with custom heat sinks.
I attach an app note which gives you the dimension details for your specific module, and how to successfully mount it.

https://www.infineon.com/dgdl/Infine...1c40fb1efb7919

I understand that this is not the answer that you were hoping for, but this is as much as I can do.
Let me know if you can identify a model which suits your dimensions.

Best regards,
Pablo

I2C Errors not detected

$
0
0
I have written a test program with DAVE 4 that uses I2C interfaces an an XMC4500.
When there are no problems with the hardware, everything works correctly, but if the hardware has a problem (pull-up missing for example) the program hangs.

I use the I2C_MASTER_Transmit() function to send the data and then wait until it is not busy, using I2C_MASTER_IsTxBusy(). In the case of a bus error, it just remains busy for ever! I have tried looking at the status but I cannot find any status that shows this error.

How can I write a robust program that works with hardware errors? There must be some way to detect this situation and deal with it in the software. Which bit of which register do I need to look at?

Microcontroller TLE9879QXA40

$
0
0
Dear Varun

you have first to set-up the motor parameters properly. Using the Arduino shield, the motor parameters can be set using the commands as described in the app note:

https://www.infineon.com/dgdl/Infine...69a0bb25396e7d

In the par. 4.4 you find the setting of the motor parameters, for example:

shields->setParameter(FOC_POLE_PAIRS , 4, BOARD1); // it configures the pole pairs to 4

shields->setParameter(FOC_PWM_FREQ, 20000, BOARD1); // it configures the PWM frequency to 20 kHz

Best regards
Ramius

XMC1100 Real Time Clock (RTC)

$
0
0
Hi,

Did you confirm this on component register values(RTC Time Register 0? If you are using RTC_GetTime() API for this purpose understand the value incremented by 1, is returned by the API.

See the code below

Code:

void RTC_GetTime(XMC_RTC_TIME_t *current_time)
{
  XMC_ASSERT("RTC_GetTime: NULL pointer", current_time != NULL);

  XMC_RTC_GetTime(current_time);

  current_time->days = current_time->days + 1U;
  current_time->month = current_time->month + 1U;
}

I could confirm the values are as expected from the register values. Let me know if I missed anything.

Best Regards,
Vasanth

upgrade apps - After updating my project i still have the old versions of the apps

$
0
0
Hi Florian,

Could you go to Help -> Install Dave Apps/Example/Device Library Option. From there under Dave Apps Library Manager option, can you make sure you download the latest version of the Apps. Let us know if the issue exists even after this.
Also if you were trying to use migration option on an existing project, let us know which project you were trying to use. I could try to recreate the issue at my end.

Best Regards,
Vasanth

XMC4500 sending values from ADC to USB

$
0
0
Hi Vasanth,
yes, it works, thank you for your help!

Counter_App: missing function COUNTER_SetCurrentCount

$
0
0
Hello,

i was missing a function to set a current count value. It would be nice if you add the following function in the next app release:

Code:

void COUNTER_SetCurrentCount(COUNTER_t *const handle_ptr, const uint16_t timer_val)
{
  XMC_ASSERT("COUNTER_GetEventCount:Invalid handle_ptr", (handle_ptr != NULL))

#ifdef COUNTER_CCU4_USED
  if (COUNTER_CCU4 == handle_ptr->counter_type)
  {
        XMC_CCU4_SLICE_StopTimer(handle_ptr->ccu4_handle->slice_ptr);
        XMC_CCU4_SLICE_SetTimerValue(handle_ptr->ccu4_handle->slice_ptr,timer_val);
        XMC_CCU4_SLICE_StartTimer(handle_ptr->ccu4_handle->slice_ptr);
  }
#endif
#ifdef COUNTER_CCU8_USED
  if (COUNTER_CCU8 == handle_ptr->counter_type)
  {
        XMC_CCU8_SLICE_StopTimer(handle_ptr->ccu8_handle->slice_ptr);
        XMC_CCU8_SLICE_SetTimerValue(handle_ptr->ccu8_handle->slice_ptr,timer_val);
        XMC_CCU8_SLICE_StartTimer(handle_ptr->ccu8_handle->slice_ptr);
  }
#endif

}

best regards
Andreas

What you need to know for designing in a MOSFET

$
0
0
What are the selection parameters for Mosfet?

DAVE TIP of the day: Semihosting in DAVEv4

Can one microcontroller I/O port drive two EN pins of two different BTN7030?

$
0
0
Is it possible that one microcontroller I/O port drives two EN pins of two different BTN7030?
Are there any limitations?

Working with BGT24LTR11N16

$
0
0
Hello everyone,
I am trying to work with the BGT24LTR11N16 board but without positive outcome. I connected VCC, VCC_PTAT and TX_ON to 3.3V bias, whereas GND, V_CTRL to gnd.
I am sure that the transceiver is transmitting because I observe the 24 GHz signal on my spectrum analyzer. However, at both IFI and IFQ I read only a continuous signal, 1.5 V, of course also in presence of movements.
Do you know what I am doing wrong?
Thanks in advance

Programming issues via uart with memtools

$
0
0
Hello,
I use the xmc1202 in my own board and load the program via uart (p0.14 and p0.15). The BMI is ASC_BSL with timeout. I have programmed several microcontrollers without problems, but there are always some that do not start after programming. The programming is always the same and there are no differences.
It seems like the microcontroller timer won't start and the fw is stuck somewhere. Does anyone have any idea what the problem could be?
Observation: if I load the FW with memtools and at the end the verify is wrong, then the fw runs. But if the verify is good, then the fw does not run.
Microcontroller: xmc1202
programming tool: memtools
programming interface: uart
I would be very grateful for any hint or recommendation.
Many thanks in advance.

Pablo

Aurix2G, EDSADC ReadMode

$
0
0
As is shown in the UserManual, "Single Read" means "The service request is generated when one result value is available", but in Figure 313, as I marked with red rectangle, there are 2 results available when the service request is generated. It seems contradictory to the description, is there some misunderstand with me for the usermanual?
Attachment 5696
?????

Aurix2G, EDSADC ReadMode

$
0
0
As is shown in the UserManual, "Single Read" means "The service request is generated when one result value is available", but in Figure 313, as I marked with red rectangle, there are 2 results available when the service request is generated. It seems contradictory to the description, is there some misunderstand with me for the usermanual?
Attachment 5697
?????

ATOM PWM Problem

$
0
0
Hey, I'm using the TC264 microcontroller to generate some PWM wave to drive a motor, but it just simply behaves wired. So I decided to checkout the waveform using a logic analyzer.

When the duty cycle was set to a value that does not represent a multiple of 50us, TC264 generates a PWM first, and non-active state later as the image shows. (The wave is active low, and should be 1kHz.)

Attachment 5698

Take the abnormal PWM closer, I found the minimum high period is 50us, and it's 1kHz frequency.

Attachment 5699

But duty cycle of 50us, 100us, 150us... is normal.

From Infineon AURIX™ TC2xx Microcontroller Training pdf ([URL="https://www.infineon.com/dgdl/Infineon-AURIX_Generic_Timer_Module-TR-v01_00-EN.pdf"]), it says "PWM generation with multiple channels
with 16 or 24-bit resolution with as low as 10 ns granularity", so I'm expecting the resolution of ATOM PWM should not be just 50us.

Here is my code, modified from iLLD example. Is anything wrong?
Code:

#define ATOM_PWM_CLK  100000000

// ...

if(gtm_inited == 0)
{
    IfxGtm_enable(&MODULE_GTM);
    IfxGtm_Cmu_setClkFrequency(&MODULE_GTM, IfxGtm_Cmu_Clk_0, ATOM_PWM_CLK);
    IfxGtm_Cmu_enableClocks(&MODULE_GTM, IFXGTM_CMU_CLKEN_CLK0);

    gtm_inited = 1;
}

IfxGtm_Atom_Pwm_initConfig(&g_atomConfig, &MODULE_GTM);

g_atomConfig.atom = pin.atom;
g_atomConfig.atomChannel = pin.channel;
g_atomConfig.pin.outputPin = &pin;
g_atomConfig.period = period;
g_atomConfig.dutyCycle = dutyCycle;
g_atomConfig.synchronousUpdateEnabled = TRUE;
g_atomConfig.signalLevel = Ifx_ActiveState_low;

IfxGtm_Atom_Pwm_init(&g_AtomDriverPWM_n, &g_atomConfig);
IfxGtm_Atom_Pwm_start(&g_AtomDriverPWM_n, TRUE);

// ...

C library support error while running CanSleepWakeupDemo on Aurix Development Studio

$
0
0
Hi masonyen,

did you finally solve your problem?

Regards,

Jens

PFlash erased check

$
0
0
Example program:
Code:

/*****************************************************
 *
 * \file TC23x_PFLASH_erase_check.c
 *
 * \description Demo code to use the flash program interface to check if a PFLASH word line is erased
 *
 * \copyright Copyright (C) Infineon Technologies AG 2021
 *
 * Use of this file is subject to the terms of use agreed between (i) you or
 * the company in which ordinary course of business you are acting and (ii)
 * Infineon Technologies AG or its licensees. If and as long as no such terms
 * of use are agreed, use of this file is subject to following:
 *
 * Boost Software License - Version 1.0 - August 17th, 2003
 *
 * Permission is hereby granted, free of charge, to any person or organization
 * obtaining a copy of the software and accompanying documentation covered by
 * this license (the "Software") to use, reproduce, display, distribute,
 * execute, and transmit the Software, and to prepare derivative works of the
 * Software, and to permit third-parties to whom the Software is furnished to
 * do so, all subject to the following:
 *
 * The copyright notices in the Software and this entire statement, including
 * the above license grant, this restriction and the following disclaimer,
 * must be included in all copies of the Software, in whole or in part, and
 * all derivative works of the Software, unless such copies or derivative
 * works are solely in the form of machine-executable object code generated
 * by a source language processor.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
 * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
 * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *****************************************************************************/

#include "IfxFlash_reg.h"
#include "IfxScu_reg.h"
#include "stdint.h"
#include "stdbool.h"

bool flash_erased( uint32_t test_address );

volatile uint32_t nonzero_bits;
volatile uint8_t test_blank;

#define FLASH_USER_MARGIN_READ (3U)

// For the ContentVerify we need to calculate
// a) the "base address", which is a multiple of 256kByte
// b) the according WL number
// For that we need following two values for the calculation
//
#define FLASH_VERIFY_CONTENT_SECTOR_SIZE                0x40000    // 256kByte according to ITS
#define FLASH_WORDLINE_SIZE                                                0x200          // 512 Bytes

#define FLASH_SEQ1 ((*(volatile uint32_t *) 0xAF00AA50u))
#define FLASH_SEQ2 ((*(volatile uint32_t *) 0xAF00AA58u))
#define FLASH_SEQ3 ((*(volatile uint32_t *) 0xAF00AAA8u))


void main( void )
{
        test_blank = flash_erased( 0xA0000000 );
        test_blank = flash_erased( 0xA0000400 );
        test_blank = flash_erased( 0xA0000800 );
        test_blank = flash_erased( 0xA0100000 );
        test_blank = flash_erased( 0xA01F0400 );

        for( ;; )
        {
        }
}

bool flash_erased( uint32_t test_address )
{
        uint32_t wordline_number;
        uint32_t base_address;

        volatile uint32_t comm1=0;
        volatile uint32_t comm2;
        uint32_t ucode;

        uint32_t testmode_var;
        uint32_t current;
        uint32_t comm2_bit14_to_bit10_var;
        uint32_t wordline_number_comm1_var;
        uint32_t wordline_number_comm2_var;
        uint32_t comm1_status;
        uint32_t comm2_status;

        // Wordline and Base Address calculation
        // Test is performed on WL number, within a multiple of 256kByte memory range
        //
        wordline_number = (test_address % FLASH_VERIFY_CONTENT_SECTOR_SIZE) / FLASH_WORDLINE_SIZE;// Calculates the WL number, which is
        base_address = (test_address/FLASH_VERIFY_CONTENT_SECTOR_SIZE) * FLASH_VERIFY_CONTENT_SECTOR_SIZE; //Calculate the base address, which is a multiple of 256kByte

        // The User Margin Read function requires a current parameter,
        // depending on AURIX firmware version
        //
        ucode = SCU_CHIPID.B.UCODE;
        if( ucode >= 0x20 )
        {
                // In UCODE >= 0x20, the current parameter should be 0.
                current = 0;
        }
        else if( (ucode >= 0x10) && (ucode <= 0x14) )
        {
                // In versions 0x10 to 0x14, the current should be 5.
            current = 5;
        }
        else
        {
                // Older UCODE versions don't support User Margin Read
                return false;
        }

        // Prepare arguments, shift to needed position
        //
        testmode_var                                = (0x00000003 & FLASH_USER_MARGIN_READ)<<8;  // prepared Command test mode
        comm2_bit14_to_bit10_var        = (0x0000001F & current)<<10; // prepare "reference current" or "control gate voltage" arguments
        wordline_number_comm2_var        = (0x00000001 & wordline_number) << 15;  // Wordline-number bit[0]  which is located in COMM2 Register
        wordline_number_comm1_var        = (0x000001FE & wordline_number) << 7;  // Wordline-number bit[8:1] which is located in COMM1 Register

        // Write arguments to COMM registers
        //
        FLASH0_COMM2.U = wordline_number_comm2_var | comm2_bit14_to_bit10_var | testmode_var;
        FLASH0_COMM1.U = wordline_number_comm1_var;

        // Read registers to make sure store buffers have been flushed
        // before starting FLASH command.
        //
        comm2 = FLASH0_COMM2.U;
        comm1 = FLASH0_COMM1.U;
        comm1 += comm2;

        // Clear flash status
        FLASH0_FSR.U = 0xFA;

        // Start FLASH Command Sequence
        //
        FLASH_SEQ1 = base_address;
        FLASH_SEQ2 = 1;  // verify 1 512 byte word line (sector)
        FLASH_SEQ3 = 0x80;
        FLASH_SEQ3 = 0x5F;

        // Wait the required minimum 23us
        // - if this isn't long enough, you'll get a bus error accessing FLASH0_COMM1
        //
        //wait_x_10ns(2400); //wait 23us + 1 us;
        volatile uint32_t i;
        for( i=0; i<2000; i++ )        // 148 works at 100 MHz internal oscillator clock
        {
        }

        // Collect the Results from the COMMx Register
        // - The result is returned as 13-bit unsigned integer with bits 7:0 in COMM1.STATUS
        //  and bits 12:8 in COMM2.STATUS bits 4:0
        //
        comm1_status = FLASH0_COMM1.U & 0x000000FF;
        comm2_status = FLASH0_COMM2.U & 0x0000001F;

        nonzero_bits = ((comm2_status & 0x1F) << 8) | comm1_status;

        // The word line is erased if the count of non-zero bits is <= 2
        //
        return( nonzero_bits <= 2 );
}

IRPS5401 won't start / initial bring-up

$
0
0
Hi Guys, I have the similar issue. The part on the board I got is blank, even I use the POWIR write the same register values, the chip doesn't come up. The resistor on board is set to +5 of MTP, does that mean I have to write the MTP 6 times in order for the chip to load the correct value or I need to change the resistor to +0 or +1?
Viewing all 9892 articles
Browse latest View live


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