The AURIX™ TC3xx RAM does not initialize methods after reset (2)

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ZhaiL
Employee
Employee
50 sign-ins First reply posted 50 questions asked

我们曾经发布的一条内容中,有用户咨询如下问题,请帮忙解答:

单片机干货|AURIX™ TC3xx 复位后RAM不初始化方法

https://zhuanlan.zhihu.com/p/442135193

您好,我在infineon的community提的问题,其实没有得到完美的答案。

希望您能再提供一些技术支持
community.infineon.com/

 

我的诉求是,在RAM里分配一个section(DLMU0/1或者DSRAM0/1都可以),只有这个section里的变量在warm reset时,不要被iLLD的库函数(也许是C_Init()?)初始化。

 

不期望在UCB里把整个DLMU0/1或者DSRAM0/1配置成不初始化。因为其他在这个RAM区域的变量需要初始化。

 

例如变量 counter_receive 申明如下:

#pragma section fardata "NoInit_RAM"
#pragma noclear
uint32 counter_receive;
#pragma clear
#pragma section fardata restore

 

这个变量counter_receive在软件运行中变成了5。然后用调试器的restart功能复位,这个变量还是变成0.

 

开发环境是 Aurix Development Studio V1.8, TC367, 评估板 TC367_5V_TFT.

 

LSL里,把DSRAM0从192K改成了128K,一部分空间分配到"AppRam"

抱歉在知乎我没有贴图片的权限,lsl的片段如下,我想您一看就能明白。

memory dsram0 // Data Scratch Pad Ram
{
mau = 8;
size = 128k;
type = ram;
map (dest=bus:tc0:fpi_bus, dest_offset=0xd0000000, size=128k, priority=8);
map (dest=bus:sri, dest_offset=0x70000000, size=128k);
}

memory appRam // Application RAM
{
mau = 8;
size = 16k;
type = ram;
map (dest=bus:tc0:fpi_bus, dest_offset=0xd0020000, size=16k, priority=8);
map (dest=bus:sri, dest_offset=0x70020000, size=16k);
}

 

section_layout :vtc:linear
{
/*aplication RAM sections*/
group (ordered, attributes=rw, run_addr=mem:appRam)
{
select ".data.NoInit_RAM";
}
}

0 点赞
1 解答
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

答案:因为您在UCB里把整个DLMU0/1或者DSRAM0/1配置成初始化,所以这个变量还是变成0。

Answer: Because you configured the entire DLMU0/1 or DSRAM0/1 to initialize in UCB, this variable still becomes 0.

在原帖中查看解决方案

0 点赞
1 回复
Di_W
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 250 solutions authored

答案:因为您在UCB里把整个DLMU0/1或者DSRAM0/1配置成初始化,所以这个变量还是变成0。

Answer: Because you configured the entire DLMU0/1 or DSRAM0/1 to initialize in UCB, this variable still becomes 0.

0 点赞