• 【iCore4 双核心板_ARM】例程十七:USB_MSC实验——读/写U盘(大容量存储器)


    实验方法:

    1、将跳线冒跳至USB_UART,通过Micro USB 线将iCore4 USB-UART接口与电脑相连。

    2、打开PUTTY软件。

    3、通过读U盘转接线将U盘(或者读卡器)与iCore4 USB-OTG接口相连。大容量存储器为FAT32格式。

    实验现象:

    核心代码:

    int main(void)
    {
    
      /* USER CODE BEGIN 1 */
    
      /* USER CODE END 1 */
    
      /* MCU Configuration----------------------------------------------------------*/
    
      /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
      HAL_Init();
    
      /* USER CODE BEGIN Init */
    
      /* USER CODE END Init */
    
      /* Configure the system clock */
      SystemClock_Config();
    
      /* USER CODE BEGIN SysInit */
    
      /* USER CODE END SysInit */
    
      /* Initialize all configured peripherals */
      MX_GPIO_Init();
      MX_USB_HOST_Init();
      MX_USART6_UART_Init();
      MX_FATFS_Init();
    
      /* USER CODE BEGIN 2 */
        usart6.printf("x0c");                                                                                           
        usart6.printf("33[1;32;40m");                                       
        usart6.printf("
    Hello, I am iCore4.
    ");
      /* USER CODE END 2 */
    
      /* Infinite loop */
      /* USER CODE BEGIN WHILE */
      while (1)
      {
      /* USER CODE END WHILE */
        MX_USB_HOST_Process();
    
      /* USER CODE BEGIN 3 */
    
      }
      /* USER CODE END 3 */
    
    }

    源代码下载链接:

    链接:http://pan.baidu.com/s/1skOtJh7 密码:ttme

    iCore4链接:

  • 相关阅读:
    语句结构1练习
    语句结构(1)
    常用dos命令(4)
    常用dos命令(3)
    常用dos命令(2)
    常用dos命令(1)
    因式分解 · Factor Combinations
    电话号码的字母组合 · Letter Combinations of a Phone Number
    286 walls and gate最近的出口
    286被围绕的区域 · Surrounded Regions
  • 原文地址:https://www.cnblogs.com/xiaomagee/p/7482828.html
Copyright © 2020-2023  润新知