打印

GD32F450 FLASH 问题

[复制链接]
617|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
TRUE_ARM|  楼主 | 2022-4-30 15:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
#技术资源# GD32F450,区分 Data area,Code area ,从搜索资料来看, 都说Data area都是慢速的。
我查看官方资料,有这样描述:
 Up to 3072KB of on-chip flash memory for instruction and data.
 The region of the MCU executing instructions without waiting time is up to 1024K bytes
(in case that flash size equal to 256K or 512K, all memory is no waiting time). A long
delay when CPU fetches the instructions out of the range.

这是不是说明 1024K bytes 是零等待区域? 对于GD32F450,Code area最多是512KB ,那么前面512KB Data area 也是高速的?

使用特权

评论回复
沙发
TRUE_ARM|  楼主 | 2022-4-30 16:08 | 只看该作者
通过测试代码:

int main(void)
{
   uint32_t i = 0;
   uint32_t mcnt2,mcnt3;
       
    gd_eval_led_init(LED1);
    systick_config();
       
           /* config the USART */
    gd_eval_com_init(EVAL_COM0);
       
    //-------------------------------------------------------
    //test time1
   printf("Test time 1:\n");
   mcnt2 = mcnt;                     
   for(i=0;i<60000*3;i++)
   {               
   }                               
  mcnt3 = mcnt;
   printf("init=%1d,end t=%1d, %1d.\n",mcnt2,mcnt3, mcnt3-mcnt2 );                       
   test_time2();

}

//Code area之外,

#pragma arm section code=".ARM.__at_0x08080000"  

void test_time2(void)
{
        uint32_t i = 0;
        uint32_t mcnt2,mcnt3;
       
        //test time1
printf("Test time 2:\n");
        mcnt2 = mcnt;
                  
        for(i=0;i<60000*3;i++)
        {               
        }
               
        mcnt3 = mcnt;
        printf("init=%1d,end t=%1d, %1d.\n",mcnt2,mcnt3, mcnt3-mcnt2 );
                               
}
#pragma arm section

运行结果:
Test time 1:
init=1,end t=6, 5.
Test time 2:
init=9,end t=14, 5.

可见,在两个位置,执行结果是一样的,也就是说后一个512K 也是无延时。

使用特权

评论回复
板凳
TRUE_ARM|  楼主 | 2022-4-30 16:46 | 只看该作者
搞定GD32F450 替换 STM32F429。从测试来看,STM32F429抗干扰要强:同样用手触摸芯片,GD32F450会导致屏闪,STM32则不会。国产IC还要努力啊。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

124

主题

454

帖子

1

粉丝