21ic问答首页 - AT32F435VMT7基于FAL+QSPI驱动W25Q128。连续读取超过512K字节报错
AT32F435VMT7基于FAL+QSPI驱动W25Q128。连续读取超过512K字节报错
li4601353012023-05-22
用QSPI驱动W25Q128.驱动应该没问题。但是读取的时候,数据超过512K就会失败。
512K以内就正常,1M就失败。
我把FLASH分区,一个512K分区,一个1M分区,同时跑fal bench。结果如下:
```
msh />fal bench 4096 yes
Erasing 524288 bytes data, waiting...
Erase benchmark success, total time: 1.896S.
Writing 524288 bytes data, waiting...
Write benchmark success, total time: 2.048S.
Reading 524288 bytes data, waiting...
Read benchmark success, total time: 0.144S.
msh />fal probe update2
Probed a flash partition | update2 | flash_dev: norflash0 | offset: 1048576 | len: 1048576 |.
msh />fal bench 4096 yes
Erasing 1048576 bytes data, waiting...
Erase benchmark success, total time: 3.844S.
Writing 1048576 bytes data, waiting...
Write benchmark success, total time: 4.096S.
Reading 1048576 bytes data, waiting...
585728 3057 f1 ff.
585728 3058 f2 ff.
585728 3059 f3 ff.
...
...
585728 4090 fa ff.
585728 4091 fb ff.
585728 4092 fc ff.
585728 4093 fd ff.
585728 4094 fe ff.
Data check ERROR! Please check you flash by other command.
Read benchmark has an error. Error code: -1.
This operate has an error. Error code: -1.
msh />
```
不知道什么原因。
而且分区擦除和写入都成功了,读取失败了!
```
msh />sf probe qspi20
[I/SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[I/SFUD] sf_cmd flash device is initialize success.
[I/SFUD] Probe SPI flash sf_cmd by SPI device qspi20 success.
16 MB sf_cmd is current selected device.
msh />sf bench yes
Erasing the sf_cmd 16777216 bytes data, waiting...
Erase benchmark success, total time: 41.318S.
Writing the sf_cmd 16777216 bytes data, waiting...
Write benchmark success, total time: 65.537S.
Reading the sf_cmd 16777216 bytes data, waiting...
Data check ERROR! Please check you flash by other command.
Read sf_cmd failed, already rd for 788480 bytes, read 256 each time
Read benchmark has an error. Error code: 3.
This flash operate has an error. Error code: 3.
```
我单独做sf bench测试正片flash,也失败了,但是,我测试fal read write少量数据读写都正常。用sf 的read write也正常。
512K以内就正常,1M就失败。
我把FLASH分区,一个512K分区,一个1M分区,同时跑fal bench。结果如下:
```
msh />fal bench 4096 yes
Erasing 524288 bytes data, waiting...
Erase benchmark success, total time: 1.896S.
Writing 524288 bytes data, waiting...
Write benchmark success, total time: 2.048S.
Reading 524288 bytes data, waiting...
Read benchmark success, total time: 0.144S.
msh />fal probe update2
Probed a flash partition | update2 | flash_dev: norflash0 | offset: 1048576 | len: 1048576 |.
msh />fal bench 4096 yes
Erasing 1048576 bytes data, waiting...
Erase benchmark success, total time: 3.844S.
Writing 1048576 bytes data, waiting...
Write benchmark success, total time: 4.096S.
Reading 1048576 bytes data, waiting...
585728 3057 f1 ff.
585728 3058 f2 ff.
585728 3059 f3 ff.
...
...
585728 4090 fa ff.
585728 4091 fb ff.
585728 4092 fc ff.
585728 4093 fd ff.
585728 4094 fe ff.
Data check ERROR! Please check you flash by other command.
Read benchmark has an error. Error code: -1.
This operate has an error. Error code: -1.
msh />
```
不知道什么原因。
而且分区擦除和写入都成功了,读取失败了!
```
msh />sf probe qspi20
[I/SFUD] Find a Winbond flash chip. Size is 16777216 bytes.
[I/SFUD] sf_cmd flash device is initialize success.
[I/SFUD] Probe SPI flash sf_cmd by SPI device qspi20 success.
16 MB sf_cmd is current selected device.
msh />sf bench yes
Erasing the sf_cmd 16777216 bytes data, waiting...
Erase benchmark success, total time: 41.318S.
Writing the sf_cmd 16777216 bytes data, waiting...
Write benchmark success, total time: 65.537S.
Reading the sf_cmd 16777216 bytes data, waiting...
Data check ERROR! Please check you flash by other command.
Read sf_cmd failed, already rd for 788480 bytes, read 256 each time
Read benchmark has an error. Error code: 3.
This flash operate has an error. Error code: 3.
```
我单独做sf bench测试正片flash,也失败了,但是,我测试fal read write少量数据读写都正常。用sf 的read write也正常。
赞0
之前的测试是自己飞线测试的,我猜测应该是由于qspi速度较快,飞线本身没有等长布线,倒是qspi读数据出错。后来自己做了一块测试样板,打板回来测试之后,发现没有该问题。所以,估计是飞线导致的。但是,发现AT32F435的qspi速度有点慢,不知道是什么原因,感觉和和spi比没有优势。详情可见我的帖子,如果可以帮忙验证的话,感激不尽。https://bbs.21ic.com/icview-3305454-1-1.html
评论
2023-07-26
赞0
评论
2023-06-15
赞0
评论
2023-06-08
赞0
评论
2023-06-08
赞0
评论
2023-06-06
赞0
评论
2023-06-06
赞0
评论
2023-06-06
赞0
评论
2023-06-06
赞0
评论
2023-06-06
您需要登录后才可以回复 登录 | 注册