Fujitsu MB9B500 Series user manual 4.4 CAN, „ Usage, „ Hardware Setting, „ Block Diagram

Page 17
4.4 CAN

„Usage

1)Open Nand Flash sample project, and start debug.

2)Use “step over” to debug, and watch local variable “sec”, “min”, “hour”.

4.4 CAN

„Hardware Setting

Connect 2 EV-board with CAN interface, as following figure.

EV board 1

(Node A)

CAN 1 „Block DiagramManual background

CAN 2

CAN 1

CAN 2

EV board 2

(Node B)

Figure 4-6: CAN Hardware Connection

„Block Diagram

¾Node A: use buffer 10 (ID = 0x12345678) to transfer and buffer 8 (ID = 0x08765432) to receive

¾Node B: use buffer 7 (ID = 0x12345678) to receive and buffer 10 (ID = 0x08765432) to transfer.

Node A

Node B

Buffer 10

Buffer 7

(ID=0x12345678)

(ID=0x12345678)

Buffer 8

Buffer 10

(ID=0x08765432)

(ID=0x08765432)

Figure 4-7: CAN Demo Block Diagram

„Usage

1)Define “CAN_TX_RX” in the code, and compile, then program the code into Node A

2)Don’t define “CAN_TX_RX” in the code, and compile, then program the code into Node B.

3)Connect Node A with Node B

When in real usage, user can program one node, and use the other node to debug.

17

Image 17
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.2 MB9B506 Series MCU 1 Introduction1.1 Product Overview 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 Keil U-Link ME 2.5 Setting for Debug Tool„ Use IAR J-Link 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-11 Flash Load File Path 2 Don’t select “Use macro files” in “DebuggerSetup” tableFigure 5-10 Macro File Disabled 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