找回密码
 立即注册

QQ登录

只需一步,快速开始

打印 上一主题 下一主题
开启左侧

[M480] SPI flash as a Storage for USB MSC

[复制链接]
跳转到指定楼层
楼主
admin 发表于 2023-3-13 16:41:48 | 只看该作者 回帖奖励 |正序浏览 |阅读模式

  • Application: This sample code uses SPI Flash as back end storage through SPIM interface.
  • BSP Version: M480 Series BSP CMSIS V3.04.000
  • Hardware: NuMaker-PFM-M487 Ver 3.0
In the sample code, the M480 acts as a USB 2.0 flash drive. It uses the SPIM interface as an back end storage for SPI Flash and has a file system. This function can be used as an alternative to the SD card as a storage space. The write speed is approximately 128 bytes per second.

The user must set the storage memory starting position and the total memory space size through MSC_Init( SectorOffset, TotalSector). A Sector is 512 KB. Since the SPI Flash limit requires at least 4KB to be cleared at a time, 4KB of content is read first, and deleted and then rewritten. The USB handler is in MSC_ProcessCmd(), and M480 will perform the corresponding processing according to the received command.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 0326144017
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 顶 踩
牛卧堂
回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU