1734 views|8 replies

6

Posts

0

Resources
The OP
 

The problem of GD32450i-EVAL development board USB disk routine storage changing from internal SRAM to external flash chip is unsuccessful [Copy link]

In the project development, I need to store pictures in external flash. I use the GD32450i-EVAL development board USB flash drive routine to change the storage space from internal sram to external flash chip. I only changed the STORAGE_Init, STORAGE_Read, and STORAGE_Write functions, as well as the sector size and number. After the modification, enumeration can succeed, formatting also prompts success, but it cannot be read or written. Can anyone give me some advice?

This post is from GD32 MCU

Latest reply

This kind of problem is not easy to find. You should first look at the contents in the Flash. Because it has been changed to a file system, there should be a file system header.   Details Published on 2022-12-21 17:16
 

6742

Posts

2

Resources
2
 

Cannot read or write? Is the data being read and written incorrect?

This post is from GD32 MCU

Comments

Is there anything else I need to modify? Changing only the above mentioned places cannot meet the requirement of changing the storage medium to external flash  Details Published on 2022-12-21 14:24
 
 
 

6

Posts

0

Resources
3
 
wangerxian posted on 2022-12-21 13:50 Cannot read or write? Is the data read and written incorrect?

After opening the USB drive, there are several garbled folders and files inside, but none of them can be opened. It is also impossible to save files to the USB drive.

This post is from GD32 MCU

Comments

Is this what you mean? After changing the USB disk to external Flash, I see that the files and folders in the Flash are garbled.  Details Published on 2022-12-21 16:15
 
 
 

6

Posts

0

Resources
4
 
wangerxian posted on 2022-12-21 13:50 Cannot read or write? Is the data read and written incorrect?

Is there anything else I need to modify? Changing only the above mentioned places cannot meet the requirement of changing the storage medium to external flash

This post is from GD32 MCU
 
 
 

6742

Posts

2

Resources
5
 
loonkito posted on 2022-12-21 14:18 After opening the USB drive, there are several garbled folders and files in it, but none of them can be opened. It is also impossible to save files to the USB drive.

Is this what you mean? After changing the USB disk to external Flash, I see that the files and folders in the Flash are garbled.

This post is from GD32 MCU

Comments

Yes, and it happened after formatting. The garbled files and folders were not put in by me, and I cannot create or modify files.  Details Published on 2022-12-21 16:25
 
 
 

6

Posts

0

Resources
6
 
wangerxian posted on 2022-12-21 16:15 After changing the USB flash drive to an external Flash, the files and folders in the Flash are garbled. Is this what it means?

Yes, and it happened after formatting. The garbled files and folders were not put in by me, and I cannot create or modify files.

This post is from GD32 MCU

Comments

This kind of problem is not easy to find. You should first look at the contents in the Flash. Because it has been changed to a file system, there should be a file system header.  Details Published on 2022-12-21 17:16
 
 
 

6742

Posts

2

Resources
7
 
loonkito posted on 2022-12-21 16:25 Yes, and it is a formatted phenomenon. The garbled files and folders are not put in by me, and I can't create or modify files

This kind of problem is not easy to find. You should first look at the contents in the Flash. Because it has been changed to a file system, there should be a file system header.

This post is from GD32 MCU

Comments

OK, thank you, but I have a question. I don't know what needs to be changed. Is there any problem with the current modification method? Are there any other places that need to be changed? If not, I will focus on studying this part.  Details Published on 2022-12-21 17:40
 
 
 

6

Posts

0

Resources
8
 
wangerxian posted on 2022-12-21 17:16 This kind of problem is not easy to find. First, you should look at the content in the Flash. Because it is changed to a file system, there should be a file system header.

OK, thank you , but I have a question. I don't know what needs to be changed. Is there any problem with the current modification method? Are there any other places that need to be changed? If not, I will focus on studying this part.

This post is from GD32 MCU
 
 
 

6

Posts

0

Resources
9
 
Solved, the address parameter of the read and write function does not need to be * sector size, only read and write length * sector size is enough
This post is from GD32 MCU
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list