This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Omit CheckMedia function in MemoryStorage

Hi,

My SD card detect pin, is not connected so How can I omit USBD_MSC0_CheckMedia() function?
I rewrited that function but PC did't detect it.

uint32_t USBD_MSC0_CheckMedia (void) {
#if (USE_FILE_SYSTEM == 1)              // If File System is used
       uint32_t param_status;
       uint8_t  media_state;            // Bit 0. media ready, Bit 1. media write protect
static uint8_t  media_ready_ex = 0U;    // Previous media ready state
       uint8_t  own;

 Get current media status
 media_state = 0U;
 media_state  =  USBD_MSC_MEDIA_READY;
 media_state |=  USBD_MSC_MEDIA_PROTECTED;
 return media_state;
 #else
  return USBD_MSC_MEDIA_READY;
 #endif
  }

Parents
  • At first,I commented this function but PC detected USB device as "Removable Disk" then I rewrite it in some states but the problem remained.
    I really don't know what's wrong! what's the reason of this problem?
    check_media function or another thing?(I checked necessary jumpers and my microcontroller is LPC1768)

Reply
  • At first,I commented this function but PC detected USB device as "Removable Disk" then I rewrite it in some states but the problem remained.
    I really don't know what's wrong! what's the reason of this problem?
    check_media function or another thing?(I checked necessary jumpers and my microcontroller is LPC1768)

Children