完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
配置应该没错,编译后为什么会报错?我用的编译器版本是3.3.2的。是编译器不行还是代码有问题?我该如何处理这个问题呢?谢谢了,进行不下去了。 /* S3C2440: Mpll,Upll = (2*m * Fin) / (p * 2^s) * m = M (the value for divider M)+ 8, p = P (the value for divider P) + 2 */ #define S3C2440_MPLL_400MHZ ((0x7f<<12)|(0x02<<4)|(0x01)) #define S3C2440_UPLL_48MHZ ((0x38<<12)|(0x02<<4)|(0x02)) #define S3C2440_CLKDIV 0x05 /* FCLK:HCLK:PCLK = 1:4:8 */ /* S3C2410: Mpll,Upll = (m * Fin) / (p * 2^s) * m = M (the value for divider M)+ 8, p = P (the value for divider P) + 2 */ #define S3C2410_MPLL_200MHZ ((0x5c<<12)|(0x04<<4)|(0x00)) #define S3C2410_UPLL_48MHZ ((0x28<<12)|(0x01<<4)|(0x02)) #define S3C2410_CLKDIV 0x03 /* FCLK:HCLK:PCLK = 1:2:4 */ int board_init (void) { S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER(); S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO(); /* set up the I/O ports */ gpio->GPACON = 0x007FFFFF; gpio->GPBCON = 0x00044555; gpio->GPBUP = 0x000007FF; gpio->GPCCON = 0xAAAAAAAA; gpio->GPCUP = 0x0000FFFF; gpio->GPDCON = 0xAAAAAAAA; gpio->GPDUP = 0x0000FFFF; gpio->GPECON = 0xAAAAAAAA; gpio->GPEUP = 0x0000FFFF; gpio->GPFCON = 0x000055AA; gpio->GPFUP = 0x000000FF; gpio->GPGCON = 0xFF95FFBA; gpio->GPGUP = 0x0000FFFF; gpio->GPHCON = 0x002AFAAA; gpio->GPHUP = 0x000007FF; /*support both of S3C2410 and S3C2440*/ if ((gpio->GSTATUS1 == 0x32410000) || (gpio->GSTATUS1 == 0x32410002)) { /*FCLK:HCLK:PCLK = 1:2:4*/ clk_power->CLKDIVN = S3C2410_CLKDIV; /* change to asynchronous bus mod */ __asm__( "mrc p15, 0, r1, c1, c0, 0/n" /* read ctrl register */ "orr r1, r1, #0xc0000000/n" /* Asynchronous */ "mcr p15, 0, r1, c1, c0, 0/n" /* write ctrl register */ :::"r1" ); /* to reduce PLL lock time, adjust the LOCKTIME register */ clk_power->LOCKTIME = 0xFFFFFF; /* configure MPLL */ clk_power->MPLLCON = S3C2410_MPLL_200MHZ; /* some delay between MPLL and UPLL */ delay (4000); /* configure UPLL */ clk_power->UPLLCON = S3C2410_UPLL_48MHZ; /* some delay between MPLL and UPLL */ delay (8000); /* arch number of SMDK2410-Board */ gd->bd->bi_arch_number = MACH_TYPE_SMDK2410; } else { /* FCLK:HCLK:PCLK = 1:4:8 */ clk_power->CLKDIVN = S3C2440_CLKDIV; /* change to asynchronous bus mod */ __asm__( "mrc p15, 0, r1, c1, c0, 0/n" /* read ctrl register */ "orr r1, r1, #0xc0000000/n" /* Asynchronous */ "mcr p15, 0, r1, c1, c0, 0/n" /* write ctrl register */ :::"r1" ); /* to reduce PLL lock time, adjust the LOCKTIME register */ clk_power->LOCKTIME = 0xFFFFFF; /* configure MPLL */ clk_power->MPLLCON = S3C2440_MPLL_400MHZ; /* some delay between MPLL and UPLL */ delay (4000); /* configure UPLL */ clk_power->UPLLCON = S3C2440_UPLL_48MHZ; /* some delay between MPLL and UPLL */ delay (8000); /* arch number of SMDK2440-Board */ gd->bd->bi_arch_number = MACH_TYPE_S3C2440; } /* adress of boot parameters */ gd->bd->bi_boot_params = 0x30000100; icache_enable(); dcache_enable(); return 0; }
|
|
相关推荐
1个回答
|
|
解决了吗?解决了就来回贴吧,我记得你在群里问过
|
|
|
|
只有小组成员才能发言,加入小组>>
197个成员聚集在这个小组
加入小组为什么点亮LED的例子放在NORFlash上跑会出现奇怪的现象?
2156 浏览 6 评论
1964 浏览 5 评论
韦东山老师推出的《玩转ARM裸机实战》课程将帮你以上问题一扫而光!
4521 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 07:49 , Processed in 0.701706 second(s), Total 76, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号