做了一块板子,用的是6678,原理图是按照TI官方给的,不过是把原先的nandflash:nand512r3a2czb6e 换成了spansion的s30ms01gp25tfw50,两者不同之处在于page和block的大小,将官方例程里的相关page和block参数改成了s30ms01gp25tfw50,程序编译通过但是不能读写,报错 nand device open failed ,请问有哪位大神有解决办法或思路,烦请提供一下,万分感谢。 邮箱 wangdong27153@163.com
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
做了一块板子,用的是6678,原理图是按照TI官方给的,不过是把原先的nandflash:nand512r3a2czb6e 换成了spansion的s30ms01gp25tfw50,两者不同之处在于page和block的大小,将官方例程里的相关page和block参数改成了s30ms01gp25tfw50,程序编译通过但是不能读写,报错 nand device open failed ,请问有哪位大神有解决办法或思路,烦请提供一下,万分感谢。 邮箱 wangdong27153@163.com
不好意思,以为有人回复会有邮件通知,没想到没有,刚刚才看到你的回复。例程是mscdk里自带的向nandflash烧写文件的例程,以下是部分程序
printf("NAND Writer Utility Version %s\n\n", version);
fp = fopen(input_file, "r");
if (fp == NULL)
{
printf("Error in opening %s input file\n", input_file);
return;
}
ret = parse_input_file(fp);
fclose (fp);
if (ret == FALSE)
{
printf("Error in parsing %s input file\n", input_file);
return;
}
/* Initialize main Platform lib */
memset(&init_config, 0, sizeof(platform_init_config));
memset(&init_flags, 1, sizeof(platform_init_flags));
init_flags.pll = 0;
init_flags.ddr = 0;
// if (platform_init(&init_flags, &init_config) != Platform_EOK)
// {
// printf ("Platform init failed!\n");
// print_platform_errno();
// return;
// }
#if !(defined(_EVMC6657L_))
p_device = platform_device_open(PLATFORM_DEVID_NAND512R3A2D, 0);
执行最后一句p_device = platform_device_open(PLATFORM_DEVID_NAND512R3A2D, 0);后,p_device 的值无法查看,会报错,
Shine Zhang 说:请问用的是哪里的例程?看一下platform_device_open里的参数改了吗?
不好意思,以为有人回复会有邮件通知,没想到没有,刚刚才看到你的回复。例程是mscdk里自带的向nandflash烧写文件的例程,以下是部分程序
printf("NAND Writer Utility Version %s\n\n", version);
fp = fopen(input_file, "r");
if (fp == NULL)
{
printf("Error in opening %s input file\n", input_file);
return;
}
ret = parse_input_file(fp);
fclose (fp);
if (ret == FALSE)
{
printf("Error in parsing %s input file\n", input_file);
return;
}
/* Initialize main Platform lib */
memset(&init_config, 0, sizeof(platform_init_config));
memset(&init_flags, 1, sizeof(platform_init_flags));
init_flags.pll = 0;
init_flags.ddr = 0;
// if (platform_init(&init_flags, &init_config) != Platform_EOK)
// {
// printf ("Platform init failed!\n");
// print_platform_errno();
// return;
// }
#if !(defined(_EVMC6657L_))
p_device = platform_device_open(PLATFORM_DEVID_NAND512R3A2D, 0);
执行最后一句p_device = platform_device_open(PLATFORM_DEVID_NAND512R3A2D, 0);后,p_device 的值无法查看,会报错,