2021-10-22 03:14 AM
follow youtube STM32 USB training - 11.2 USB MSC host labs to try a board with STM32F723vct6.
set as USB Host_Only on HS
static void USBH_UserProcess (USBH_HandleTypeDef *phost, uint8_t id)
{
/* USER CODE BEGIN CALL_BACK_1 */
switch(id)
{
case HOST_USER_SELECT_CONFIGURATION:
break;
case HOST_USER_DISCONNECTION:
Appli_state = APPLICATION_DISCONNECT;
break;
case HOST_USER_CLASS_ACTIVE:
Appli_state = APPLICATION_READY;
break;
case HOST_USER_CONNECTION:
Appli_state = APPLICATION_START;
//---------------zz
if (f_mount (&USBH_fatfs, USBHPath, 0) != FR_OK )
{
// Display_Line8x6 (1, 0, "fmout fail", 15,nH_lit);
}else {
// Display_Line8x6 (1, 0, "fmout rdy", 15,nH_lit);
//
}
f_mout can detect thumb drive plug in/plug out but never go to Appli_state == APPLICATION_READY
but can be OK If try on STM32F723E-DISCO board, can create files on thumb drive and save text to file
Solved! Go to Solution.
2021-10-24 07:27 PM
issue resolved, it is USB A signal D+/D- swapped.
2021-10-24 07:27 PM
issue resolved, it is USB A signal D+/D- swapped.