Close
我在 TC233 中遇到 CAN 傳輸問題,我確實需要一些幫助來排除故障。
場景如下:我使用 iLLD 範例來源中的程式碼進行 CAN 初始化。 最初,我為 TC234 開發了程式碼,其中 P20_8 和 P20_7 引腳分別配置為 CAN TX 和 CAN RX 引腳。 這段程式碼在 TC234 中運行得非常好。
然而,當我嘗試為 TC233 採用相同的程式碼,進行必要的調整(例如將引腳更改為 P14_0 和 P14_1 並更新 Node1 設定)時,程式碼在 TC233 或 TC234 中都無法按預期運行。
我分享了下面的程式碼。
/************************************************* ******* ******************************************* *********** ******************
* \文件MULTICAN.c
* \版權 版權所有 (C) Infineon Technologies AG 2019
*
* 使用此文件須遵守 (i) 您或正常使用該文件的公司之間商定的使用條款
* 您所代理的業務以及 (ii) Infineon Technologies AG 或其被授權人。 如果且只要沒有此類使用條款
* 已同意,使用此文件須遵守以下規定:
*
* Boost 軟體授權 - 版本 1.0 - 2003 年 8 月 17 日
*
* 特此免費授予任何獲得該軟體副本的個人或組織許可,並且
* 本授權涵蓋的隨附文件(「軟體」)可使用、複製、顯示、散佈、執行、
* 傳送本軟體,準備本軟體的衍生作品,並允許第三方接收
* 為此提供了軟體,所有這些均須滿足以下條件:
*
* 軟體中的版權聲明和整個聲明,包括上述許可授予、本限制
* 以及以下免責聲明必須全部或部分包含在本軟體的所有副本中,並且所有
* 本軟體的衍生作品,除非此類副本或衍生作品僅採用以下形式
* 由原始語言處理器產生的機器可執行目標程式碼。
*
* 本軟體以「現況」提供,不提供任何類型的明示或暗示保證,包括但不限於
* 適銷性、特定用途適用性、所有權和不侵權的保證。 在任何情況下都不得
* 版權所有者或任何散佈該軟體的人應對任何損害或其他責任負責,無論是
* 因軟體或使用或其他交易而產生、產生或與之相關的合約、侵權行為或其他行為
* 在軟體中。
************************************************** **** ********************************************** ******** ******************/
/************************************************* ******* ******************************************* *********** ******************/
/*------------------------------------------------ -----包括-------------------------------------------- ------------ ----------*/
/************************************************* ******* ******************************************* *********** ******************/
#include“MULTICAN.h”
#include“字串.h”
/************************************************* ******* ******************************************* *********** ******************/
/*------------------------------------------------ -全域變數------------------------------------------------------------ ------------- ---*/
/************************************************* ******* ******************************************* *********** ******************/
AppMulticanType g_multican; /* 全域MULTICAN配置與控制結構 */
AppLedType g_led; /* 全域LED配置與控制結構 */
uint32 Battery_Saving_Mode、Low_Power_Mode、Mode、Motor_ON_OFF、MCU_ON_OFF;
/************************************************* ******* ******************************************* *********** ******************/
/*------------------------------------------------ --------函數實現- --------------------------------------- -------------------*/
/************************************************* ******* ******************************************* *********** ******************/
/* 定義中斷服務例程的巨集。
* 這個巨集:
* - 將連結器部分定義為 .intvec_tc
* - 定義中斷函數的編譯器特定屬性。
* - 將中斷服務例程定義為 ISR 函數。
*
* IFX_INTERRUPT(isr, vectabNum, 優先權)
* - isr:ISR 函數的名稱。
* - vectabNum:向量表編號。
* - 優先權:中斷優先權。 有關更多詳細信息,請參閱中斷巨集的用法。
*/
IFX_INTERRUPT(canIsrTxHandler, 0, ISR_PRIORITY_CAN_TX);
//IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
/* 產生 TX 中斷後呼叫中斷服務例程 (ISR)。
* 開啟 LED1 表示 CAN 訊息傳輸成功。
*/
無效 canIsrTxHandler(無效)
{
/* 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);
}
無效 canIsrRxHandler(無效)
{
易失性 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, 我);
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);
}
}
}
/* RX 中斷產生後呼叫中斷服務例程 (ISR)。
* 將接收到的CAN報文內容與發送的CAN報文內容進行比較
* 如果成功,則開啟 LED2 以指示 CAN 訊息接收成功。
*/
/*初始化與該應用用例相關的MULTICAN模組、節點和訊息物件的函數*/
無效 initMultican(無效)
{
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 = 假;
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();
}
無效 TX_CAN_ID_Init(無效){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canSrcNode);
/*** CAN TX 的 msgObjId 必須與所有 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);
}
無效 RX_CAN_ID_Init(無效){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canDstNode);
/*** 每個訊息物件 ID 都附有唯一的 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);
}
無效的transmitCanMessage(無效){
const uint32 dataLow = 0x11111111;
const uint32 dataHigh = 0x22222222;
/* RX訊息失效 */
IfxMultican_Message_init(&g_multican.rxMsg,
INVALID_ID_VALUE,
無效資料值,
無效資料值,
g_multican.canMsgObjConfig.control.messageLen);
IfxMultican_Message_init(&g_multican.txMsg,
CAN_MESSAGE_ID,
數據低,
數據高,
g_multican.canMsgObjConfig.control.messageLen);
IfxMultican_Can_MsgObj_sendMessage(&g_multican.canSrcMsgObj, &g_multican.txMsg);
}
無效 initLed(無效){
/* ================================================== ==== =======================
* 連接 LED 的接腳配置:
* =================================================== == =======================
* - 定義GPIO連接埠
* - 定義連接到 LED 的 GPIO 引腳
* - 定義通用 GPIO 引腳用途(不使用替代功能)
* - 定義焊盤驅動強度
* =================================================== == =======================
*/
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;
/* 將連接到 LED 的引腳初始化為「高」電平;將保持 LED 關閉為預設狀態 */
IfxPort_setPinHigh(g_led.led1.port, g_led.led1.pinIndex);
IfxPort_setPinHigh(g_led.led2.port, g_led.led2.pinIndex);
/* 設定連接到 LED 的兩個接腳的接腳輸入/輸出模式 */
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);
/* 設定連接到 LED 的兩個接腳的焊盤驅動模式 */
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);
}
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/CAN-Transmission-Issue-in-TC233/td-p/722495
Show Less大家好 ,
我想在我的一個專案中使用IRPS5401 PMIC ,以獲得不同電壓的多個輸出軌。 IRPS5401 PMIC 可用的輸入電源僅為5V ,但根據其數據表, V 電源引腳需要6V-14V ,有什麼辦法可以只給它5V並有效運行 IC,或者如果我將其置於 NC 狀態會怎樣? ?
希望得到一些真正的快速答案。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/Power-Management-ICs/IRPS5401-PMIC-V-supply-pin-query/td-p/724373
Show LessTC233のCAN伝送で問題が発生していますが、トラブルシューティングにいくつかの支援を実際に使用できます。
シナリオは次のとおりです。 CANの初期化には、iLLDサンプルソースのコードを利用しました。 当初は、P20_8ピンとP20_7ピンをそれぞれCAN TXピンとCAN RXピンとして構成したTC234用のコードを開発しました。 このコードはTC234で完全に正常に機能します。
しかし、同じコードを TC233 に適合させようとして、ピンを P14_0 P14_1に変更したり、Node1 の設定を更新したりするなど、必要な調整を行ってみると、TC233 と TC234 のいずれでもコードが期待どおりに機能しません。
以下のコードを共有しました。
/********************************************************************************************************************
* \file MULTICAN.c
* \copyright Copyright (C) Infineon Technologies AG 2019 (著作権 Copyright (C) Infineon Technologies AG 2019)
*
*このファイルの使用は、(i)あなたと会社の間で合意された使用条件に従うものとします。
* お客様が代理する事業、および(ii)インフィニオンテクノロジーズAGまたはそのライセンシー。 そのような利用規約がない限り、
*同意され、このファイルの使用は以下を条件とします。
*
* Boost Software License - Version 1.0 - 2003年8月17日
*
* 許可は、ソフトウェアのコピーを入手した個人または組織に無償で付与されます。
* 使用、複製、表示、配布、実行のためのこのライセンスの対象となる付随するドキュメント(以下「ソフトウェア」)、
*ソフトウェアを送信し、ソフトウェアの二次的著作物を作成し、
* そのためのソフトウェアが提供され、すべて以下が適用されます。
*
* 本ソフトウェアの著作権表示および本声明全体(上記のライセンス付与、この制限を含む)
*および以下の免責事項は、本ソフトウェアの全部または一部、およびすべてのコピーに含める必要があります。
* 本ソフトウェアの二次的著作物(ただし、当該複製物または二次的著作物が以下の形式のみである場合を除く)
* ソース言語プロセッサによって生成されたマシン実行可能なオブジェクトコード。
*
*ソフトウェアは「現状のまま」提供され、明示または黙示を問わず、いかなる種類の保証もありません。
*商品性、特定目的への適合性、権原、および非侵害の保証。 いかなる場合も、
*著作権者またはソフトウェアを配布する人は、
* 契約、不法行為、その他、本ソフトウェアまたは使用またはその他の取引に起因、起因、または関連して発生するもの
*ソフトウェアで。
/
/*********************************************************************************************************************/
/*-----------------------------------------------------含む------------------------------------------------------*/
/*********************************************************************************************************************/
#include "MULTICAN.h"
#include "string.h"
/*********************************************************************************************************************/
/*-------------------------------------------------グローバル変数--------------------------------------------------*/
/*********************************************************************************************************************/
AppMulticanType g_multican;/* グローバルMULTICAN構成と制御構造 */
AppLedType g_led;/* グローバルLED構成と制御構造 */
uint32 Battery_Saving_Mode、Low_Power_Mode、モード、Motor_ON_OFF、MCU_ON_OFF;
/*********************************************************************************************************************/
/*---------------------------------------------関数の実装----------------------------------------------*/
/*********************************************************************************************************************/
/* 割り込みサービスルーチンを定義するマクロ。
* このマクロは、
* - リンカセクションを .intvec_tc
* - 割り込み関数のコンパイラ固有の属性を定義します。
* - 割り込みサービスルーチンをISR関数として定義します。
*
* IFX_INTERRUPT(isr, vectabNum, priority)
* - isr: ISR 関数の名前。
* - vectabNum: ベクタテーブル番号。
* - priority: 割り込みの優先度。 詳細は割り込みマクロの使用法を参照してください。
*/
IFX_INTERRUPT(canIsrTxHandler, 0, ISR_PRIORITY_CAN_TX);
IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
/* 割り込みサービス ルーチン (ISR) は、TX 割り込みが生成されると呼び出されます。
* LED1を点灯させて、CANメッセージの送信が成功したことを示します。
*/
void canIsrTxHandler(ボイド)
{
/* 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);
}
}
}
/* RX 割り込みが生成されると呼び出される割り込みサービス ルーチン (ISR)。
* 受信したCANメッセージの内容と送信したCANメッセージの内容を比較します。
*成功した場合は、LED2をオンにして、CANメッセージの受信が成功したことを示します。
*/
/*このアプリケーションユースケースに関連するMULTICANモジュール、ノード、およびメッセージオブジェクトを初期化する関数 */
ボイドinitMultican(ボイド)
{
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 = 偽;
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();
}
ボイドTX_CAN_ID_Init(ボイド){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canSrcNode);
/*** CAN TX の msgObjId は、すべての 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);
}
ボイドRX_CAN_ID_Init(ボイド){
IfxMultican_Can_MsgObj_initConfig(&g_multican.canMsgObjConfig, &g_multican.canDstNode);
/*** 各メッセージオブジェクト ID には一意の 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;
/* RX メッセージの無効化 */
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(ボイド){
/* ======================================================================
* LEDに接続されたピンの構成:
* ======================================================================
* - GPIOポートの定義
* - LEDに接続されているGPIOピンを定義します
* - 一般的なGPIOピンの使用法を定義します(代替機能は使用されません)
* - パッドドライバーの強度を定義します
* ======================================================================
*/
g_led.led1.port = &MODULE_P13;
g_led.led1.pinインデックス= 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;
/* LEDに接続されたピンをレベル「HIGH」に初期化します。LEDはデフォルトの状態としてオフのままになります*/
IfxPort_setPinHigh(g_led.led1.port、 g_led.led1.pinIndex);
IfxPort_setPinHigh(g_led.led2.port、 g_led.led2.pinIndex);
/* LEDに接続された両方のピンのピン入出力モードを設定します */
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);
/* LEDに接続された両方のピンのパッドドライバモードを設定します */
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);
}
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/CAN-Transmission-Issue-in-TC233/td-p/722495
Show Less大家好 、
我想在我的一个项目中使用IRPS5401 PMIC,以获得多个不同电压的输出轨。 IRPS5401 PMIC 的输入电源只有5伏,但根据其数据表, V 电源引脚需要6 伏至 14 伏的电压,是否有办法只给它5伏电压并使 IC 高效运行,或者将它置于 NC 位置?
希望能尽快得到回复。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/Power-Management-ICs/IRPS5401-PMIC-V-supply-pin-query/td-p/724373
Show Less我在 TC233 中遇到了 CAN 传输问题,我真的需要一些帮助来排除故障。
情况如下:我使用 iLLD 示例源代码中的代码进行 CAN 初始化。 最初,我为 TC234 开发了代码,其中 P20_8 和 P20_7 引脚分别配置为 CAN TX 和 CAN RX 引脚。 该代码在 TC234 中运行正常。
然而,当我尝试将相同的代码调整到 TC233 时,进行了必要的调整,例如将引脚更改为 P14_0 和 P14_1,并更新了 Node1 设置,但该代码在 TC233 或 TC234 中均无法正常运行。
我在下面分享了代码。
/********************************************************************************************************************
* \file MULTICAN.c
* copyright Copyright (C) Infineon Technologies AG 2019
*
* 使用本文件须遵守(i)您或您在
* 正常业务过程中的公司与(ii)英飞凌科技公司或其许可方之间商定的使用条款。 如果且只要未就
* 使用条款达成一致,则使用本文件须遵守以下规定:
*
* Boost Software License - Version 1.0 - August 17th, 2003
*
* 特此免费允许任何获得本许可证所涵盖的软件副本和
* 随附文档("软件" )的个人或组织使用、复制、展示、分发、执行、
* 和传输本软件,以及制作本软件的衍生作品,并允许获得
* 软件的第三方这样做,但须遵守以下规定:
*
* 本软件中的版权声明和本完整声明,包括上述许可授予、本限制
* 和以下免责声明,必须包含在本软件的全部或部分副本以及本软件的所有
* 衍生作品中,除非这些副本或衍生作品仅以
* 源语言处理器生成的机器可执行目标代码的形式存在。
*
* 本软件按原样提供"" ,不作任何明示或暗示的保证,包括但不限于
* 对适销性、特定用途的适用性、所有权和非侵权性的保证。 在任何情况下,
* 版权持有者或分发本软件的任何人都不对因本软件或本软件的使用或其他
* 交易而引起、产生或与之相关的任何损害或其他责任承担责任,不论是
* 合同、侵权行为还是其他责任。
*********************************************************************************************************************/
/*********************************************************************************************************************/
/*-----------------------------------------------------Includes------------------------------------------------------*/
/*********************************************************************************************************************/
#include"MULTICAN.h"
#include"rtc.h"/*********************************************************************************************************************/
/*-------------------------------------------------Global variables--------------------------------------------------*/
/*********************************************************************************************************************/
AppMulticanType g_multican; /* Global MULTICAN configuration and control structure */
AppLedType g_led;/* 全局 LED 配置和控制结构 */
uint32 Battery_Saving_Mode, Low_Power_Mode, Mode,Motor_ON_OFF, MCU_ON_OFF;
/*********************************************************************************************************************/
/*--------------------------------------------- 函数实现----------------------------------------------*/
/*********************************************************************************************************************/
/*
* 该宏:
* - 将链接器部分定义为 .intvec_tc<向量 编号>_
* - 为中断函数定义编译器特定属性。
* - 将中断服务例程定义为 ISR 功能。
*
* IFX_INTERRUPT(isr, vectabNum, priority)
* - isr:ISR 函数名称。
* vectabNum:矢量表编号。
* 优先级:中断优先级。 有关更多详细信息,请参阅 MIDI 规范)*/
IFX_INTERRUPT(canIsrTxHandler, 0, ISR_PRIORITY_CAN_TX);
//IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
IFX_INTERRUPT(canIsrRxHandler, 0, ISR_PRIORITY_CAN_RX);
/* TX 中断发生后调用中断服务例程 (ISR)。
* LED1 亮起,表示 CAN 报文传输成功。
*/
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);
}
}
}
/* 一旦产生 RX 中断,就会调用中断服务例程 (ISR)。
* 将接收到的 CAN 报文内容与发送的 CAN 报文内容进行比较
*,如果成功,则打开 LED2 指示 CAN 报文接收成功。
*/
/*初始化 MULTICAN 模块、节点和与本应用程序用例相关的消息对象的函数 */
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);
/*** CAN TX 的 msgObjId 必须不同于所有 CAN RX msgObjId ***/
g_multican.canMsgObjConfig.msgObjId = SRC_MESSAGE_OBJECT_ID;
g_multican.canMsgObjConfig.messageId = CAN_MESSAGE_ID; // 0x777
g_multican.canMsgObjConfig.messageId = CAN_MESSAGE_ID; // 0x777frame = 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);
/*** 每个报文对象 ID 都附有唯一的 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;
/* RX 信息无效 */
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){
/* ======================================================================
* 配置连接到 LED 的引脚:
* ======================================================================
* - 定义 GPIO 端口
* - 定义连接到 LED 的 GPIO 引脚
* - 定义一般 GPIO 引脚用法(不使用备用函数)
* - 定义焊盘驱动器强度
* ======================================================================
*/
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;
/* 将与 LED 相连的引脚初始化为"HIGH"; 将 LED 保持关闭默认状态 */
IfxPort_setPinHigh(g_led.led1.port、 g_led.led1.pinIndex);
IfxPort_setPinHigh(g_led.led2.port.PinHigh) g_led.led2.pinIndex);
/* 为连接到 LED 的两个引脚设置引脚输入/输出模式 */
IfxPort_setPinModeOutput(g_led.led1.port.PinModeOutput(g_led.led1.port.PinModeOutput)) g_led.led1.pinIndex、 IfxPort_OutputMode_pushPull, g_led.led1.mode);
IfxPort_setPinModeOutput(g_led.led2.port.PinModeOutput) g_led.led2.pinIndex、 IfxPort_OutputMode_pushPull, g_led.led2.mode);
/* 为连接到 LED 的两个引脚设置焊盘驱动模式 */
IfxPort_setPinPadDriver(g_led.led1.port、 g_led.led1.pinIndex、 g_led.led1.padDriver);
IfxPort_setPinPadDriver(g_led.led2.port.PinPadDriver) g_led.led2.pinIndex、 g_led.led2.padDriver);
}
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/CAN-Transmission-Issue-in-TC233/td-p/722495
Show Lessみなさん
IRPS5401 PMIC をプロジェクトの 1 つに使用して、異なる電圧の複数の出力レールを取得したいと考えています。IRPS5401 PMICで使用可能な入力電源はわずか 5V ですが、データシートによると、 V電源 ピンには 6V〜14V が必要ですが、 5V のみを与えてICを効率的に動作させる方法はありますか、またはNCにするとどうなりますか?
いくつかの本当の迅速な応答を得ることを願っています。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/Power-Management-ICs/IRPS5401-PMIC-V-supply-pin-query/td-p/724373
Show Less你好
在 GPIF 设计器中设计状态机时,我无法访问附件中所示的线程编号、
如何解决这个问题?
谢谢。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/USB-superspeed-peripherals/Thread-number-issue-in-GPIF-Designer/td-p/724421
Show Less你好
在 GPIF 設計器中設計狀態機時,我無法存取附件中所示的線程號,
我該如何解決這個問題?
謝謝
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/USB-superspeed-peripherals/Thread-number-issue-in-GPIF-Designer/td-p/724421
Show Lesssmartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/GaN/%E6%B0%AE%E5%8C%96%E9%95%93%E5%8A%9F%E7%8E%87%E5%99%A8%E4%BB%B6%E5%92%8C%E5%B0%84%E9%A2%91%E5%8A%9F%E7%8E%87MOSFET%E7%9B%B8%E6%AF%94%E7%9A%84%E4%BC%98%E5%8A%BF%E6%98%AF%E4%BB%80%E4%B9%88-%E5%8F%8A%E6%9C%AA%E6%9D%A5%E7%9A%84%E5%8F%91%E5%B1%95%E8%B6%8B%E5%8A%BF/td-p/724361
Show Lessこんにちは
GPIF設計でステートマシンを設計すると、別紙のようにスレッド番号にアクセスできませんが、
どうすればこの問題を解決できますか?
感謝。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/USB-superspeed-peripherals/Thread-number-issue-in-GPIF-Designer/td-p/724421
Show Lesssmartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/GaN/%E6%B0%AE%E5%8C%96%E9%95%93%E5%8A%9F%E7%8E%87%E5%99%A8%E4%BB%B6%E5%92%8C%E5%B0%84%E9%A2%91%E5%8A%9F%E7%8E%87MOSFET%E7%9B%B8%E6%AF%94%E7%9A%84%E4%BC%98%E5%8A%BF%E6%98%AF%E4%BB%80%E4%B9%88-%E5%8F%8A%E6%9C%AA%E6%9D%A5%E7%9A%84%E5%8F%91%E5%B1%95%E8%B6%8B%E5%8A%BF/td-p/724361
Show Lesssmartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/GaN/%E6%B0%AE%E5%8C%96%E9%95%93%E5%8A%9F%E7%8E%87%E5%99%A8%E4%BB%B6%E5%92%8C%E5%B0%84%E9%A2%91%E5%8A%9F%E7%8E%87MOSFET%E7%9B%B8%E6%AF%94%E7%9A%84%E4%BC%98%E5%8A%BF%E6%98%AF%E4%BB%80%E4%B9%88-%E5%8F%8A%E6%9C%AA%E6%9D%A5%E7%9A%84%E5%8F%91%E5%B1%95%E8%B6%8B%E5%8A%BF/td-p/724361
Show LessHello
When designing the state machine in GPIF designer I can not access to the thread number as shown in the attachment,
How I can solve this issue?
Thanks.
Show LessHello everyone ,
I want to use the IRPS5401 PMIC into one of my project to get multiple output rails of different voltages . The input power supply available for IRPS5401 PMIC is only 5V , but according to its data sheet the V supply pin needs 6V- 14V for , is there any way I could give it only 5V and run the IC efficiently or what if I put it NC ?
Hoping to get some real quick responses.
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
1. 三相储能逆变器是输出为三相交流的意思吗?三相储能逆变器和VSG又有什么关系吗?
2. 请详述定义,进行对比,异同点具体分条叙述。
3. 造成这样不同的原因是什么?应用场景有什么不同?
4. 英飞凌相关热卖产品推荐。
5. 这两类产品相关的限制级文档或者技术资料。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/IGBT/%E5%82%A8%E8%83%BD%E9%80%86%E5%8F%98%E5%99%A8%E5%BA%94%E8%AF%A5%E5%A6%82%E4%BD%95%E7%90%86%E8%A7%A3-%E4%B8%89%E7%9B%B8%E5%82%A8%E8%83%BD%E9%80%86%E5%8F%98%E5%99%A8%E5%8F%88%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D/td-p/724368
Show Less1.三相储能逆变器是输出为三相交流的意思吗?
2.请详述定义,进行对比,异同点具体分条叙述。
3.造成这样不同的原因是什么?
4.英飞凌相关热卖产品推荐。
5.这两类产品相关的限制级文档或者技术资料。
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/IGBT/%E5%82%A8%E8%83%BD%E9%80%86%E5%8F%98%E5%99%A8%E5%BA%94%E8%AF%A5%E5%A6%82%E4%BD%95%E7%90%86%E8%A7%A3-%E4%B8%89%E7%9B%B8%E5%82%A8%E8%83%BD%E9%80%86%E5%8F%98%E5%99%A8%E5%8F%88%E6%98%AF%E4%BB%80%E4%B9%88%E6%84%8F%E6%80%9D/td-p/724368
Show Less