I am using the dev_msd_cdc_bm_twrk65f180m app as a starting example with the RAM Disk configuration as storage for the MSD.
The example is using the internal RAM as storage and want to modify the example to use the external ram of my development board.
I have the SDRAM driver working and can read and write to the external RAM in my main routine.
I have modified the disk_struct_t to accept a pointer to my external RAM instead of fix address in internal RAM.
typedef struct _disk_variable_struct
/* disk space reserved */
uint8_t * storage_disk;
I have modified my scatter file to create a section in external RAM for my new bigger size array as follow:
__attribute__ ((section(".ext_ram"))) uint8_t storage_disk2[DISK_SIZE];
Then assign the array to pointer
g_composite_device.msc_disk.storage_disk = storage_disk2;
By doing these simple changes I cant get the drive (MSD) to work (Doesnt show as drive). I would assume that it doesn't matter where the data goes unless there is something wrong when accessing the SDRAM controller inside the USB MSD callback function "Disk_USB_App_Class_Callback".
I have tried a several thing and can't get it to work, any help would be really appreciated.