AURIX™ Forum Discussions
Sort by:
AURIX™
Hi All,we are using the TC397.Is there any facitlity to timestamp each reading with the EVADC ?the time stamp can be the system clock of some other co...
Show More
Hi All,
we are using the TC397.
Is there any facitlity to timestamp each reading with the EVADC ?
the time stamp can be the system clock of some other counter/clock derived from it.
Kindly let me know.
thanks and Rgards,
AAA Show Less
we are using the TC397.
Is there any facitlity to timestamp each reading with the EVADC ?
the time stamp can be the system clock of some other counter/clock derived from it.
Kindly let me know.
thanks and Rgards,
AAA Show Less
AURIX™
Hi everyone!I have been trying to create 3 complementary pairs of PWM outputs with a high and low channel using the IfxGtm_Atom_PwmHl driver. The func...
Show More
Hi everyone!
I have been trying to create 3 complementary pairs of PWM outputs with a high and low channel using the IfxGtm_Atom_PwmHl driver. The functionalities I need are deadtime and shifted output.
Before, I managed to create 3 complementary pairs of PWM output with deadtime using the CCU6 library, but since I also need to be able to shift the output relative to other channels, I believe this module is not suited anymore.
Thus, I land at the IfxGtm_Atom_PwmHl driver. Sadly, I can not generate PWM outputs at all. Can someone point me in the right direction?
Using only IfxGtm_Atom_PwmHl
Using standard interface:
Alternatively, the full source is attached. Show Less
I have been trying to create 3 complementary pairs of PWM outputs with a high and low channel using the IfxGtm_Atom_PwmHl driver. The functionalities I need are deadtime and shifted output.
Before, I managed to create 3 complementary pairs of PWM output with deadtime using the CCU6 library, but since I also need to be able to shift the output relative to other channels, I believe this module is not suited anymore.
Thus, I land at the IfxGtm_Atom_PwmHl driver. Sadly, I can not generate PWM outputs at all. Can someone point me in the right direction?
Using only IfxGtm_Atom_PwmHl
#include "Ifx_Types.h"
#include "IfxGtm_Atom_PwmHl.h"
// #include "IfxGtm_Atom_Dtm_PwmHl.h"
#include "PWM_Atom.h"
// Configuration
#define FXUCLK_FREQUENCY 100e6 // FXU Clock base frequency, in Hertz
#define PWM_FREQUENCY 105e3 // PWM signal frequency, in Hertz
#define PWM_PERIOD (FXUCLK_FREQUENCY / PWM_FREQUENCY) // PWM signal period, in ticks
//#define DEADTIME 200e-9 // Dead time in seconds - 200 ns. When an
// unexpected deadtime of 2.55e-x occurs,
// the deadtime is bigger than allowed.
#define NUMBER_OF_CHANNELS 1
void init_stdif_pwmhl(void)
{
// prepare ccx coutx in advance
IfxGtm_Atom_ToutMapP ccx[NUMBER_OF_CHANNELS];
IfxGtm_Atom_ToutMapP coutx[NUMBER_OF_CHANNELS];
ccx[0] = &IfxGtm_ATOM0_0_TOUT0_P02_0_OUT;
coutx[0] = &IfxGtm_ATOM0_1_TOUT1_P02_1_OUT;
// init
// - clock
IfxGtm_enable(&MODULE_GTM); /* Enable GTM */
IfxGtm_Cmu_enableClocks(&MODULE_GTM, IFXGTM_CMU_CLKEN_FXCLK); /* Enable the FXU clock */
// - timer
IfxGtm_Atom_Timer timer;
IfxGtm_Atom_Timer_Config timerConfig;
IfxGtm_Atom_Timer_initConfig(&timerConfig, &MODULE_GTM);
// g_atomConfig.pin.outputPin = &LED; /* Set LED as output */
// g_atomConfig.synchronousUpdateEnabled = TRUE; /* Enable synchronous update */
timerConfig.atom = ccx[0]->atom;
timerConfig.timerChannel = ccx[0]->channel; // but the channel of coutx[0] is also used! How to tell the driver?
// timerConfig.initPins = FALSE; // No idea what to use
timerConfig.base.frequency = PWM_FREQUENCY;
timerConfig.base.countDir = IfxStdIf_Timer_CountDir_up;
// timerConfig.base.trigger.enabled = TRUE; // 1/2 IfxCpu_Trap_busError
// timerConfig.base.trigger.outputEnabled = TRUE; // 2/2 IfxCpu_Trap_busError
IfxGtm_Atom_Timer_init(&timer, &timerConfig);
IfxGtm_Atom_Timer_run(&timer);
// - pwmHl
// IfxGtm_AtomDtm_PwmHl pwmHl;
// IfxGtm_Atom_Dtm_PwmHl_Config pwmHlConfig;
// IfxGtm_Atom_Dtm_PwmHl_initConfig(&pwmHlConfig);
IfxGtm_Atom_PwmHl pwmHl;
IfxGtm_Atom_PwmHl_Config pwmHlConfig;
IfxGtm_Atom_PwmHl_initConfig(&pwmHlConfig);
// pwmHlConfig.base.deadtime = 200e-9;
// pwmHlConfig.base.minPulse = 100e-9;
pwmHlConfig.base.channelCount = NUMBER_OF_CHANNELS;
// pwmHlConfig.base.emergencyEnabled = FALSE;
pwmHlConfig.base.outputMode = IfxPort_OutputMode_pushPull;
pwmHlConfig.base.outputDriver = IfxPort_PadDriver_cmosAutomotiveSpeed3;
pwmHlConfig.base.ccxOutputEnabled = TRUE;
pwmHlConfig.base.coutxOutputEnabled = TRUE;
// pwmHlConfig.base.ccxActiveState = Ifx_ActiveState_high;
// pwmHlConfig.base.coutxActiveState = Ifx_ActiveState_high;
// ccx and coutx configuration moved upwards
pwmHlConfig.timer = &timer;
pwmHlConfig.atom = timer.atomIndex;
pwmHlConfig.ccx = ccx;
pwmHlConfig.coutx = coutx;
// IfxGtm_Atom_Dtm_PwmHl_init(&pwmHl, &pwmHlConfig);
// IfxGtm_Atom_Dtm_PwmHl_setMode(&pwmHl, Ifx_Pwm_Mode_leftAligned);
IfxGtm_Atom_PwmHl_init(&pwmHl, &pwmHlConfig);
IfxGtm_Atom_PwmHl_setMode(&pwmHl, Ifx_Pwm_Mode_leftAligned);
// run
IfxGtm_Atom_Timer_run(&timer);
IfxGtm_Atom_Timer_disableUpdate(&timer);
IfxGtm_Atom_Timer_setSingleMode(&timer, FALSE);
IfxGtm_Atom_Timer_applyUpdate(&timer);
Ifx_TimerValue tOn = (uint32) PWM_PERIOD/2;
// Ifx_TimerValue tOn[2] = {PWM_PERIOD/2, PWM_PERIOD/2};
IfxGtm_Atom_PwmHl_setOnTime(&pwmHl, &tOn);
}
Using standard interface:
#include "Ifx_Types.h"
#include "IfxGtm_Atom_PwmHl.h"
// #include "IfxGtm_Atom_Dtm_PwmHl.h"
#include "PWM_Atom.h"
// Configuration
#define FXUCLK_FREQUENCY 100e6 // FXU Clock base frequency, in Hertz
#define PWM_FREQUENCY 105e3 // PWM signal frequency, in Hertz
#define PWM_PERIOD (FXUCLK_FREQUENCY / PWM_FREQUENCY) // PWM signal period, in ticks
//#define DEADTIME 200e-9 // Dead time in seconds - 200 ns. When an
// unexpected deadtime of 2.55e-x occurs,
// the deadtime is bigger than allowed.
#define NUMBER_OF_CHANNELS 1
void init_stdif_pwmhl(void)
{
// prepare ccx coutx in advance
IfxGtm_Atom_ToutMapP ccx[NUMBER_OF_CHANNELS];
IfxGtm_Atom_ToutMapP coutx[NUMBER_OF_CHANNELS];
ccx[0] = &IfxGtm_ATOM0_0_TOUT0_P02_0_OUT;
coutx[0] = &IfxGtm_ATOM0_1_TOUT1_P02_1_OUT;
// init
// - clock
IfxGtm_enable(&MODULE_GTM); /* Enable GTM */
IfxGtm_Cmu_enableClocks(&MODULE_GTM, IFXGTM_CMU_CLKEN_FXCLK); /* Enable the FXU clock */
// - timer
IfxGtm_Atom_Timer timer;
IfxGtm_Atom_Timer_Config timerConfig;
IfxGtm_Atom_Timer_initConfig(&timerConfig, &MODULE_GTM);
// g_atomConfig.pin.outputPin = &LED; /* Set LED as output */
// g_atomConfig.synchronousUpdateEnabled = TRUE; /* Enable synchronous update */
timerConfig.atom = ccx[0]->atom;
timerConfig.timerChannel = ccx[0]->channel; // but the channel of coutx[0] is also used! How to tell the driver?
// timerConfig.initPins = FALSE; // No idea what to use
timerConfig.base.frequency = PWM_FREQUENCY;
timerConfig.base.countDir = IfxStdIf_Timer_CountDir_up;
// timerConfig.base.trigger.enabled = TRUE; // 1/2 IfxCpu_Trap_busError
// timerConfig.base.trigger.outputEnabled = TRUE; // 2/2 IfxCpu_Trap_busError
IfxGtm_Atom_Timer_init(&timer, &timerConfig);
IfxGtm_Atom_Timer_run(&timer);
// - pwmHl
// IfxGtm_AtomDtm_PwmHl pwmHl;
// IfxGtm_Atom_Dtm_PwmHl_Config pwmHlConfig;
// IfxGtm_Atom_Dtm_PwmHl_initConfig(&pwmHlConfig);
IfxGtm_Atom_PwmHl pwmHl;
IfxGtm_Atom_PwmHl_Config pwmHlConfig;
IfxGtm_Atom_PwmHl_initConfig(&pwmHlConfig);
// pwmHlConfig.base.deadtime = 200e-9;
// pwmHlConfig.base.minPulse = 100e-9;
pwmHlConfig.base.channelCount = NUMBER_OF_CHANNELS;
// pwmHlConfig.base.emergencyEnabled = FALSE;
pwmHlConfig.base.outputMode = IfxPort_OutputMode_pushPull;
pwmHlConfig.base.outputDriver = IfxPort_PadDriver_cmosAutomotiveSpeed3;
pwmHlConfig.base.ccxOutputEnabled = TRUE;
pwmHlConfig.base.coutxOutputEnabled = TRUE;
// pwmHlConfig.base.ccxActiveState = Ifx_ActiveState_high;
// pwmHlConfig.base.coutxActiveState = Ifx_ActiveState_high;
// ccx and coutx configuration moved upwards
pwmHlConfig.timer = &timer;
pwmHlConfig.atom = timer.atomIndex;
pwmHlConfig.ccx = ccx;
pwmHlConfig.coutx = coutx;
// IfxGtm_Atom_Dtm_PwmHl_init(&pwmHl, &pwmHlConfig);
// IfxGtm_Atom_Dtm_PwmHl_setMode(&pwmHl, Ifx_Pwm_Mode_leftAligned);
IfxGtm_Atom_PwmHl_init(&pwmHl, &pwmHlConfig);
IfxGtm_Atom_PwmHl_setMode(&pwmHl, Ifx_Pwm_Mode_leftAligned);
// run
// - setup stdif
IfxStdIf_Timer timer_stdif;
IfxGtm_Atom_Timer_stdIfTimerInit(&timer_stdif, &timer);
// IfxStdIf_Timer *timer_stdif = IfxStdIf_PwmHl_getTimer(&pwmHl_stdif);
IfxStdIf_PwmHl pwmHl_stdif;
IfxGtm_Atom_Dtm_PwmHl_stdIfPwmHlInit(&pwmHl_stdif, &pwmHl);
// - run stdif
IfxStdIf_Timer_run(&timer_stdif);
IfxStdIf_Timer_disableUpdate(&timer_stdif); // To allow timer changes
Ifx_TimerValue tOn = (uint32) PWM_PERIOD/2;
// Set trigger point
// IfxStdIf_Timer_setTrigger(&timer_stdif, tOn);
// Set period of cycle
Ifx_TimerValue period = (uint32) PWM_PERIOD;
IfxStdIf_Timer_setPeriod(&timer_stdif, period);
// Set duty cycle on time
IfxStdIf_PwmHl_setOnTime(&pwmHl_stdif, &tOn);
IfxStdIf_Timer_applyUpdate(&timer_stdif); // To implement timer changes
IfxStdIf_Timer_run(&timer_stdif);
}
Alternatively, the full source is attached. Show Less
AURIX™
hello, . I am having a query about DMA transfer. 1) I am developing DMA driver and It requires a continous DMA transfer from Source to Destination...
Show More
hello,
. I am having a query about DMA transfer.
1) I am developing DMA driver and It requires a continous DMA transfer from Source to Destination which is intiated by Software reuest.
After going through the manual and examples I understand "CHCSR.SCH = 1" will initiate automatically DMA transfer and when i implemented in my code it doesnt work and I was getting TRAP error while debugging.
My question:- Is it possible to perform continous DMA transfer without using linked list feature?
Note:- I am using iLLD for reference.
Kindly help me on this query.
void initDMA(void)
{
// int i;
/* Load default module configuration into configuration structure */
IfxDma_Dma_initModuleConfig(&g_DMA.dmaConfig, &MODULE_DMA);
/* Initialize module with configuration. */
IfxDma_Dma_initModule(&g_DMA.dmaHandle, &g_DMA.dmaConfig);
/* Get/initialize DMA channel configuration for all DMA channels otherwise use &g_Dma.dmaChannel as target */
IfxDma_Dma_initChannelConfig(&g_DMA.dmaChNCfg, &g_DMA.dmaHandle);
/* Set desired DMA channel: Channel 0 is used */
g_DMA.dmaChNCfg.channelId = DMA_CHANNEL_ID;
/* Setup the operation mode/settings for DMA channel */
g_DMA.dmaChNCfg.moveSize = IfxDma_ChannelMoveSize_32bit;
/* Set the number of DMA transfers */
g_DMA.dmaChNCfg.transferCount = (uint16)MEMORY_TRANSFER_NUM_DATA;
/* Execute the DMA transaction with only one trigger */
g_DMA.dmaChNCfg.requestMode = IfxDma_ChannelRequestMode_completeTransactionPerRequest;
g_DMA.dmaChNCfg.shadowControl = IfxDma_ChannelShadow_srcDirectWrite;
g_DMA.dmaChNCfg.sourceAddress = (uint32)&Source;
g_DMA.dmaChNCfg.destinationAddress = (uint32)&destination;
/* Address to next TCS */
for(int i = 0; i < BUFFERSIZE ; i++){
g_DMA.dmaChNCfg.shadowAddress = (uint32)&Source[(i + 1) % BUFFERSIZE]; }
/* Enable interrupt on completion of the last DMA */
g_DMA.dmaChNCfg.channelInterruptEnabled = TRUE;
// Init DMA
IfxDma_Dma_initChannel(&g_DMA.dmaChannel, &g_DMA.dmaChNCfg);
// Autostart
g_DMA.dmaChannel.channel->CHCSR.B.SCH = 1;
/* Configure & enable DMA Channel0 interrupt */
g_dmaCh0Src_ = IfxDma_Dma_getSrcPointer(&g_DMA.dmaChannel);
IfxSrc_init(g_dmaCh0Src_, IfxSrc_Tos_cpu0, ISR_PRIORITY_DMA_CH0);
IfxSrc_enable(g_dmaCh0Src_);
}
Regards,
Deepak Show Less
. I am having a query about DMA transfer.
1) I am developing DMA driver and It requires a continous DMA transfer from Source to Destination which is intiated by Software reuest.
After going through the manual and examples I understand "CHCSR.SCH = 1" will initiate automatically DMA transfer and when i implemented in my code it doesnt work and I was getting TRAP error while debugging.
My question:- Is it possible to perform continous DMA transfer without using linked list feature?
Note:- I am using iLLD for reference.
Kindly help me on this query.
void initDMA(void)
{
// int i;
/* Load default module configuration into configuration structure */
IfxDma_Dma_initModuleConfig(&g_DMA.dmaConfig, &MODULE_DMA);
/* Initialize module with configuration. */
IfxDma_Dma_initModule(&g_DMA.dmaHandle, &g_DMA.dmaConfig);
/* Get/initialize DMA channel configuration for all DMA channels otherwise use &g_Dma.dmaChannel as target */
IfxDma_Dma_initChannelConfig(&g_DMA.dmaChNCfg, &g_DMA.dmaHandle);
/* Set desired DMA channel: Channel 0 is used */
g_DMA.dmaChNCfg.channelId = DMA_CHANNEL_ID;
/* Setup the operation mode/settings for DMA channel */
g_DMA.dmaChNCfg.moveSize = IfxDma_ChannelMoveSize_32bit;
/* Set the number of DMA transfers */
g_DMA.dmaChNCfg.transferCount = (uint16)MEMORY_TRANSFER_NUM_DATA;
/* Execute the DMA transaction with only one trigger */
g_DMA.dmaChNCfg.requestMode = IfxDma_ChannelRequestMode_completeTransactionPerRequest;
g_DMA.dmaChNCfg.shadowControl = IfxDma_ChannelShadow_srcDirectWrite;
g_DMA.dmaChNCfg.sourceAddress = (uint32)&Source;
g_DMA.dmaChNCfg.destinationAddress = (uint32)&destination;
/* Address to next TCS */
for(int i = 0; i < BUFFERSIZE ; i++){
g_DMA.dmaChNCfg.shadowAddress = (uint32)&Source[(i + 1) % BUFFERSIZE]; }
/* Enable interrupt on completion of the last DMA */
g_DMA.dmaChNCfg.channelInterruptEnabled = TRUE;
// Init DMA
IfxDma_Dma_initChannel(&g_DMA.dmaChannel, &g_DMA.dmaChNCfg);
// Autostart
g_DMA.dmaChannel.channel->CHCSR.B.SCH = 1;
/* Configure & enable DMA Channel0 interrupt */
g_dmaCh0Src_ = IfxDma_Dma_getSrcPointer(&g_DMA.dmaChannel);
IfxSrc_init(g_dmaCh0Src_, IfxSrc_Tos_cpu0, ISR_PRIORITY_DMA_CH0);
IfxSrc_enable(g_dmaCh0Src_);
}
Regards,
Deepak Show Less
AURIX™
Here you can find a Quick Training for AURIX™ (entry-level):https://www.infineon.com/cms/en/product/microcontroller/32-bit-tricore-microcontroller/32-bit-tricore-aurix-tc2xx/#!trainings...
Show More
Here you can find a Quick Training for AURIX™ (entry-level):
https://www.infineon.com/cms/en/product/microcontroller/32-bit-tricore-microcontroller/32-bit-tricore-aurix-tc2xx/#!trainings
Here you can find the AURIX™ 32-bit microcontrollers for automotive and industrial applications brochure:
https://www.infineon.com/dgdl/Infineon-TriCore_Family_BR-ProductBrochure-v01_00-EN.pdf?fileId=5546d4625d5945ed015dc81f47b436c7 Show Less
https://www.infineon.com/cms/en/product/microcontroller/32-bit-tricore-microcontroller/32-bit-tricore-aurix-tc2xx/#!trainings
Here you can find the AURIX™ 32-bit microcontrollers for automotive and industrial applications brochure:
https://www.infineon.com/dgdl/Infineon-TriCore_Family_BR-ProductBrochure-v01_00-EN.pdf?fileId=5546d4625d5945ed015dc81f47b436c7 Show Less
AURIX™
Hi all,I would like to calculate the current time of the system using the uC TC222 (the time since the system is powered on). I know from the document...
Show More
Hi all,
I would like to calculate the current time of the system using the uC TC222 (the time since the system is powered on).
I know from the documentation that the System Timer Module (STM) is used for this purpose. My question is: How to count the system time during the Standby Mode?
In Standby Mode, all timers except the WakeUp Timer are disabled.
Many thanks in advance. Show Less
I would like to calculate the current time of the system using the uC TC222 (the time since the system is powered on).
I know from the documentation that the System Timer Module (STM) is used for this purpose. My question is: How to count the system time during the Standby Mode?
In Standby Mode, all timers except the WakeUp Timer are disabled.
Many thanks in advance. Show Less
AURIX™
Hello,I have a problem with Ethernet TX CLK at P11.4 no matter what I do its not outputted, What is the source of this CLK that maybe preventing its o...
Show More
Hello,
I have a problem with Ethernet TX CLK at P11.4 no matter what I do its not outputted, What is the source of this CLK that maybe preventing its output? I made sure the ethernet clk is configured and the module is enabled, what else could be the problem? Show Less
I have a problem with Ethernet TX CLK at P11.4 no matter what I do its not outputted, What is the source of this CLK that maybe preventing its output? I made sure the ethernet clk is configured and the module is enabled, what else could be the problem? Show Less
AURIX™
Hi Infineon partner, Currently, I develop our company's project program on the TC377 EVK platform and encounter a FLASH/OTP issue. I have ...
Show More
Hi Infineon partner,
Currently, I develop our company's project program on the TC377 EVK platform and encounter a FLASH/OTP issue.
I have a requirement to write some data to UCB_OTP0_ORIG/UCB_OTP0_COPY block of UCB. Is there any sample codes I can get to configure/read/write the UCB block? Thanks.
Best Regards,
Black Show Less
Currently, I develop our company's project program on the TC377 EVK platform and encounter a FLASH/OTP issue.
I have a requirement to write some data to UCB_OTP0_ORIG/UCB_OTP0_COPY block of UCB. Is there any sample codes I can get to configure/read/write the UCB block? Thanks.
Best Regards,
Black Show Less
AURIX™
[TC377, tasking v6.3r1, iLLD]I'm trying to configure "the trap extension" to understand what triggered the trap.following the iLLD User Documentation ...
Show More
[TC377, tasking v6.3r1, iLLD]
I'm trying to configure "the trap extension" to understand what triggered the trap.
following the iLLD User Documentation guide
I have:
-created a new TrapExtension.h file which I am attaching
-added
in Ifx_Cfg.h
-added:
in Ifx_Cfg_Trap.h
- I cause the trap by reading an incorrect memory location (0x0000100).
the trap is unleashed but my trap function is not performed.
I forgot something? Show Less
I'm trying to configure "the trap extension" to understand what triggered the trap.
following the iLLD User Documentation guide
I have:
-created a new TrapExtension.h file which I am attaching
-added
#define IFX_CFG_EXTEND_TRAP_HOOKS
in Ifx_Cfg.h
-added:
#include "TrapExtension.h" // Assuming this is the file name as in above example
#define IFX_CFG_CPU_TRAP_TSR_HOOK (trapInfo) myTrapExtensionHook (trapInfo) // This is INLINE function.
#define IFXCPU_TRAP_CFG_SYSCALL_CPU0_HOOK (trapInfo) mySysCallExtensionHook (trapInfo);
in Ifx_Cfg_Trap.h
- I cause the trap by reading an incorrect memory location (0x0000100).
the trap is unleashed but my trap function is not performed.
I forgot something? Show Less
AURIX™
When I use trace32 jtag interface to simulate TC275, hard reset detected occurs after the program runs
AURIX™
Hi, my team is migrating from Aurix TC 387 to 397.We use Diab compiler & linker which requires a DLD file in order to map the different memory spaces....
Show More
Hi, my team is migrating from Aurix TC 387 to 397.
We use Diab compiler & linker which requires a DLD file in order to map the different memory spaces.
Does someone know where such a file could be obtained or have a copy to share? Show Less
We use Diab compiler & linker which requires a DLD file in order to map the different memory spaces.
Does someone know where such a file could be obtained or have a copy to share? Show Less
Forum Information
AURIX™
In this forum you can post your questions, comments and feedback about the 32-bit AURIX™ TriCore™ Microcontroller. The AURIX™ offers the highest scalability in performance, memory & peripherals across application. It is a safe and secure companion chip, meeting both the ISO functional safety standards and EVITA full security standards. Here you can also find the links to the latest board pages, SW and Tools GitHub, trainings, documents and FAQs
Important links
Overview
Documentations
Others
Related Forums