Fujitsu MB9B500 Series user manual Sample Code

Page 13
4 Sample Code

4 Sample Code

The sample codes for FSSDC-9B596-EV board are listed as following table.

 

Project Name

 

Description

 

ext_bus_nandflash

Use external bus to access Nand Flash

 

 

 

 

 

uart

 

Use UART to communicate with PC

 

 

 

 

 

can

 

Implement CAN communication between 2

 

 

CAN nodes

 

 

 

 

rtc

 

Use IIC to access RTC module

 

 

 

 

 

usb_function_mose

 

Implement the USB mouse to demonstrate

 

 

USB function

 

 

 

 

usb_host_catch_mouse

 

Identify a USB mouse and print the mouse

 

 

position on debug window

 

 

 

 

 

 

 

lcd_ad_key

Display ad value and key status on LCD

 

 

 

 

Notes:

1)It provides both IAR and Keil project for these sample code, IAR project is developed in EWARM Embedded Workbench V6102, and Keil project is developed in Keil uVision 4.20.

2)If user use other version to open these projects, compiling error may occur, in this case, please check following setting.

„IAR IDE

¾MCU type

¾Pre-included file

¾ICF file

¾Flash loader

„Keil IDE

¾MCU type

¾Pre-included file

¾ROM & RAM memory address

13

Image 13
Contents MB9B500 Series FUJITSU SEMICONDUCTOR SHANGHAI LIMITED32-BIT MICROCONTROLLER APPLICATION NOTEALL RIGHTS RESERVED Date Revision HistoryVersion 2011-04-21REVISION HISTORY 2 HARDWARE SETTING1 INTRODUCTION 3 FLASH ON-BOARD PROGRAMMING1.1 Product Overview 1 Introduction1.2 MB9B506 Series MCU 1.3 Board Features AD channel 2 Hardware Setting2.4 Setting for USB On-Board Programming 2.3 Setting for UART On-Board Programming2.2 Jumpers Overview Table 2-2 Setting for UART On-Board Programming„ 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-7 Press Reset Button 3.2 On-Board Programming via USBFigure 3-4 USB Device Sign Figure 3-5 COM Port in Device ManagerFigure 3-8 Start Programming „ Press reset key on the board. Programming will start4 Sample Code „ Hardware Setting 4.1 UART„ Flowchart „ UsageFigure 4-3 Send UART Data From PC Side 4.3 RTC 4.2 Nand Flash„ Hardware Setting None „ Flowchart 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 IDE„ Run an Existed Project 5.1 Debug with J-Link in IAR EWARM WorkbenchTool bar Project list Log window Watch window Main window3 Click “Project Rebuild All” 2 Select a project eww fileFigure 5-5 Select a Project Figure 5-6Rebuild All„ 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 2 Select “Use macro files” in “DebuggerSetup” table „ Setting for RAM DebugFigure 5-13 Macro File Enabled Figure 5-12 ICF File for RAM DebugFigure 5-14 Flash Loader File Disabled „ How to Make a HEX File3 Don’t use Flash loader file 1 Use Flash debugTool bar Project list Build output 5.2 Debug with U-Link ME in Keil uVision4Figure 5-16 Keil IDE Overview Figure 5-17 Open a Project3 Rebuild all 2 Select a project uvproj file4 Start debug Figure 5-18 Select a ProjectFigure 5-21 Debug Tool Bar Figure 5-22 ROM Address Setting for Flash DebugFigure 5-24 Select Update Target Before Debugging 3 Check “Update Target before Debugging” checkbox2 Don’t use initialization file Figure 5-23 Don’t use initialization File2 Set initialization file path. ..\DebugRAM.ini 1 Set ROM address in Code SRAM area. 0x1fff8000-0x1fffffffFigure 5-25 Set RAM Address for RAM Debug Figure 5-26 Select Initialization FileFigure 5-28 HEX File Generation in Keil IDE Figure 5-27 Select Update Target Before Debugging„ Software 6 Materials Download„ Document „ Sample code