USB Mass Storage Device SPI External Flash

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB Mass Storage Device SPI External Flash

ソリューションへジャンプ
808件の閲覧回数
rd1
Contributor II

Hello,

i'm trying to implement a mass storage device on the LPCXpresso55s69 board that uses an external flash connected to the micro with an SPI protocol.

I started with looking at your examples dev_msc_disk_freertos and dev_msc_ramdisk_freertos using MCUXpresso IDE to get the info that i needed. I modified the function "USB_DeviceMscCallback(class_handle_t handle, uint32_t event, void *param)" replacing code below in the dev_msc_ramdisk_freertos example

errorCode =

          USB_Disk_WriteBlocks(lba->buffer, lba->offset, lba->size >> USB_DEVICE_DISK_BLOCK_SIZE_POWER);

errorCode =

          USB_Disk_ReadBlocks(lba->buffer, lba->offset, lba->size >> USB_DEVICE_DISK_BLOCK_SIZE_POWER);

with a function that reads and writes in the external flash.

I also changed the LBA size with 4096 cause because the sector size of the flash is 4096 and it's easier to program an entire sector.

The function terminates correctly and it seems to write and read the external flash.

But when i initialize the msd from the pc (cause when it's connected the computer sees a RAW msd and needs to initialize it) the computer cannot terminate the initilization.

I'm stuck here and i really don't know how to find the solution of this problem since everythings looks "fine" and gives no error.

 

Is there any function that i can look at or any common problem with this situation?

ラベル(2)
0 件の賞賛
1 解決策
783件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

It seems this is the same question with your case in salesforce, and I saw you close it,

do you still have any question about this?

 

 

元の投稿で解決策を見る

0 件の賞賛
1 返信
784件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello ,

It seems this is the same question with your case in salesforce, and I saw you close it,

do you still have any question about this?

 

 

0 件の賞賛