AURIX™ Forum Discussions
The Infineon TC234 microcontroller sends and receives normally using either CAN0 and CAN1 alone, but when I use both at the same time, the program gets stuck and returns the error message IfxMultican_Status_notSentBusy.
Through debugging, it is found that when the CAN1 module is initialized, some of the parameters of CAN0 initialization will be modified, and the modified part is the content in the parameter MODULE_CAN.
Because I use MODULE_CAN as the parameter in the initialization part of both CAN modules, but when I use the parameter MODULE_CAN1 for CAN1, the program still gets stuck, I'm very much looking forward to getting a reply from you.
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/%E8%8B%B1%E9%A3%9E%E5%87%8CTC234%E5%8D%95%E7%89%87%E6%9C%BA%E4%B8%A4%E8%B7%AFCAN%E9%80%9A%E8%AE%AF%E6%94%B6%E5%8F%91%E5%BC%82%E5%B8%B8/td-p/485144
Show LessHello, engineers
I am triggering EVADC Converison with the TOM output of the GTM module.
We are also synchronizing group0, 1, 2, and 3 of evadc.
The master is group 0 and 1, 2, 3 is save.
At this time, each group is assigned four channels.
So at the same time, four channels are converted into parallel, and in each group, four channels are converted into series, resulting in a total of 16 outcomes.
I would like to generate a result event after the 4th channel of each group ends the conversion, i.e. after all 16 adc ends.
In other words, I would like to generate one result event per advertise.
When one channel was assigned to each group, the result event occurred well once per trigger, but the result event did not occur on time after allocating multiple channels to each group.
Here is the code I wrote.
-------------------------------------------------------------------------------------------------------------------------------------
void initEVADC()
{
initEVADCModule(); /* Initialize the EVADC module */
initEVADCGroupMaster(); /* Initialize the EVADC Master Group */
initEVADCGroupSlave(); /* Initialize the EVADC Slave1 Group */
initEVADCChannelsMaster(); /* Initialize the channels */
initEVADCChannelsSlave();
fillAndStartQueue(); /* Fill the queue and start it */
}
/* Function to initialize the EVADC module with default parameters */
void initEVADCModule()
{
/* Create configuration */
IfxEvadc_Adc_Config adcConfig;
IfxEvadc_Adc_initModuleConfig(&adcConfig, &MODULE_EVADC);
/* Initialize module */
IfxEvadc_Adc_initModule(&g_evadc, &adcConfig);
}
/* Function to initialize the EVADC group with default parameters */
void initEVADCGroupMaster()
{
/* Create and initialize group configuration with default values */
IfxEvadc_Adc_GroupConfig adcGroupConfig;
IfxEvadc_Adc_initGroupConfig(&adcGroupConfig, &g_evadc);
/* Setting user configuration using group 2 */
adcGroupConfig.groupId = g_groups[0];
adcGroupConfig.master = GROUPID_0;
adcGroupConfig.analogConverterMode= IfxEvadc_AnalogConverterMode_off;
/* Enable queued source */
adcGroupConfig.arbiter.requestSlotQueue0Enabled = TRUE;
/* Configure the queue */
adcGroupConfig.queueRequest[0].requestSlotPrio = IfxEvadc_RequestSlotPriority_highest;
adcGroupConfig.queueRequest[0].requestSlotStartMode = IfxEvadc_RequestSlotStartMode_cancelInjectRepeat;
adcGroupConfig.queueRequest[0].triggerConfig.gatingMode = IfxEvadc_GatingMode_always; /* No gate signal is required */
adcGroupConfig.queueRequest[0].triggerConfig.triggerMode = IfxEvadc_TriggerMode_uponAnyEdge;
adcGroupConfig.queueRequest[0].triggerConfig.triggerSource = IfxEvadc_TriggerSource_10; /* Trigger source taken from Gating Input */
/* Initialize the group */
IfxEvadc_Adc_initGroup(&g_adcGroup[0], &adcGroupConfig);
}
void initEVADCGroupSlave()
{
for(uint16 idx = 1; idx < GROUPS_NUM; idx++)
{
/* Create and initialize group configuration with default values */
IfxEvadc_Adc_GroupConfig adcGroupConfig;
IfxEvadc_Adc_initGroupConfig(&adcGroupConfig, &g_evadc);
/* Setting user configuration for Group B (Slave 1) */
adcGroupConfig.groupId = g_groups[idx];
adcGroupConfig.master = GROUPID_0;
adcGroupConfig.analogConverterMode= IfxEvadc_AnalogConverterMode_off;
/* Initialize the group */
IfxEvadc_Adc_initGroup(&g_adcGroup[idx], &adcGroupConfig);
}
}
void initEVADCChannelsMaster()
{
for(uint16 idx = 0; idx < CHANNELS_NUM; idx++)
{
/* Create channel configuration */
IfxEvadc_Adc_ChannelConfig adcChannelConfig;
/* Initialize the configuration with default values */
IfxEvadc_Adc_initChannelConfig(&adcChannelConfig, &g_adcGroup[0]);
/* Select the channel ID and the respective result register */
adcChannelConfig.channelId = g_grp8channels[idx];
adcChannelConfig.resultRegister = g_grp8channels[idx];
adcChannelConfig.resultSrcNr= IfxEvadc_SrcNr_group0;
adcChannelConfig.synchonize= TRUE;
if(idx == (CHANNELS_NUM-1))
{
adcChannelConfig.resultServProvider= IfxSrc_Tos_cpu0;
adcChannelConfig.resultPriority = ISR_PRIORITY_ADC;
}
/* Initialize the channel */
IfxEvadc_Adc_initChannel(&g_adcChannel[0][idx], &adcChannelConfig);
}
}
void initEVADCChannelsSlave()
{
for(uint16 idx = 1; idx < GROUPS_NUM; idx++)
{
for(uint16 idx_c = 0; idx_c < CHANNELS_NUM; idx_c++)
{
/* Create channel configuration */
IfxEvadc_Adc_ChannelConfig adcChannelConfig;
/* Initialize the configuration with default values */
IfxEvadc_Adc_initChannelConfig(&adcChannelConfig, &g_adcGroup[idx]);
/* Select the channel ID and the respective result register */
adcChannelConfig.channelId = g_grp8channels[idx];
adcChannelConfig.resultRegister = g_grp8channels[idx];
adcChannelConfig.resultSrcNr = IfxEvadc_SrcNr_group0;
/* Initialize the channel */
IfxEvadc_Adc_initChannel(&g_adcChannel[idx][idx_c], &adcChannelConfig);
}
}
}
void fillAndStartQueue()
{
for(uint8 idx = 0; idx < CHANNELS_NUM; idx++)
{
/* Add channel to queue with refill and external trigger enabled */
if(idx==0)
{
IfxEvadc_Adc_addToQueue(&g_adcChannel[0][idx], IfxEvadc_RequestSource_queue0, (ENABLE_EXTERNAL_TRIGGER | IFXEVADC_QUEUE_REFILL));
}
else
{
IfxEvadc_Adc_addToQueue(&g_adcChannel[0][idx], IfxEvadc_RequestSource_queue0, (IFXEVADC_QUEUE_REFILL));
}
IfxEvadc_Adc_setAnalogConvertControl(&MODULE_EVADC, &g_adcGroup[0], IfxEvadc_AnalogConverterMode_normalOperation);
}
}
/* Function to read the EVADC used channel */
void readEVADC()
{
for(uint8 i = 0; i < GROUPS_NUM; i++)
{
for(uint8 j = 0; j < CHANNELS_NUM; j++)
{ /* Wait for a valid result */
Ifx_EVADC_G_RES conversionResult;
do
{
conversionResult = IfxEvadc_Adc_getResult(&g_adcChannel[i][j]); /* Read the result of the selected channel */
} while(!conversionResult.B.VF);
/* Store result */
g_results[i][j] = conversionResult;
}
}
}
/* ADC Interrupt Service Routine */
IFX_INTERRUPT(ISRresultADC, 0, ISR_PRIORITY_ADC);
void ISRresultADC(void)
{
IfxPort_setPinHigh(LAMP1);//P00.6
g_cnt++;
readEVADC();
IfxPort_setPinLow(LAMP1);//P00.6
}
-------------------------------------------------------------------------------------------------------------------------------------
As you can see from the code, the setting related to the result event was done only for channel 4, the last channel to be converted from the master group0.
If you know what's wrong, please answer.
Thank you.
Hi,
I recently bought a 2nd generation AURIX TC3xx starter kit which contains the TC397 Starter Kit. I am trying to understand the functioning of the evaluation board, but I am facing issues while connecting it to my PC. I have installed AURIX Development Studio, DAS also. When I connect the board to the PC it is recognizing the COM PORT Infineon DAS JDS COM6. The MCD Basic Client is also not able to recognize the cores. When I try to run the build and debug a project on ADS it gives me this error:
Starting Debugger...
The debug instrument IO could not be initialized.
The GDI debug instrument provided the following error message.
An internal error has occurred.
Dear Team,
I am working on Aurix tc39xx. I want to use Alternate address memory map for SOTA. If anyone can provide the example project for it then it will be helpful for me.
Tried to enable SOTA and swap configuration using Infineon mem-tool, but observing NO effect after enabling those configurations.
If anyone can provide the example project for this it will be of more help to me.
Thanking in advance.
Sayali Gorhe.
Show LessHi,
I recently stumbled upon this Aurix Safety Kit: APPKIT_A2G_SAFETY - Infineon Technologies
It looks very promising for me but unfortunetly I did not found any further information. I also checked myICP but I did not find anything there either.
Can anybody help out here? And whom to conact for a possible order?
Best regards,
Jens
Show Less
Hello Nambi, we are using TC3XX series (not aware of complete part number).
After the EB tool configuration is completed, the interrupt callback Wdg_17_Scu_Cbk_GtmNotifySRV function can be triggered. When the dog feeding operation is not carried out on time, the count value of the Wdg_TimeoutCounter[CoreId] variable becomes 0, but the watchdog timeout alarm cannot be triggered. If the lck bit of SCU_WDTSCON0 register is changed without unlocking, ALM3[17] can report an alarm.
The watchdog configuration registers and status registers are shown below, with the status being No timeout
What is the reason why I can't report the alarm or what operations I have to do, or is there something wrong with my configuration, please answer, thank you very much!
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/TC277-watchdog-%E8%B6%85%E6%97%B6%E5%90%8E%E6%97%A0%E6%B3%95%E8%A7%A6%E5%8F%91SMU-Alarm/td-p/483608
Show LessWe have many boards on hand and were doing some testing. We found that 1 or 2 boards have lost their serial port function. It is suspected that the board into the DET or trap error state caused by the board does not run normally. But the problem occurs rather randomly, not necessarily appear. And can not be tested within a short period of time.
Can you tell me when the tc397 goes into det or trap or any other error. Is there a block address or function that can save the error message.
Or can you only see the error site by always connecting to Lauterbach and then reproducing the problem? But it takes a lot of time to solve the problem this way. It's not very efficient.
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/TC397-%E8%BF%9BDET%E6%88%96%E8%80%85trap-%E7%AD%89%E9%94%99%E8%AF%AF%E5%A6%82%E4%BD%95%E4%BF%9D%E7%95%99%E7%8E%B0%E5%9C%BA/td-p/481610
Show LessHi,
I've just picked up Aurix Development Studio and Infineon products more generally - in terms of normal CAN_FD usage, should a user be able to stick fairly rigidly to the functions declared in MCMCAN_FD.h?
Thanks,
Show Less