AURIX™ Forum Discussions
Hello,
I am trying something which may be using GPIO pins in an unintended way. But currently I am not sure where exactly the limitation is, so I wanted to ask for inputs if and how this could work:
- We have a board with an Aurix TC397 connected with 4 wires to MMIC_A (normally as QSPI Master).
- For debugging purposes we would like to communicate with this MMIC_A but without the AURIX QSPI module (using a different SPI Master which is better integrated in our software environment)
- We do not have hardware access to any SPI lines since there are no signal lines or vias available for soldering on the bottom or top layer. The pins are not exposed.
- Only 4 GPIO lines and the DAP interface from the TC397 are available to us.
The idea is to use the CPU to simply in a while loop read inputs and copy the logic levels to the outputs as fast as possible while maintaining timings necessary for SPI communication.
I tried it with the code Attached (I hope the one files is enough, the rest would be from the Libraries/iLLD)
- Cpu0_main.c
- System and CPU clock speed to 300MHz (max.). In theory should be enough for sampling 1 to 25MHz signals.
- Initializing Input and Output drivers
- while loop for copying logic levels of 3 inputs to 3 outputs
- clock_in_vs_clock_out.png
- 30x loop runs of observing clock input vs. output with oscilloscope
Currently I am testing on a KIT_A2G_TC397_3V3_TFT before testing on the before mentioned board.
30x loop runs of observing clock input vs. output with oscilloscope (also attached), showed that the delay between input and output is higher than expected and that its inconsistent. The rising edge and high time is changing for every loop run so SPI communication is not possible.
I may have to check again if my CPU is actually running at 300MHz but I am not sure yet how.
Is it possible that reading and writing GPIO levels like that is just inappropriate usage and there is an inherent delay?
Kindly asking for suggestions.
Show Less
Hi Everyone
I try to follow documentation of Tasking Compiler to change linking to be incremental - so far without success.
My idea to enable incremental linking through CMake + ninja was to create wrapper tools for archiver and linker. Whenever archiver is called then after static library is generated link also this library into relocatable object ( incremental linking )
I've developed simple python wrapper script for archiver so that whenever it's called it would also run linker in incremental mode to link generated static library into relocatable object.
cctc --incremental -vv --cpu=tc39xb --force-c++ --no-exceptions --lsl-core=tc0 --lsl-file=application/linker/bootloader.lsl logger\libswc_logger.a -o Bootloader.out
But it fails with error:
ltc F009: internal error: requested ios object property does not exist ltc F019: unrecoverable error: fatal link error
I tried to find answer and there is nothing in the documentation what could help. Also, setting verbose output with -vv didn't add any more logs.
Non-incremental build and linking works fine.
Has anybody tried to use incremental linking feature?
Is my approach/understanding correct?
How can I debug this problem?
Thank you
#TC39XB 问题描述:
我设置的段是const类型,
1、设置一个section,然后向这个段中添加对象,
#define XXX_INFO __attribute__((used, protect)) __attribute__((section("info_table"))) const struct_info
链接脚本中修改:
# if LCF_DEFAULT_HOST == LCF_CPU0
group (ordered, run_addr=mem:pfls0)
# endif
{
select ".text.fast.pfls.cpu0";
select ".text.slow.pfls.cpu0";
select ".text.5ms.pfls.cpu0";
select ".text.10ms.pfls.cpu0";
select ".text.callout.pfls.cpu0";
select "(.text|.text.*)";
select "info_table";
}
程序中有多个对象实例,然后使用_lc_ub_driver_table、_lc_ue_driver_table来获取取址获得地址;
结果这两个量只能框住第一个成员对象的范围;
2、如果修改下链接文件,将该段放到单独的group中
# if LCF_DEFAULT_HOST == LCF_CPU0
group (ordered, run_addr=mem:pfls0)
# endif
{
select "driver_table";
}
程序中有多个对象实例,然后使用_lc_gb_driver_table、_lc_ge_driver_table来获取取址获得地址;此时范围是正常的;
但是我的程序中有多个段,都按照这种写法存放时,会出现段内容交错的情况,而且可能地址不连续,和其他的代码部分混杂在一起了;
疑问:
1、为什么section没有按照标准的语法组织?不同的情况下表现不一致呢?
2、是否和我存放在flash中有关?
3、关于lsl链接文件语法,有没有语法方面的介绍?
Show LessHello Champs, We have integrated the IOM driver provided as iLLD from https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples/IOM_PWM_Monitor_1_KIT_TC297_TFT but we are facing some issues. We made necessary changes in the code after integration. But the IOM module is not working and we are having hard time in debugging.
Let me brief the test scenario, we would like to monitor the WDI serve (150ms) from the MCU which is routed from P_34_3. And we modified the #define DUTY_THRESHOLD 0.05 and Fspb = Fgtm = 100Mhz. we have only integrated init_Iom() into our code and smu_init() is from our MCAL. we checked the P_34_3 using oscilloscope , WDI serve is perfect. We double checked the Port configurations too. since our duty cycle is 50% and we kept the DUTY_THRESHOLD 0.05(~ 50ms) so the global event should get generated. but it isn't. We also checked in the ECU any 22k pull down resistor as mentioned https://community.infineon.com/t5/AURIX/SafeTLib-TC275-Input-Output-Monitor-IOM-Test/td-p/316063 but there is no pull down resistor.
We have observed the following: 1. IOM_LAMEWC0.CNTO shows Overflow after the initialization of IOM 2. No IOM_ECMETH0.ETA0 & IOM_ECMETH0.ETB0 is being triggered 3. No SMU ALM8.25 is being reported from SMU let me add the snippets from iLLD for reference.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Let me add the init_Iom() from the iLLD IOM_PWM_Monitor.c, void init_Iom(void) {
/* Initialization of the port pin used in this example */ //
//Port_SetPinMode(PortConf_PortContainer_22_PORT_22_PIN_0, IfxPort_Mode_outputPushPullGeneral); /* PWM output */
Port_SetPinMode(PortConf_PortContainer_34_PORT_34_PIN_3, IfxPort_Mode_inputPullDown); /* IOM monitor input */
/* Disable interrupts */
DISABLE();
IfxIom_Driver driver;
IfxIom_Driver_Lam lam;
IfxIom_Driver_Config configDriver;
IfxIom_Driver_LamConfig configLam;
IfxIom_enableModule(); /* Initialization of the IOM module */
IfxIom_Driver_initConfig(&configDriver, &MODULE_IOM); /* Creation of default configuration */
IfxIom_Driver_init(&driver, &configDriver); /* Applying of the configuration */
IfxIom_Driver_initLamConfig(&configLam, &driver); /* Creation of a default LAM configuration */
configLam.channel = IfxIom_LamId_0; /* Selection of LAM #0 */
/* Configuration of the Monitor signal */
configLam.mon.input = IfxIom_MonInput_p34_3; /* IOM - Monitor signal input */
configLam.mon.filter.mode = IfxIom_LamFilterMode_noFilter; /* No filter applied on the signal */
configLam.mon.inverted = FALSE; /* Input signal NOT inverted */
/* Configuration of the Event Window */
configLam.eventWindow.controlSource = IfxIom_LamEventWindowControlSource_mon; /* Event window generation determined from the monitor signal */
configLam.eventWindow.run = IfxIom_LamEventWindowRunControl_freeRunning; /* Even generation window is not gated */
configLam.eventWindow.clearEvent = IfxIom_LamEventWindowClearEvent_risingEdge; /* Window cleared on the rising edge */
configLam.eventWindow.threshold = DUTY_THRESHOLD; /* Setting a threshold of 1,85ms (37% of PWM_PERIOD) */ configLam.eventWindow.inverted = TRUE; /* Window INVERTED: events are BEFORE the threshold */
/* Configuration of the IOM event */
configLam.event.source = IfxIom_LamEventSource_mon; /* Monitor signal is routed directly */
configLam.event.trigger = IfxIom_LamEventTrigger_fallingEdge; /* Falling edge used to gate event generation */ configLam.systemEventTriggerThreshold = 1; /* Alarm generated after 1 event */
IfxIom_Driver_initLam(&lam, &configLam); /* Apply the custom configuration */
lam.accumulatedCounterIndex = 1; /* Accumulated counter used */
IfxIom_Driver_enableLamEvent(&lam); /* Enable LAM events */
ENABLE();
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
from Ifxlom_cfg.h, brief LAM mon inputs , here modified to select LAM0.
typedef enum
{ IfxIom_MonInput_p34_3 = (IfxIom_MonInputSignal_p << EIGHT| 0x0,
IfxIom_MonInput_p33_1 = (IfxIom_MonInputSignal_p << EIGHT| 0x1,
IfxIom_MonInput_p33_2 = (IfxIom_MonInputSignal_p << EIGHT | 0x2,
IfxIom_MonInput_p33_3 = (IfxIom_MonInputSignal_p << EIGHT | 0x3,
IfxIom_MonInput_p33_4 = (IfxIom_MonInputSignal_p << EIGHT | 0x4,
IfxIom_MonInput_p33_5 = (IfxIom_MonInputSignal_p << EIGHT| 0x5,
IfxIom_MonInput_p33_6 = (IfxIom_MonInputSignal_p << EIGHT | 0x6,
IfxIom_MonInput_p33_7 = (IfxIom_MonInputSignal_p << EIGHT| 0x7,
.................................... }
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
Please help me to understand the issue. Thanks in advance.
Show LessHi all,
Regarding the channel on the ADC, I would like to ask what group id and channel id are corresponding to AN36?
Best explanation
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/AURIX/TC397-adc-%E5%85%B3%E4%BA%8Eadc%E4%B8%8A%E7%9A%84%E9%80%9A%E9%81%93-%E6%88%91%E6%83%B3%E9%97%AE%E4%B8%8BAN36%E5%AF%B9%E5%BA%94%E7%9A%84group-id%E5%92%8Cchannel-id%E6%98%AF%E5%A4%9A%E5%B0%91/td-p/681529
Show LessTASKING+miniwingger进行TC39XB的开发调试,程序编译通过后进行调试,但是使用DAS device scanner扫描到设备TriCore-Family后, debug时报错:进度条卡在64%,提示报错
Error creating session The debug instrument IO could not be initialized. The GDI debug instrument provided the following error message. Could not start server!
尝试单独使用memtool可以下载程序,能够执行;使用DAS basic client也能够连接并读取数据;
Show Less