RE01B Group Getting Started Guide to Development Using CMSIS Package
R01AN5310EJ0100 Rev.1.00 Page 4 of 129
Mar. 15, 2021
5.2.2 Driver Functions .................................................................................................................................. 49
5.3 Interrupt Control..................................................................................................................................... 51
5.3.1 Interrupt Vector Table and Entry Functions ........................................................................................ 51
5.3.2 Overview of Interrupt Handling of Peripheral Functions ..................................................................... 52
5.3.3 IRQ Number Allocation ........................................................................................................................ 52
5.3.4 Editing r_system_cfg.h ........................................................................................................................ 54
5.3.5 Processing Related to Interrupts in User Application .......................................................................... 55
5.4 Clock Settings ........................................................................................................................................ 57
5.4.1 Clock Definitions .................................................................................................................................. 57
5.4.2 Driver Functions .................................................................................................................................. 58
5.5 Pin Settings ........................................................................................................................................... 59
5.5.1 Editing pin.c File in Initial Settings ....................................................................................................... 59
5.5.2 Pin Settings in User Application .......................................................................................................... 59
5.5.3 R_Pin Driver Functions ....................................................................................................................... 60
5.5.4 Edit R_PIN Driver Function ................................................................................................................. 61
5.6 Program RAM Placement ...................................................................................................................... 62
5.6.1 RAM Placement Method Using RAM Placement Section ................................................................... 63
5.6.2 Method of RAM Placement Using Forced Inline Expansion ............................................................... 68
6. Creating a User Program ......................................................................................................... 69
6.1 Preparation for User Program Creation ................................................................................................ 69
6.1.1 Preparation for Startup Processing ..................................................................................................... 71
6.1.2 Preparation of Common Function Drivers ........................................................................................... 73
6.1.3 Preparation of Peripheral Function Drivers ......................................................................................... 77
6.2 User Program Creation ......................................................................................................................... 77
6.2.1 Initial Settings ...................................................................................................................................... 79
6.2.2 Control of Peripheral Functions ........................................................................................................... 81
6.2.3 Control of Pins ..................................................................................................................................... 88
6.2.4 Controlling Interrupts ........................................................................................................................... 89
6.3 User Program Creation Example .......................................................................................................... 90
6.3.1 Example of Using a Peripheral Function Driver (USART Communication by SCI) ............................ 90
6.3.2 Example When Peripheral Function Driver is not Used (AGT Asynchronous General-purpose Timer
Application) .......................................................................................................................................... 96
7. Creating a Project .................................................................................................................. 100
7.1 EWARM Version.................................................................................................................................. 100
7.1.1 Setting Target Processor ................................................................................................................... 101
7.1.2 Linker File Setting .............................................................................................................................. 102
7.1.3 Compiler Include Path Settings ......................................................................................................... 103
7.2 e2 studio Version ................................................................................................................................. 104
7.2.1 Setting Toolchain ............................................................................................................................... 104