AURIX™ Forum Discussions
Dear experts:
The description about “Time Check Password” as follow:
If time checking is enabled (WDTxSR.TCS=1) the REL field of the WDTxCON0 register must be written with an
inverted (bit flipped) estimate of the current WDT count value. The acceptable margin of error of this estimate (in
WDT clock periods) is specified by the value of WDTxSR.TCT. If the written estimate is outside the range
WDTxSR.TIM +/- WDTxSR.TCT, then an SMU alarm condition is indicated. This mechanism can provide a check of
the elapsed program execution time since the last WDT restart. Note that a Time Check comparison is still
required for a Password or Check Access while the WDT is operating in Time-Out mode (e.g. After accessing
ENDINIT-protected registers).
According to the above description:whether REL should be computed as such?
For example:WDTxSR.TCS=1 ,and current WDT count value = 0xFF0F;WDTxSR.TCT = 0xF
step1:Calculate inverted estimate value according to WDT count value : estimate value=0x00FF;
step2: Calculate WDTxSR.TIM +/- WDTxSR.TCT: 0xFF00 ~ 0xFF1E
step3: write estimate value to REL. But the estimate value(0x00FF) is always out off the range 0xFF00 ~ 0xFF1E,so how to correctly use "Time Check Password" to implement "Password Access to WDTxCON0".
Is the above example correct? If not, could you provide the correct example or code?
Looking forward your reply.
Show Less
History. 2019/02/12: Added the support for 64bit CRC calculation and for binary string input. 2016/11/11: Added the option to print the CRC lookup table 'reversed'.
|
- BLKM = 4
- Transaction length = 0 i.e One transfer ( compressing 4 moves ) is One transaction
- No byte swapping and
- crc initial value is zero
Figure 1 : Debugger capture of DMA data transfer and checksum captured at end of DMA transfer
Input data with additional padding | Input data with no padding |
|
|
CRC matches the calculated CRC from FCE as in Figure 1 | CRC does not match with the calculated CRC from FCE |
Hi guys,
I want to print out uart logs for debug in critical section; but I found that the uart output is abnormal, and the system hang.
portENTER_CRITICAL();
Ifx_print("test in cs\n");
portEXIT_CRITICAL();
Now in the aurix code example, the uart print relies on the interrupt.
Does the uart print in TC39x can work well in critical seciton or interrupt disabled?
Do you have any method for uart print which not relis on the interrupt?
Show LessHi,
I am currently trying to provoke an application reset on core0 of TC367D using the IfxScuRcu_performReset(IfxScuRcu_ResetType_application, (UINT16)0x0000); function (I also tried with the example code from the Gitlab, but the result is the same).
Whenever I do that, the microcontroller gets stuck afterwards (during the reset I guess). Is there any way to attach to the running target to see what is happening ?
Can you please tell me if there is anything else to be done (the watchdogs have been previously disabled) ? Is there any specific state in which the other core should be when reseting? Any lead can be helpful !
Thank you !
Show LessHello,
I am new to Infineon MCUs and would like some advice while getting started. My project is to control a PMSM with field oriented control. I am not sure yet if this will be sensored or sensorless. The MCU needs to be automotive grade. I am considering using the KITA2GTC334LITETOBO1 evaluation board to get started and am considering one of the low end Aurix MCUs (e.g., TC32x or TC33x). A few questions about getting started:
Is there any example field oriented control code provided for these Aurix MCUs?
Are the Aurix MCUs the best fit for automotive grade motor control applications? If not, what other Infineon MCUs would work well for this application?
Any other tips or advice for getting started with development would be greatly appreciated.
Thanks.
Show LessStandby Mode is performed with TC3xx, and Wakeup is considered using CAN.
Do I need to use SCR to wakeup?
When CAN communication is detected by SCR, how to wakeup from SCR to TC3xx?
I don't know what to do.
1, CAN interrupt detection with SCR
2, Notify TX3xx with SCRINTEXCHG
3, Detect CAN notification by PMSWCR2.SCRINT on TC3xx side
4, After operation 3, reset the software
Are the above steps correct?
If correct, will the TC3xx be able to detect PMSWCR2.SCRINT because it is in Standby mode?
Please help me.
Show LessHello,
I am currently trying to place some data at a precise address, that can be later on modified by erasing and writing the flash. After that, I would like to read the data.
I place my data like so:
const volatile uint8 data __at(0x80400000) = (uint8)0x00;
After erasing the flash and writing some other value, I can see the new value in the memory watch during debug. However, when I read it through a variable, I always get the old value.
I am using volatile on all variables that are concerned and I also tried reading through memcpy function. I am currently using Aurix Developement Studio and I deactivated all optimization on the code (as far as I know).
Is there any particular way to read this new data ?
Thank you !
Show LessHello,
I'm trying to do some performance measurements on functions and I'm getting results that I cannot explain. Most likely I am overlooking something or do not have something configured correctly so looking for any suggestions.
Using the TC375 lite kit, I have Core 1 dedicated for this testing. The start of the function looks like this:
void core1_main(void)
{
IfxCpu_enableInterrupts();
/* !!WATCHDOG2 IS DISABLED HERE!!
* Enable the watchdog and service it periodically if it is required
*/
IfxScuWdt_disableCpuWatchdog(IfxScuWdt_getCpuWatchdogPassword());
IfxScuWdt_disableSafetyWatchdog(IfxScuWdt_getSafetyWatchdogPassword());
IfxStm_enableOcdsSuspend(&MODULE_STM1);
/* Wait for CPU sync event */
IfxCpu_emitEvent(&g_cpuSyncEvent);
IfxCpu_waitEvent(&g_cpuSyncEvent, 1);
fstm_1 = IfxScuCcu_getStmFrequency();
//setupCSV();
collectMetrics();
//test1();
//closeCSV();
while(1)
{
}
}
collectMetrics performs two checks, PER0 is a marco for the function being tested.
void collectMetrics()
{
getCTimeMetrics(PER0, &maxCTimePER0, &minCTimePER0, &timeCPER0);
getIfxMetrics(PER0, &instructionCountPER0, &clockCountPER0);
}
The getCTimeMetrics, uses STM1 to get timing and calculate the delta that the function takes to run.
void getCTimeMetrics(void (*func)(), double *maxTime, double *minTime, double *timeArray)
{
unsigned long lower;
unsigned long upper;
unsigned long long start;
unsigned long long end;
unsigned long long delta;
for(int i = 0; i < 10; i++)
{
lower = ((uint32)MODULE_STM1.TIM0.U);
upper = ((uint32)MODULE_STM1.CAP.U);
start = (unsigned long long)((unsigned long long)(upper << 32) | (unsigned long long)lower);
func();
lower = ((uint32)MODULE_STM1.TIM0.U);
upper = ((uint32)MODULE_STM1.CAP.U);
end = (unsigned long long)((unsigned long long)(upper << 32) | (unsigned long long)lower);
delta = end - start;
timeArray[i] = (double)(((double)delta)/(double)CLOCKS_PER_SEC);
}
*maxTime = timeArray[0]; /* place holder for now */
*minTime = timeArray[0];
}
The other function uses the cpu performance functions to get the instruction count and clock count.
void getIfxMetrics(void (*func)(), uint32 *instructionCount, uint32 *clockCount)
{
IfxCpu_resetAndStartCounters(IfxCpu_CounterMode_normal);
func();
IfxCpu_stopCounters();
*instructionCount = IfxCpu_getInstructionCounter();
*clockCount = IfxCpu_getPerformanceCounter(CPU_CCNT);
}
We tested the function measuring it with Gliwa and on a 200MHz part it ran in a range of 230ns to 270ns. I would expect being a 300MHz part, it would be quicker on the TC375. However, the results I am getting from the two functions are, in my initial thoughts, way to different.
I'm getting 52 clock counts which would scale to about 173 ns with a 300MHz clock. However, the STM1 calculations are reporting around 290ns. I figured there would be some differences, but I cannot justify why there is 120ns difference. All code flash and static RAM for these functions is in core 1 (pflash1 and dsram1). If it was being interrupted I would assume I would see the same results on either function.
Does anyone have any thoughts to why I am seeing such a large difference? Does this make sense? I feel I am overlooking or missing something, but I cannot see it.
Thanks in advance for any suggestions.
Show LessI am trying to run "GethBasicDemo" in "iLLD_1_0_1_15_0_TC3xx_Drivers_And_Demos_Release" on TriBoard (TC397X).
Channel 0 is working fine, but the receive interrupt for channel 1 does not occur, so the process does not proceed from the "<--- stop" line below.
Can you please tell me what the problem is?
I have not changed the demo source code at all.
As a point of information, when I try to skip channel 1 and run channel 2, the receive interrupt for channel 2 does not occur as it does for channel 1.
Any guidance highly appreciated.
Thanks in advance.
------ GethBasicDemo.c excerpt -------------------------
/* send frame */
IfxGeth_Eth_sendFrame(&g_GethBasic.drivers.geth, &frameConfig);
switch (channelIndex) {
case 0:
while (chn0TxInterrupt != (packet + 1)) ;
while (chn0RxInterrupt != (packet + 1)) ;
break;
case 1:
while (chn1TxInterrupt != (packet + 1)) ;
while (chn1RxInterrupt != (packet + 1)) ; <--- stop
break;
case 2:
while (chn2TxInterrupt != (packet + 1)) ;
while (chn2RxInterrupt != (packet + 1)) ;
break;
case 3:
while (chn3TxInterrupt != (packet + 1)) ;
while (chn3RxInterrupt != (packet + 1)) ;
break;
default:
break;
}
--------------------------------------------------------------