RA software


easyDSP provides the source file for its communication based on FSP(Flexible Software Package).
Hereafter, FSP setting will be explained based on version 3.5.0.

STEP 1 : FSP setting 

First, activate FSP by clicking 'configuration.xml' file.
Then generate UART stack. Depending on MCU type, either r_sci_uart or r_sci_b_uart module should be used.

No setting to DTC Driver since it is not used. Click UART stack to set the properties.
 

In case 'properties' window is not shown, use below menus.

All the necessary change is shown in red at below picture :
First, enable FIFO if target MCU supports FIFO for this SCI channel. 
Also, change its module name to 'g_easyDSP'. And set the channel # to 9 in order to use SCI9 and select baud rate properly. Later in your easyDSP projec setting, the same baudrate should be used. Then change callback name to 'easyDSP_callback' and set its intterupt priority to lowest one.
The pins should be selected according to hardware setting. Since P109 and P110 are TXD9 and RXD9 respectively with most of RA MCU (
check RA hardware setting ), P109 and P110 are used here for the following explanation.

 

Also set the pin configuration so that the operation Mode is 'Asyncronous UART' and TXD9 is P109 and RXD9 is P110.

In case of some RA4 and RA6 MCU series, P109 and P110 overlaps with some debugger pins. Please set the debugger operation mode to SWD without SWO use.

The input pullup and higher drive capability is recommended to the pins P109 and P110.
 


Finally generate code.

 

STEP 2 : Calling easyDSP_init()

Two files are provided for easyDSP communication (easyRA_v11.1.h and easyRA_v11.1.c). Please include them in your project. You can find them in the easyDSP installation folder (\source\RA).
Pleae include easyRA_v11.1.h in the hal_entry.c and call  easyDSP_init() function.

 
 

STEP 3 : IDE setting

1. Hex file (Intel format) is used for flash programming. So it should be created in every compiling time in the same folder to output file (ex *.elf) with same file name. The hex file extension could be either 'hex' or 'ihex'. easyDSP first check if the hex file with extension 'hex' exists and use it for flash programming. If the hex file with extension 'hex' doesn't exist, easyDSP uses the hex file with extension 'ihex'. Pleae set your IDE accordingly to create hex file in every compilation.
For example, if you use e2 studio IDE :

2.
For easyDSP to access the variable, the debug information should be included in the output file (ex, *.elf). And the option of assembler, compiler and linker should be set accordingly.
3. The unused variables could be excluded from the debug information depending on compiler's optimization level and linker option. If necessary, you can set the linker option so that the unused variables are not excluded. For example, in the e2Studio, set the 'Remove Unused Sections' unclicked.