Fujitsu MB9B500 Series user manual USB Host, „ Hardware Setting, „ Flowchart, „ Usage

Page 19
4.6 USB Host

4.6 USB Host

„Hardware Setting

¾Check if 2,3 of J-USB- and J-USB+ short

¾Connect with a USB mouse

„Flowchart

The following flowchart illuminates the procedure to implement USB host function, which can catch the position of a USB mouse, it is not a certain flow of a function, but provides a clue to study and understand the sample code.

 

Start

 

 

SystemInit ( )

Initialize system

Enumeration

USB_Handler ( )

 

 

clock

 

 

 

 

main ( )

Initialize timer

Mouse data

USBF_Handler ( )

 

process

 

 

get_mouse_data ( )

 

 

 

minihost_init( )

Init USB host

Display mouse

 

 

data

 

 

 

 

 

 

 

Main()

Figure 4-9: USB Host Sample Code Flowchart

„Usage

1)Make the hardware setting

2)Enable definition “Debug” in the code

3)Run the code.

4)Move the USB mouse, and watch the mouse position in the terminal IO window as following figure. (Debug viewer window in Keil IDE)

Figure 4-10: USB Mouse Position Display

19

Image 19
Contents APPLICATION NOTE FUJITSU SEMICONDUCTOR SHANGHAI LIMITEDMB9B500 Series 32-BIT MICROCONTROLLERALL RIGHTS RESERVED 2011-04-21 Revision HistoryDate Version3 FLASH ON-BOARD PROGRAMMING 2 HARDWARE SETTINGREVISION HISTORY 1 INTRODUCTION1.1 Product Overview 1 Introduction1.2 MB9B506 Series MCU 1.3 Board Features AD channel 2 Hardware SettingTable 2-2 Setting for UART On-Board Programming 2.3 Setting for UART On-Board Programming2.4 Setting for USB On-Board Programming 2.2 Jumpers Overview„ Use IAR J-Link 2.5 Setting for Debug Tool„ Use Keil U-Link ME 3.1 On-Board Programming via UART 3 Flash On-Board ProgrammingFigure 3-5 COM Port in Device Manager 3.2 On-Board Programming via USBFigure 3-7 Press Reset Button Figure 3-4 USB Device SignFigure 3-8 Start Programming „ Press reset key on the board. Programming will start4 Sample Code „ Usage 4.1 UART„ Hardware Setting „ FlowchartFigure 4-3 Send UART Data From PC Side Flowchart 4.2 Nand Flash4.3 RTC „ Hardware Setting None „ Flowchart„ Block Diagram 4.4 CAN4.5 USB Function 4.6 USB Host 4.7 LCD & AD & Key Figure 5-1 J-Link Overview Figure 5-2 U-Link Overview 5 Debug Tool and IDEWatch window Main window 5.1 Debug with J-Link in IAR EWARM Workbench„ Run an Existed Project Tool bar Project list Log windowFigure 5-6Rebuild All 2 Select a project eww file3 Click “Project Rebuild All” Figure 5-5 Select a Project„ Setting for Flash Debug Figure 5-10 Macro File Disabled 2 Don’t select “Use macro files” in “DebuggerSetup” tableFigure 5-11 Flash Load File Path Figure 5-12 ICF File for RAM Debug „ Setting for RAM Debug2 Select “Use macro files” in “DebuggerSetup” table Figure 5-13 Macro File Enabled1 Use Flash debug „ How to Make a HEX FileFigure 5-14 Flash Loader File Disabled 3 Don’t use Flash loader fileFigure 5-17 Open a Project 5.2 Debug with U-Link ME in Keil uVision4Tool bar Project list Build output Figure 5-16 Keil IDE OverviewFigure 5-18 Select a Project 2 Select a project uvproj file3 Rebuild all 4 Start debugFigure 5-21 Debug Tool Bar Figure 5-22 ROM Address Setting for Flash DebugFigure 5-23 Don’t use initialization File 3 Check “Update Target before Debugging” checkboxFigure 5-24 Select Update Target Before Debugging 2 Don’t use initialization fileFigure 5-26 Select Initialization File 1 Set ROM address in Code SRAM area. 0x1fff8000-0x1fffffff2 Set initialization file path. ..\DebugRAM.ini Figure 5-25 Set RAM Address for RAM DebugFigure 5-28 HEX File Generation in Keil IDE Figure 5-27 Select Update Target Before Debugging„ Sample code 6 Materials Download„ Software „ Document