2014-07-02 07:55 AM
I choose USB host MSC + FREERTOS+FATFS .
make a project and compile it . but when i connect a USB flash , it dose not work. but when I don't choose FreeRTOS , It worked. why ? #usb-msc-mass-storage #stm32f4-discovery #fatfs2014-07-04 05:23 AM
Hiaskari.nima,
Please ensure that your project stack value is set up properly, try to increase it. Otherwise ensure that the Systick_Handler is as it follows:/**
* @brief This function handles System tick timer.
*/
void SysTick_Handler(void)
{
if (xTaskGetSchedulerState()!=taskSCHEDULER_NOT_STARTED)
{
xPortSysTickHandler();
}
HAL_IncTick();
}
Meanwhile can you provide us your STM32CubeMX Project
.ioc file ?
With regards.
2014-07-04 06:43 AM
Please ensure that the USBH_LL_DriverVBUS in the usbh_conf.c is not empty.
For STM324xG_EVAL platform use this: USBH_StatusTypeDef USBH_LL_DriverVBUS (USBH_HandleTypeDef *phost, uint8_t state) { if(state == 0) { HAL_GPIO_WritePin(GPIOH, GPIO_PIN_5, GPIO_PIN_SET); } else { HAL_GPIO_WritePin(GPIOH, GPIO_PIN_5, GPIO_PIN_RESET); } HAL_Delay(200); return USBH_OK; } And configure your IO Pin in MspInit: GPIO_InitStruct.Pin = GPIO_PIN_5; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; HAL_GPIO_Init(GPIOH, &GPIO_InitStruct); gafsos2014-07-05 01:28 AM
i have 5 v in usb flash disk .
my project file is here my board is stm32f4discovery ________________ Attachments : sdf.ioc : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzRJ&d=%2Fa%2F0X0000000bMd%2FUIMI1uYmVihIApbad476NipZNcOAU.V842sS38Bncoc&asPdf=false2014-08-20 09:53 AM
Hi, I was wondering if you could resolve that problem?
I have the exact same situation, I'm using the STM32F4-Discovery Board, and the STM32CubeMX program for configurating the device. I want to make the same configuration as the example, that is Host USB - MSC - FATFs, but with the FreeRTOS. But I'm having problems when it wants to open a file. It keeps me giving error. I've configured the USBH_LL_DriverVBUSas it says in the usbh_conf.cfile in the example application.USBH_StatusTypeDef USBH_LL_DriverVBUS(USBH_HandleTypeDef *phost, uint8_t state)
{
if(state == 0)
{
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_0, GPIO_PIN_SET);
}
else
{
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_0, GPIO_PIN_RESET);
}
HAL_Delay(200);
return USBH_OK;
}
FreeRTOS configuration: