AURIX™ Forum Discussions
我使用的是tc234,我用ADS烧录,会显示Device is locked,然后就无法烧录了,且不能解锁。
但是,我换了一个电脑,再次烧录程序,就可以烧录进去了,也不会显示Device is locked。
How can I set the CMU clock 0 (for ATOM) to 200 MHz??
My code lines doesn't work.
Can you help me?
Hello,
There is a local buffer for SPI receive data, DMA writes data to this local variable. but i getting bus protection error. How to give the permission for this local variable only. It's possible to give the permission for local variable.
Show LessHi members,
I have tried to implement some assembly code for MCS.
but I have no information about it.
is there any assembly example code for MCS?
please let me know.
Thanks.
Show Lesshello Infineon Expert:
the development environment is, ADS V1.8, TC367 TriBoard (EvtBoard with TFT LCD).
CAN Node 0 rxMode is initialized as mixed mode of standard filter and FIFO 1 code.
filter #3 is initialized as 'IfxCan_FilterType_range' type. range is [0x400, 0x47F]
other Filters (0~2 and 4~10) is initialized as 'IfxCan_FilterType_classic'
The transmission of CAN messages works well. The reception of also works well except the ID in [0x400, 0x47F]
If I sent a message ID like 0x415 from CanOe, the iLLD function
IfxCan_Can_getRxFifo1FillLevel(&gblCanDriver.canNode[0] return value means expected message received
In iLLD function, IfxCan_Can_readMessage() , when this line code is executed
IfxCan_Node_readData(rxBufferElement, message->dataLengthCode, data);
the CPU0 runs into Instruction Error Trap.
Actually, this line code in IfxCan.c, function IfxCan_Node_readData() causes the Trap.
data[i] = destinationAddress[i];
The received Message Id is correct and in memory address , 0xF0200208, its data is CAN PDU sent from Canoe
I don't know whether the 'rxBuffersStartAddress' and 'rxFifo1StartAddress' is initialized correct or not.
Following is part of my code, the whole CAN_driver.c is also attached .
The Node initialization function is below
void Init_CanDriver_Node0()
{
uint8 i;
IfxCan_Can_Config canConfig;
IfxCan_Can_NodeConfig nodeConfig;
/*CAN0 Initialization */
IfxCan_Can_initModuleConfig(&canConfig, &MODULE_CAN0);
IfxCan_Can_initModule(&gblCanDriver.can[0], &canConfig);
/* CAN 0 Node0 initialization */
IfxCan_Can_initNodeConfig(&nodeConfig, &gblCanDriver.can[0]);
nodeConfig.nodeId = IfxCan_NodeId_0;
nodeConfig.frame.type = IfxCan_FrameType_transmitAndReceive;
nodeConfig.txConfig.dedicatedTxBuffersNumber = 32;
nodeConfig.rxConfig.rxMode = IfxCan_RxMode_sharedFifo1;
nodeConfig.rxConfig.rxFifo1Size = 32;
nodeConfig.messageRAM.txBuffersStartAddress = 0x400;
nodeConfig.filterConfig.standardListSize = 32;
nodeConfig.messageRAM.standardFilterListStartAddress = 0x00;
nodeConfig.messageRAM.rxBuffersStartAddress = 0x200;
nodeConfig.messageRAM.rxFifo1StartAddress = 0x200;
nodeConfig.messageRAM.baseAddress = (uint32)&MODULE_CAN0;
IfxCan_Can_Pins pins;
pins.rxPin = &IfxCan_RXD00B_P20_7_IN;
pins.rxPinMode = IfxPort_InputMode_pullUp;
pins.txPin = &IfxCan_TXD00_P20_8_OUT;
pins.txPinMode = IfxPort_OutputMode_pushPull;
pins.padDriver = IfxPort_PadDriver_cmosAutomotiveSpeed2;
nodeConfig.pins = &pins;
IfxCan_Can_initNode(&gblCanDriver.canNode[0], &nodeConfig);
/*initialize the rx messages and Tx messages buffer*/
for(i = 0; i < MAX_MSG_RECV_BUF_NODE0; i++)
{
IfxCan_Can_initMessage(&rxMsgBufNode0[i]);
rxMsgBufNode0[i].bufferNumber = i;
}
/*initialize the module global tx message*/
for(i = 0; i < MAX_MSG_SEND_BUF_NODE0;i++)
{
IfxCan_Can_initMessage(&txMsgBufNode0[i]);
txMsgBufNode0[i].bufferNumber = i;
}
}
HW buffer of FIFO1 is initialized as below:
void InitOsekNmRx_Node0()
{
IfxCan_Filter filter;
/*initialize the NM reception HW buffer dedicated filter */
filter.number = NM_RECV_BUF_ID; //#3 filter
filter.elementConfiguration = IfxCan_FilterElementConfiguration_storeInRxFifo1;
filter.id1 = 0x400;
filter.id2 = 0x47F;
filter.type = IfxCan_FilterType_range;
filter.rxBufferOffset = NM_RECV_BUF_ID;
IfxCan_Can_setStandardFilter(&gblCanDriver.canNode[0], &filter);
/*initialize OSEK NM reception message buffer */
rxMsgBufNode0[NM_RECV_BUF_ID].messageId = 0x400;
rxMsgBufNode0[NM_RECV_BUF_ID].readFromRxFifo1 = TRUE;
/*initialize OSEK NM transmission message buffer */
txMsgBufNode0[NM_SEND_BUF_ID].messageId = 0x419;
}
The function handling FIFO message reception is below:
uint32 OsekNmRecvMessage(int node, uint8 * pData)
{
uint32 recvId = 0;
if(0 == node)
{
/*check the HW buffer dedicated to UDS physical addressing request message ID*/
if(IfxCan_Can_getRxFifo1FillLevel(&gblCanDriver.canNode[0])>0)
{
IfxCan_Can_readMessage(&gblCanDriver.canNode[0], &rxMsgBufNode0[NM_RECV_BUF_ID], (uint32*)pData);
recvId = rxMsgBufNode0[NM_RECV_BUF_ID].messageId;
// dlc = (int)dlcCodeAndLenMappingTbl[(int)rxMsgBufNode0[NM_RECV_BUF_ID].dataLengthCode];
}
}
return recvId;
}
thanks and BR
YiChuan
Show Less
Hi,
I flashed the Blink Led code in TC399 controller, once it is getting turned off again if i turned on code is not working, What could be the reason
Show Less
Hi,
I am using the board infineon tc3x9 and I want to change the example of the ide : GTM_ATOM_PWM_1_KIT_TC397_TFT.
I want a clock frequency CMU_clock_0 equal to 200 MHz but when I try to modify the macro expression in the .c file the code doesn't run.
How can I modify and set the clock frequency to 200 MHz? for my application I need this frequency higher
Show LessHello All,
I am working on PMBus/SMBus driver code for TC397.
I have implemented the API's for PMBus but got stuck in SMBus driver which will communicate with DC-DC converter module.
Please help me to provide any similar application where SMbus drivers are implemented.
Thanks & Regards
Show Less
Hello,
I am working with the AURIX Application KIT TC3x7. SCR core is used to detect the wakeup signal on P33.2 and wake the PMIC once high level detected on the P33.2. After Starting of the SCR core, PMIC has been commanded to go to standby mode.
In SCR code, I am able to drive the output pins,( Verified by toggling the pin SCR_P00.6) but when I try to read the input pin SCR_P00.2 it always shows logic 0 even if that pin is connected to HIGH level.(3.3v)
Port 33 has given SCR access from TRICORE before transitioning to the standby mode. Also pins are configured as per the instruction given in the Auric TC397 user manual.
please find attached files for the code reference which I am using for testing the SCR code.
Thanks,
Deep D.
Show Less