AURIX™ Forum Discussions
If i purchase KIT_A2G_TC399_5V_TRB_S HW then
1) Will it have the Chip SAK-TC399XE-256F300S BD, mounted on it? OR
2) What chip (give me full name) , will be mounted in it so i can search its full capacity..?
Hello all,
I am able to see UCB_PLFASH register on my TC38x.
But UCB_DFLASH I am unable to see. Initially I was able to see and modify also with Trace32.
Can anyone suggest what to do?
PFA image for reference w.r.t current situation.
Thanks in advanced.
Show Less
我现在有6路pwm波,A、B、E、F、G、H,这六路pwm需要同时调频移相,我的B、E需要基于A移向,F需要基于E移相,G和H需要基于E移相,但是GTM-TOM模块pwm同时输出并满足移相有两种情况,一种是都基于A去移相,一种是基于前一个通道去移相,一旦我使用第一种,我的F基于A移相就会超过50%,这将导致PWM出现一个周期的高电平的波形,如果使用第二种我又无法满足我的移相标准,请问是否可以混合使用这两种模式,怎么使用?
祝好!
Show LessI'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
when try to debug the example project through miniwiggler, it can not work as below:
but memtool can connect the chip :
MCD basic client can also connect the chip and get the information:
the ADS version is 1.9.20 ,DAS version is 8.0, miniwiggler is V3.1, hardware board is designed by other people and can be connected through UDE/pls
Show Less
in TC38x,Can the local memory unit(LMU) and thre Distributed LMU (DLMU) as a whole LMU to be used in OVC function SAL-TC387QP-160F300S AD
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
Hi All,
I have a question related to SCR_XRam and SCR_IRam.
The question: How to know whether the SCR_XRam and SCR_IRam are initialized or are not initialized in startup code?
Thanks.
Show LessAs metioned in "AURIX TC3xx Safety Manual v2.0.pdf - 6.38 SM[HW]:CLOCK:CFG_AS_AP", Registers of Clock System is protected by Master Tag based safety machenism. But I can't find related ACCEN0/1 register in "Infineon-AURIX_TC3xx_Part1-UserManual-v02_00-EN.pdf - 10 Clocking System".
Show Less