How to deal with "Big Sector" flash disk?

we change mcu's crystal fromm 22.118MHz to 12MHz while CH375's crystal is also 12MHz and then we can successfully use the "EXAM13" codes to open the files in smaller size disk like 128MB(fat 16) and 256MB(fat 16).

we try 1G,4G,8G flash disk but we cannot successfully use the "EXAM13" codes to open the files,while we can successfully use the "EXAM13" codes to open the files in smaller size disk like 128MB(fat 16) and 256MB(fat 16).

Is there something wrong with the "sector size issue"?

any positive suggestion is welcome. please help us. best regards

你用串口还是并口方式来操作CH375的?你可以下载一个WINHEX软件来看一下你的U盘的扇区是多大的,DISK_BASE_BUF不能小于每个扇区的大小.无法打开文件返回的错误代码是多少?可以把你的程序发送到 tech@wch.cn


regards:

(1)we 并口方式 to 操作CH375,DISK_BASE_BUF is 4096,Is it possible that the sector size of one DISK is bigger than 4096? (2) the return 错误代码 is 0x1F.

any possitive suggestion is welcome.

best regards


你使用的哪个库,是LIB6还是LIB4?同时你把1G的U盘格式化成FAT16去测试下看可以不可以??


regards: case 1: We use LIB4,and format 1G disk to fat16,it is useless. case 2: We use LIB6,and format 1G disk to fat32,it is useless. we think maybe it is something wrong with the "sector size issue". please help us. best regards to you all.


regards: when use the command i=ListAll(); does it matter that (1)special file like *.exe (2)file size cannot be too big. At this situation,when we use CH375hf6.lib,the brand is transcend, the flash disk is 2G big.the flash disk's file type is fat16. when we use the command i=ListAll(); the return ERROR code is 0x1F. Is something wrong with the situation.

please help us. best regards to you all.


1,按照你说的枚举方式是不可以的,你可以首先枚举文件,然后在找.EXE文件就可以了. 2,文件缓冲区的大小的话我们是通过一个宏定义的: #define FILE_DATA_BUF_ADDR 0x0200 /* 外部RAM的文件数据缓冲区的起始地址,缓冲区长度不小于一次读写的数据长度,字节模式不用该缓冲区 */ #define FILE_DATA_BUF_LEN 0x0200 这个宏定义是用来修改文件缓冲区的大小. 你使用的是什么单片机.普通的51单片机还是别的51核的单片机?可以不可以将你的硬件资源详细的说明下?


wch regards:

we use listed below:

(1) 8051 megawin 82G516 (2) 64K SRAM (3) 128MB nandflash (4) CH375 (5) CPLD (6) 74373 (7) RTC(real time clock):DS12885 note: 8051 megawin 82G516 address and data bus connect to CPLD to allocate memory address. and IO output. 128MB nandflash for file storage. CH375 for flash disk reading. 64K SRAM for 82G516 memory using. 74373 for address latch. DS12885 for time counting. please help us,thank you best regards to wch


只有登录才能回复,可以选择微信账号登录