AURIX™ Forum Discussions
Hello, I would like to know what are TSN standards does the Aurix TC399 microcontroller supports?
Hi,
I am currently working on sending and receiving frames on the Aurix TC397, I managed to send BUT the interrupt for "transmissionCompletedEnabled" does not seem to work.
I have received the frame inside my RX FIFO0 but the interrupt RX does not work either.
And because I am not doing the interrupt I can't read what's inside my FIFO.
In my config, I have the right flag enable :
- "transmissionCompletedEnabled" for TX
- "rxFifo0NewMessageEnabled" for RX
There are indeed enabled I had checked them on the CPU registers.
Here is my interrupt config for TX :
g_mcmcan.canNodeConfig.interruptConfig.transmissionCompletedEnabled = TRUE;
g_mcmcan.canNodeConfig.interruptConfig.traco.priority = ISR_PRIORITY_CAN_TX;
g_mcmcan.canNodeConfig.interruptConfig.traco.interruptLine = IfxCan_InterruptLine_2;
g_mcmcan.canNodeConfig.interruptConfig.traco.typeOfService = IfxSrc_Tos_cpu0;
Here is my interrupt config for RX FIFO0 :
g_mcmcan.canNodeConfig.interruptConfig.rxFifo0NewMessageEnabled = TRUE;
g_mcmcan.canNodeConfig.interruptConfig.rxf0f.priority = ISR_PRIORITY_CAN_RX;
g_mcmcan.canNodeConfig.interruptConfig.rxf0f.interruptLine = IfxCan_InterruptLine_1;
g_mcmcan.canNodeConfig.interruptConfig.rxf0f.typeOfService = IfxSrc_Tos_cpu0;
I don't know where to look to find a solution to this problem.
Thanks,
Hi, experts.
When debugging Infineon example "Flash_Programming_1_KIT_TC334_LK ", I found that when I used the default parameters, Flash can be erased normally, but when I changed the initial address of erase from 0xA00E0000 to 0x80080020, I found that the erase seemed to fail. when I changed the initial address of erase from 0xA00E0000 to 0x80080020, I found that the erase seemed to fail, I think it may be caused by the macro definition "#define RELOCATION_START_ADDR (0x70100000U) ", please tell me what this macro definition means, and how to solve the problem here, thank you!
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/The-Infineon-example-quot-Flash-Programming-1-KIT-TC334-LK-quot-failed-to-erase/td-p/723792
Show LessHelllo, I have a TriBoard TC3X7 V2.01
According to the schematics in the user manual, the VEXT is supplied by the V_UC via an 0-ohm resistor R521.
I have desoldered the R521 resistor, and I still see that it's V_UC side and VEXT side are shorted to one another (Tested with fluke). No problem with the desolder itself - this went well.
Is there an error in the schematics and the VEXT is connected to V_UC via some other line that is not mentioned in the schematic?
Best Regards,
Robbie.
Show Less
I am trying to configure an Infineon Aurix TC334 Lite kit QSPI as master. So far, I managed to configure the necessary pins, change the polarity to work with Gyro 6 Click Gyroscope (bit order - MSB, sampling edge - riging). I using an SPI sniffler and as far as i can see data is being transmitted but i receive nothing on MISO. Do you have any idea?
I've attached a snip with the SPI MOSI/MISO and the code as well.
Show Less
I'm encountering a problem with CAN transmission in TC233, and I could really use some assistance in troubleshooting it.
The scenario is as follows: I've utilized code from the iLLD example source for CAN initialization. Initially, I developed code for TC234, where P20_8 and P20_7 pins were configured as CAN TX and CAN RX pins respectively. This code works perfectly fine in TC234.
However, when I attempted to adapt the same code for TC233, making the necessary adjustments such as changing the pins to P14_0 and P14_1 and updating the Node1 settings, the code doesn't function as expected in either TC233 or TC234.
I have shared the code below.
/********************************************************************************************************************
* \file MULTICAN.c
* \copyright Copyright (C) Infineon Technologies AG 2019
*
* 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.
*********************************************************************************************************************/
/*********************************************************************************************************************/
/*-----------------------------------------------------Includes------------------------------------------------------*/
/*********************************************************************************************************************/
#include "MULTICAN.h"
#include "string.h"
/*********************************************************************************************************************/
/*-------------------------------------------------Global variables--------------------------------------------------*/
/*********************************************************************************************************************/
AppMulticanType g_multican; /* Global MULTICAN configuration and control structure */
AppLedType g_led; /* Global LED configuration and control structure */
uint32 Battery_Saving_Mode, Low_Power_Mode, Mode,Motor_ON_OFF, MCU_ON_OFF;
/*********************************************************************************************************************/
/*---------------------------------------------Function Implementations----------------------------------------------*/
/*********************************************************************************************************************/
/* Macro to define Interrupt Service Routine.
* This macro:
* - defines linker section as .intvec_tc<vector number>_<interrupt priority>.
* - defines compiler specific attribute for the interrupt functions.
* - defines the Interrupt service routine as ISR function.
*
* IFX_INTERRUPT(isr, vectabNum, priority)
* - isr: Name of the ISR function.
* - vectabNum: Vector table number.
* - priority: Interrupt priority. Refer Usage of Interrupt Macro for more details.
*/
IFX_INTERRUPT(canIsrTxHandler, 0, ISR_PRIORITY_CAN_TX);
//IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
/* Interrupt Service Routine (ISR) called once the TX interrupt has been generated.
* Turns on the LED1 to indicate successful CAN message transmission.
*/
void canIsrTxHandler(void)
{
/* Just to indicate that the CAN message has been transmitted by turning on LED1 */
// IfxPort_setPinLow(g_led.led1.port, g_led.led1.pinIndex);
IfxPort_togglePin(g_led.led2.port, g_led.led2.pinIndex);
}
void canIsrRxHandler(void)
{
volatile IfxMultican_Status readStatus[10];
memset(readStatus, 0, 10*sizeof(readStatus[0]));
for(int i = 1; i <= 2; i++)
{
Ifx_CAN_MO *hwObj = IfxMultican_MsgObj_getPointer(g_multican.canDstMsgObj.node->mcan, i);
if(hwObj->STAT.B.NEWDAT != 0)
{
IfxPort_togglePin(g_led.led2.port, g_led.led2.pinIndex);
g_multican.canDstMsgObj.msgObjId = i;
readStatus[i-1] = IfxMultican_Can_MsgObj_readMessage(&g_multican.canDstMsgObj, &g_multican.rxMsg);
}
}
}
/* Interrupt Service Routine (ISR) called once the RX interrupt has been generated.
* Compares the content of the received CAN message with the content of the transmitted CAN message
* and in case of success, turns on the LED2 to indicate successful CAN message reception.
*/
/*Function to initialize MULTICAN module, nodes and message objects related for this application use case */
void initMultican(void)
{
IfxMultican_Can_initModuleConfig(&g_multican.canConfig, &MODULE_CAN);
g_multican.canConfig.nodePointer[TX_INTERRUPT_SRC_ID].priority = ISR_PRIORITY_CAN_TX;
g_multican.canConfig.nodePointer[RX_INTERRUPT_SRC_ID].priority = ISR_PRIORITY_CAN_RX;
IfxMultican_Can_initModule(&g_multican.can, &g_multican.canConfig);
IfxMultican_Can_Node_initConfig(&g_multican.canNodeConfig, &g_multican.can);
g_multican.canNodeConfig.txPin = &IfxMultican_TXD1_P14_0_OUT;
g_multican.canNodeConfig.rxPin = &IfxMultican_RXD1B_P14_1_IN;
g_multican.canNodeConfig.loopBackMode = FALSE;
g_multican.canNodeConfig.nodeId = IfxMultican_NodeId_1;
g_multican.canNodeConfig.rxPinMode = IfxPort_InputMode_pullUp;
g_multican.canNodeConfig.txPinMode = IfxPort_OutputMode_pushPull;
// g_multican.canNodeConfig.alertInterrupt.enabled = FALSE;
IfxMultican_Can_Node_init(&g_multican.canSrcNode, &g_multican.canNodeConfig);
//IfxMultican_Can_Node_init(&g_multican.canDstNode, &g_multican.canNodeConfig);
TX_CAN_ID_Init();
RX_CAN_ID_Init();
}
void TX_CAN_ID_Init(void){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canSrcNode);
/*** The msgObjId for CAN TX must be different from all CAN RX msgObjId ***/
g_multican.canMsgObjConfig.msgObjId = SRC_MESSAGE_OBJECT_ID;
g_multican.canMsgObjConfig.messageId = CAN_MESSAGE_ID; // 0x777
g_multican.canMsgObjConfig.frame = IfxMultican_Frame_transmit;
g_multican.canMsgObjConfig.txInterrupt.enabled = TRUE;
g_multican.canMsgObjConfig.txInterrupt.srcId = TX_INTERRUPT_SRC_ID;
IfxMultican_Can_MsgObj_init(&g_multican.canSrcMsgObj, &g_multican.canMsgObjConfig);
}
void RX_CAN_ID_Init(void){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canDstNode);
/*** Each Message Object ID is attached with unique CAN ID ***/
g_multican.canMsgObjConfig.msgObjId = DST_MESSAGE_OBJECT_ID;
g_multican.canMsgObjConfig.messageId = 0x333;
g_multican.canMsgObjConfig.frame = IfxMultican_Frame_receive;
g_multican.canMsgObjConfig.rxInterrupt.enabled = TRUE;
g_multican.canMsgObjConfig.rxInterrupt.srcId = RX_INTERRUPT_SRC_ID;
IfxMultican_Can_MsgObj_init(&g_multican.canDstMsgObj, &g_multican.canMsgObjConfig);
g_multican.canMsgObjConfig.msgObjId = DST_MESSAGE_OBJECT_ID+1;
g_multican.canMsgObjConfig.messageId = 0x444;
g_multican.canMsgObjConfig.frame = IfxMultican_Frame_receive;
g_multican.canMsgObjConfig.rxInterrupt.enabled = TRUE;
g_multican.canMsgObjConfig.rxInterrupt.srcId = RX_INTERRUPT_SRC_ID;
IfxMultican_Can_MsgObj_init(&g_multican.canDstMsgObj, &g_multican.canMsgObjConfig);
}
void transmitCanMessage(void){
const uint32 dataLow = 0x11111111;
const uint32 dataHigh = 0x22222222;
/* Invalidation of the RX message */
IfxMultican_Message_init(&g_multican.rxMsg,
INVALID_ID_VALUE,
INVALID_DATA_VALUE,
INVALID_DATA_VALUE,
g_multican.canMsgObjConfig.control.messageLen);
IfxMultican_Message_init(&g_multican.txMsg,
CAN_MESSAGE_ID,
dataLow,
dataHigh,
g_multican.canMsgObjConfig.control.messageLen);
IfxMultican_Can_MsgObj_sendMessage(&g_multican.canSrcMsgObj, &g_multican.txMsg);
}
void initLed(void){
/* ======================================================================
* Configuration of the pins connected to the LEDs:
* ======================================================================
* - define the GPIO port
* - define the GPIO pin that is the connected to the LED
* - define the general GPIO pin usage (no alternate function used)
* - define the pad driver strength
* ======================================================================
*/
g_led.led1.port = &MODULE_P13;
g_led.led1.pinIndex = 0;
g_led.led1.mode = IfxPort_OutputIdx_general;
g_led.led1.padDriver = IfxPort_PadDriver_cmosAutomotiveSpeed1;
g_led.led2.port = &MODULE_P13;
g_led.led2.pinIndex = 1;
g_led.led2.mode = IfxPort_OutputIdx_general;
g_led.led2.padDriver = IfxPort_PadDriver_cmosAutomotiveSpeed1;
/* Initialize the pins connected to LEDs to level "HIGH"; will keep the LEDs turned off as default state */
IfxPort_setPinHigh(g_led.led1.port, g_led.led1.pinIndex);
IfxPort_setPinHigh(g_led.led2.port, g_led.led2.pinIndex);
/* Set the pin input/output mode for both pins connected to the LEDs */
IfxPort_setPinModeOutput(g_led.led1.port, g_led.led1.pinIndex, IfxPort_OutputMode_pushPull, g_led.led1.mode);
IfxPort_setPinModeOutput(g_led.led2.port, g_led.led2.pinIndex, IfxPort_OutputMode_pushPull, g_led.led2.mode);
/* Set the pad driver mode for both pins connected to the LEDs */
IfxPort_setPinPadDriver(g_led.led1.port, g_led.led1.pinIndex, g_led.led1.padDriver);
IfxPort_setPinPadDriver(g_led.led2.port, g_led.led2.pinIndex, g_led.led2.padDriver);
}
Show Less
Hi,
Above example was very helpful to do board to board CAN communication using CAN0, node0 to CAN0, node0
using pins
Example_Pins.txPin= &IfxCan_TXD00_P20_8_OUT;
Example_Pins.rxPin= &IfxCan_RXD00B_P20_7_IN;
I was trying to use CAN0, node1 to CAN0, node1 using following pins
Example_Pins.txPin= &IfxCan_TXD01_P14_0_OUT;
Example_Pins.rxPin= &IfxCan_RXD01B_P14_1_IN;
I changed the line
g_mcmcan.canNodeConfig.nodeId = IfxCan_NodeId_0;
to
g_mcmcan.canNodeConfig.nodeId = IfxCan_NodeId_1;
But CAN is not working for CAN0, Node1 to CAN0, node-1.
Will be helpful if can get any suggestions.
Show Less
Hello together,
I'm writing a Task scheduler and stuck with some problems after the context switch.
After restoring the context for the next Task:
__builtin_tricore_mtcr_by_name("pcxi", lower_context);
__builtin_tricore_isync();
ULONG psw = __builtin_tricore_mfcr_by_name("psw");
psw &= ~(PSW_CDE_MASK);
__builtin_tricore_mtcr_by_name("psw", psw);
__builtin_tricore_isync();
__asm("rslcx");
__asm("rfe");
the "rfe" calls the correct Task function. But the "rfe" will not set new return address in A[11] register. It is 0. When the Task function ends with "ret16" the µC runs in a trap.
Missed I something in the preparation of the context switch?
What is the correct behavior of A[11] after the context switch/"rfe"?
Thanks!
BR
Christoph
Show Less
你好
目前使用"UART_VCOM_1_KIT_TC397_TFT"範例在Triboard TC397上進行測試。
開啟兩組ASCLIN 模組0跟模組4並且在中斷設置中有更改相對應的向量表數值,進行以下交互測試:
1. CPU0_Main.c內執行兩組ASCLIN初始化、只有調整"中斷向量表數值(0)"跟進行輸出"Hello World!" ==> 可以正常顯示
2. CPU1_Main.c內執行兩組ASCLIN初始化、只有調整"中斷向量表數值(1)"跟進行輸出"Hello World!" ==> 無法顯示
3. CPU2_Main.c內執行兩組ASCLIN初始化、只有調整"中斷向量表數值(2)"跟進行輸出"Hello World!" ==> 可以正常顯示
4. CPU3_Main.c內執行兩組ASCLIN初始化、只有調整"中斷向量表數值(3)"跟進行輸出"Hello World!" ==> 可以正常顯示
想請問為何在CPU1_Main.c會有此問題?
#AURIX
#Tricore
Show Less
我在TC387上移植英飞凌ADS例程中的FreeRTOS+Lwip,移植成功后调试模式ETH能够通信,但是在冷启动后,ETH是不通的, 但是如果我在IfxGeth_Eth_WaitTransmitBuffer()中增加系统复位的功能,在冷启动并在系统复位后,ETH又能够通信,这个是因为什么原因引起的?
1. 调试模式,能够发出到DOIP报文
2.冷启动后,是不能发出DOIP报文
3. 在下面函数中如果tx为NULL,则启动系统复位
Show Less