|
本帖最后由 hpdell 于 2016-11-23 22:46 编辑
请教下,有谁使用过 usb3300 这个芯片 ???
我现在在捣鼓这个芯片,发现 所有与这个芯片想连接的 Io 口的电平都为0,拔掉这个 usb3300 的模块 后,io口的电平都是高电平,想请教下
是不是我的这个 usb3300的模块有问题啊【在淘宝买的,目前就购买了一片】。
程序表现的现象如下:
挂载fatfs系统成功,但是要 f_open 函数时返回值为1,查看这个对应的返回值说明,是磁盘 IO 错误
/* File function return code (FRESULT) */
typedef enum {
FR_OK = 0, /* (0) Succeeded */
FR_DISK_ERR, /* (1) A hard error occurred in the low level disk I/O layer */
FR_INT_ERR, /* (2) Assertion failed */
FR_NOT_READY, /* (3) The physical drive cannot work */
FR_NO_FILE, /* (4) Could not find the file */
FR_NO_PATH, /* (5) Could not find the path */
FR_INVALID_NAME, /* (6) The path name format is invalid */
FR_DENIED, /* (7) Access denied due to prohibited access or directory full */
FR_EXIST, /* (8) Access denied due to prohibited access */
FR_INVALID_OBJECT, /* (9) The file/directory object is invalid */
FR_WRITE_PROTECTED, /* (10) The physical drive is write protected */
FR_INVALID_DRIVE, /* (11) The logical drive number is invalid */
FR_NOT_ENABLED, /* (12) The volume has no work area */
FR_NO_FILESYSTEM, /* (13) There is no valid FAT volume */
FR_MKFS_ABORTED, /* (14) The f_mkfs() aborted due to any problem */
FR_TIMEOUT, /* (15) Could not get a grant to access the volume within defined period */
FR_LOCKED, /* (16) The operation is rejected according to the file sharing policy */
FR_NOT_ENOUGH_CORE, /* (17) LFN working buffer could not be allocated */
FR_TOO_MANY_OPEN_FILES, /* (18) Number of open files > _FS_LOCK */
FR_INVALID_PARAMETER /* (19) Given parameter is invalid */
} FRESULT;
上述是fatfs的返回值定义,fatfs版本v0.12b
硬件连接与官网的 stm32f769 eval 的原理图一样,
提示 usb 连接成功,但就是不能够读写操作 ,不知为何 ???
/**
* @brief SOF callback.
* @param hhcd: HCD handle
* @retval None
*/
void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd) // 程序会进入到这个函数里面来,
{
USBH_LL_IncTimer (hhcd->pData);
// printf("USBH SOF Callback ... ... \r\n");
}
/**
* @brief Connect callback 连接回调函数.
* @param hhcd: HCD handle
* @retval None
*/
void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd)
{
USBH_LL_Connect(hhcd->pData);
printf("USBH Connect Callback ... ... \r\n");
}
/**
* @brief Disconnect callback 断开回调函数.
* @param hhcd: HCD handle
* @retval None
*/
void HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd)
{
USBH_LL_Disconnect(hhcd->pData);
printf("USBH Disconnect Callback ... ... \r\n");
}
程序源码如下:
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
月入3000的是反美的。收入3万是亲美的。收入30万是移民美国的。收入300万是取得绿卡后回国,教唆那些3000来反美的!
|