Changing the memory location of mass storage in usbd_rom_dfu_composite example (LPC4357)

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

Changing the memory location of mass storage in usbd_rom_dfu_composite example (LPC4357)

1,245件の閲覧回数
_vi
Contributor I

Hi I am using LPC4357 usbd_rom_dfu_composite example from lpcopen_3_01_lpcxpresso_nxp_lpcxpresso_4337.
In this example a mass storage is created using internal SRAM (12kb size on disk).
I want to change storage location from internal sram to extrnal sram using EMC.
I tried to change the base adress (usb_param.mem_base) from 0x20000000 to 0x28000000 but mass storage is not getting created.
I am able to write and read data from external SRAM so that part is working.
Is there any other changes to be made that I am neglecting to make it work please help.

0 件の賞賛
返信
6 返答(返信)

1,133件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Vishrut Nair,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.

I was wondering if you can share the code you had already adapted, then I can replicate the phenomenon and work it out.
Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,133件の閲覧回数
_vi
Contributor I

Hi jeremyzhou
There is no option to attach any files. How do I share my code.
I have done only small modification to the usbd_rom_dfu_composite example from lpcopen_3_01_lpcxpresso_nxp_lpcxpresso_4337.
I have initialized external SD RAM using EMC and i am trying to create mass storage on external SD RAM.
I have changed the address of MSC_MEM_DISK_BASE in msc_disk.h to 0x28004000 and USB_STACK_MEM_BASE to 0x28000000.
Do I need to change anything in the call back functions (translate_rd,translate_wr,...).
Thanks

0 件の賞賛
返信

1,133件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Vishrut Nair

Thanks for your reply.

In the msc_ram.c, the macro MSC_MEM_DISK_BASE indicates the start address of area to store the data as a Disk.

You should adapt this macro instead of usb_param.mem_base.

/*****************************************************************************
 * Private types/enumerations/variables
 ****************************************************************************/
static uint8_t *g_memDiskArea = (uint8_t *) MSC_MEM_DISK_BASE;

Hope it helps.

Have a great day,
TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,133件の閲覧回数
_vi
Contributor I

Hi jeremyzhou

I changed static uint8_t *g_memDiskArea = (uint8_t *) MSC_MEM_DISK_BASE; to point to the external SDRAM location( 0x28000000). Now a

0 件の賞賛
返信

1,133件の閲覧回数
_vi
Contributor I

Hi jeremyzhou

I changed static uint8_t *g_memDiskArea = (uint8_t *) MSC_MEM_DISK_BASE; to point to the external SDRAM location( 0x28000000). When I connecting to PC it is showing format disc but I am not able to format the disc. Do I need to change anything in the call back functions (translate_rd, translate_wr,...).

Thanks

0 件の賞賛
返信

1,133件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Vishrut Nair,

Thanks for your reply.

The ROM USB API hasn't support the Format complete command in the USBD_MSC_INIT_PARAM structure yet, so it's no to way the handle this command

Have a great day,
TIC

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信