Renesas DA16200 PMOD User manual

User Manual
DA16200 DA16600 FreeRTOS
SDK Programmer Guide
UM-WI-046
Abstract
The DA16200 (DA16600) is a highly integrated ultra-low power Wi-Fi system on chip (SoC) that
allows users to develop the Wi-Fi solution on a single chip. This document is an SDK guide
document intended for developers who want to program using the DA16200 (DA16600) chipset and
describes the SDK API and peripheral device drivers and interfaces.

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
2 of 79
© 2023 Renesas Electronics
Contents
Abstract................................................................................................................................................ 1
Contents............................................................................................................................................... 2
Figures.................................................................................................................................................. 5
Tables ................................................................................................................................................... 6
Terms and Definitions......................................................................................................................... 7
References ........................................................................................................................................... 7
1 Introduction.................................................................................................................................... 8
1.1 Overview ............................................................................................................................... 8
1.2 Development Environment.................................................................................................... 9
1.3 Startup Main() ....................................................................................................................... 9
1.4 Startup System Applications............................................................................................... 12
1.5 Startup User Applications.................................................................................................... 14
1.6 Write User Application.........................................................................................................15
1.7 SDK Compilation.................................................................................................................18
1.8 Make fcCSP RTOS Image..................................................................................................19
2 Memory Map................................................................................................................................. 21
2.1 Memory Types .................................................................................................................... 21
2.2 SRAM Memory Map............................................................................................................ 21
2.3 Serial Flash Memory Map...................................................................................................22
2.3.1 DA16200.............................................................................................................. 22
2.3.2 DA16600..............................................................................................................23
3 Peripheral Driver ......................................................................................................................... 24
3.1 SPI Master .......................................................................................................................... 24
3.1.1 Introduction.......................................................................................................... 24
3.1.2 Application Programming Interface .....................................................................24
3.1.3 Sample Code....................................................................................................... 26
3.2 SPI Slave ............................................................................................................................ 26
3.2.1 Introduction.......................................................................................................... 26
3.2.2 Application Programming Interface .....................................................................28
3.2.3 Sample Code....................................................................................................... 28
3.3 SDIO Master ....................................................................................................................... 28
3.3.1 SDIO Introduction ................................................................................................ 28
3.3.2 Application Programming Interface .....................................................................28
3.3.3 Example Code ..................................................................................................... 30
3.4 SDIO Slave ......................................................................................................................... 30
3.4.1 Introduction.......................................................................................................... 30
3.4.2 Application Programmer Interface....................................................................... 30
3.4.3 Sample Code....................................................................................................... 31
3.5 I2C.......................................................................................................................................31
3.5.1 I2C Master ........................................................................................................... 31
3.5.2 I2C Slave .............................................................................................................31
3.5.3 Application Programming Interface .....................................................................32

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
3 of 79
© 2023 Renesas Electronics
3.5.4 Sample Code....................................................................................................... 33
3.6 SD/eMMC............................................................................................................................34
3.6.1 Introduction.......................................................................................................... 34
3.6.2 Application Programming Interface .....................................................................34
3.6.3 Sample Code....................................................................................................... 35
3.7 PWM.................................................................................................................................... 35
3.7.1 Introduction.......................................................................................................... 35
3.7.2 Application Programming Interface .....................................................................36
3.7.3 Sample Code....................................................................................................... 37
3.8 ADC.....................................................................................................................................37
3.8.1 Introduction.......................................................................................................... 37
3.8.2 Application Programming Interface .....................................................................38
3.8.3 Interrupt Description ............................................................................................ 40
3.8.4 Sample Code....................................................................................................... 40
3.9 GPIO ................................................................................................................................... 40
3.9.1 Introduction.......................................................................................................... 40
3.9.2 Application Programming Interface .....................................................................42
3.9.3 Sample Code....................................................................................................... 44
3.10 UART................................................................................................................................... 44
3.10.1 Introduction.......................................................................................................... 44
3.10.2 Application Programming Interface .....................................................................46
3.10.3 Sample Code....................................................................................................... 48
3.11 OTP......................................................................................................................................49
3.11.1 Introduction.......................................................................................................... 49
3.11.2 Application Programming Interface .....................................................................49
3.12 Bluetooth_LE_Coexistence.................................................................................................51
3.12.1 Pin Configuration ................................................................................................. 51
3.12.2 Pin Multiplex ........................................................................................................ 52
3.12.3 SDK Feature Definition........................................................................................52
3.12.4 Application Programming Interface .....................................................................52
4 NVRAM ......................................................................................................................................... 53
4.1 Application Programming Interface..................................................................................... 53
5 HW Accelerators.......................................................................................................................... 54
5.1 Set SRAM to Zero...............................................................................................................54
5.1.1 Application Programming Interface .....................................................................54
5.1.2 Sample Code....................................................................................................... 54
5.2 CRC Calculation..................................................................................................................54
5.2.1 Application Programming Interface .....................................................................54
5.2.2 Sample Code....................................................................................................... 54
5.3 Pseudo Random Number Generator (PRNG) ....................................................................55
5.3.1 Application Programming Interface .....................................................................55
5.3.2 Sample Code....................................................................................................... 55
5.4 Memory Copy Using DMA................................................................................................... 55
5.4.1 Application Programming Interface .....................................................................55
5.4.2 Sample Code....................................................................................................... 55

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
4 of 79
© 2023 Renesas Electronics
7 Wi-Fi Interface Configuration..................................................................................................... 56
7.1 Application Programming Interface..................................................................................... 56
7.1.1 Integer Type Parameters.....................................................................................57
7.1.2 String Type Parameters....................................................................................... 59
7.1.3 Sample Code....................................................................................................... 59
7.2 Soft-AP Configuration by Factory Reset............................................................................. 61
7.2.1 Configuration Data Structure............................................................................... 61
7.2.2 How to Configure the Soft-AP Interface ..............................................................63
7.3 Soft-AP Provisioning Protocol............................................................................................. 64
8 TX Power Table Edit.................................................................................................................... 65
8.1 Tune TX Power ................................................................................................................... 65
8.2 Apply Tuned TX Power to Main Image ............................................................................... 66
9 Tips............................................................................................................................................... 67
9.1 Find/Optimize Stack Size for Your Application ................................................................... 67
Appendix A Open-Source License .................................................................................................. 68
Appendix B Country Code and TX Power....................................................................................... 69
B.1 Country Code and Channels...............................................................................................69
B.2 Programming.......................................................................................................................75
Appendix C How to Use J-Link Debugger ...................................................................................... 76
Revision History ................................................................................................................................ 77

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
5 of 79
© 2023 Renesas Electronics
Figures
Figure 1: Eclipse Project Configuration................................................................................................. 9
Figure 2: Startup Files on DA16200 (DA16600) Project ....................................................................... 9
Figure 3: Applications on Eclipse Project............................................................................................ 12
Figure 4: Results of Running the ‘Hello World’ Applications ............................................................... 15
Figure 5: Customer Project in Eclipse IDE.......................................................................................... 16
Figure 6: Location of User Codes........................................................................................................ 17
Figure 7: Add User Files to the Eclipse Project................................................................................... 18
Figure 8: Compile SDK on Eclipse IDE............................................................................................... 18
Figure 9: Build Success on Eclipse IDE.............................................................................................. 19
Figure 10: Boot Logo with fcCSP-LP RTOS Image ............................................................................ 20
Figure 11: SRAM Memory Map........................................................................................................... 21
Figure 12: memory_map Command.................................................................................................... 21
Figure 13: PWM Block Diagram.......................................................................................................... 36
Figure 14: ADC Control Block Diagram............................................................................................... 37
Figure 15: TX Power Table.................................................................................................................. 65
Figure 16: TX Power Table Source Code ........................................................................................... 66
Figure 17: Check Stack Size............................................................................................................... 67

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
6 of 79
© 2023 Renesas Electronics
Tables
Table 1: 4 MB SFLASH Map for the DA16200.................................................................................... 22
Table 2: 4 MB SFLASH Map for the DA16600.................................................................................... 23
Table 3: SPI Master Pin Configuration................................................................................................ 24
Table 4: SPI Interface API Elements................................................................................................... 24
Table 5: SPI Interface API Elements................................................................................................... 27
Table 6: SPI Slave Interface API Elements......................................................................................... 28
Table 7: SDIO Interface API Elements................................................................................................ 28
Table 8: SDIO Slave Pin Configuration............................................................................................... 30
Table 9: SDIO Interface API Elements................................................................................................ 30
Table 10: I2C Master Pin Configuration .............................................................................................. 31
Table 11: I2C Slave Pin Configuration ................................................................................................ 32
Table 12: I2C Interface API Elements................................................................................................. 32
Table 13: SD/eMMC Master Pin Configuration................................................................................... 34
Table 14: SD/eMMC Interface API Elements...................................................................................... 34
Table 15: PWM Pin Configuration....................................................................................................... 36
Table 16: PWM Interface API Elements.............................................................................................. 36
Table 17: AUX ADC Pin Configuration................................................................................................ 37
Table 18: ADC Interface API Elements............................................................................................... 38
Table 19: GPIO Pin Configuration....................................................................................................... 41
Table 20: The Status of GPIO PIN...................................................................................................... 41
Table 21: GPIO Interface API Elements.............................................................................................. 42
Table 22: UART Pin Configuration...................................................................................................... 45
Table 23: UART Interface API Elements............................................................................................. 46
Table 24: OTP Map............................................................................................................................. 49
Table 25: OTP API Elements .............................................................................................................. 49
Table 26: 3-Pin Bluetooth® LE Coexistence Pin Configuration.......................................................... 51
Table 27: 1-Pin Bluetooth® LE Coexistence Pin Configuration.......................................................... 51
Table 28: Bluetooth®LE Coexistence API Elements .......................................................................... 52
Table 29: NVRAM API Elements......................................................................................................... 53
Table 30: HW Acc API Elements......................................................................................................... 54
Table 31: CRC API Elements.............................................................................................................. 54
Table 32: PRNG API Elements ........................................................................................................... 55
Table 33: HW DMA Elements.............................................................................................................. 55
Table 34: Wi-Fi Configuration API....................................................................................................... 56
Table 35: NVRAM Integer Type .......................................................................................................... 57
Table 36: NVRAM String Type............................................................................................................ 59
Table 37: NVRAM Sample Code on STA Mode.................................................................................. 59
Table 38: NVRAM Sample Code on Soft-AP Mode............................................................................ 60
Table 39: Soft-AP Interface Code ....................................................................................................... 61
Table 40: Soft-AP Configuration Code................................................................................................ 63
Table 41: TX Power Setting Value Range........................................................................................... 65
Table 42: TCP Client Sample Code .................................................................................................... 67
Table 43: Country Code ...................................................................................................................... 69
Table 44: Programming Example for Country Code ........................................................................... 75

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
7 of 79
© 2023 Renesas Electronics
Terms and Definitions
ADC Analog-to-Digital Converter
AP Access Point
API Application Programming Interface
AT Attention
BLE Bluetooth Low Energy
DMA Direct Memory Access
DPM Dynamic Power Management
FW Firmware
GPIO General Purpose Input Output
IDE Integrated Development Environment
IP Internet Protocol
LE Low Energy
NVRAM Non-volatile RAM
OTP One-Time Programmable Memory
RAM Random Access Memory
RTC Real-Time Clock
RTOS Real-Time Operating System
RX Receive
SDK Software Development Kit
SDIO Secure Digital Input Output
SPI Serial Peripheral Interface
STA Station
TCP Transport Control Protocol
TX Transmit
UART Universal Asynchronous Receiver / Transmitter
UDP User Datagram Protocol
XIP Execute in Place
References
[1] DA16200, Datasheet, Renesas Electronics
[2] DA16200 Mass Production, User Manual, Renesas Electronics
[3] DA16200 FreeRTOS, Example Application Manual, User Manual, Renesas Electronics
[4] DA16200 DA16600 FreeRTOS, Getting Started Guide, User Manual, Renesas Electronics
[5] DA16200, Provisioning the Mobile App, Renesas Electronics

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
8 of 79
© 2023 Renesas Electronics
1 Introduction
This document provides an overview of the Software Development Kit (SDK) used for application
development based on Wi-Fi solution using the DA16200 (DA16600) devices and boards. This SDK
includes DA16200/DA16600 generic projects, sample projects, a set of libraries, and drivers to
facilitate the creation of various applications by exploiting the provided hardware resources of a
connected DA16200 (DA16600) devices.
1.1 Overview
The DA16200 (DA16600) FreeRTOS SDK has seven folders:
●apps : Project files, source codes for feature configurations
○apps/common/examples: to demonstrate common use cases of what the DA16200
(DA16600) SDK provides
○apps/da16200/get_started/img: to which the images built / pre-compiled are copied
●core : source codes
●docs : user documents (user guides, programmer guides, etc.)
●library : to which the pre-compiled lib files (.a) are saved
●tools : build tools/ scripts, temporary build artifacts, or environment files
●utility : utilities for the FreeRTOS SDK
●version : version files to include when Image created
The DA16200 (DA16600) SDK may be provided with different features per customer or per certain
applications and Customer/Developer can change the features easily in SDK.
All generic features are defined in
~/FreeRTOS_SDK/apps/da16200/get_started/include/user_main/config_generic_sdk.h (the file name
may follow its reference type) where users can enable/disable some features. And detailed features
are defined in
~/FreeRTOS_SDK/apps/da16200/get_started/include/user_main/sys_common_features.h
NOTE
Not all features can be freely enabled or /disabled. This depends on the pre-compiled libraries included in the
SDK package. Ask Renesas Electronics for more details.
The typical Eclipse project for the DA16200 (DA16600) SDK is shown in Figure 1

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
9 of 79
© 2023 Renesas Electronics
Figure 1: Eclipse Project Configuration
1.2 Development Environment
The DA16200 (DA16600) FreeRTOS SDK needs the Eclipse IDE . See Section 5.4 and 5.5 of [4] for
Eclipse installation and Getting Started Guide.
1.3 Startup Main()
After system reboot, the system library invokes function main(). The following steps are run:
●Initialize HW resources (PIN_MUX, RTC, Console …)
●Run the system_start() function to start the DA16200 (DA16600) as Wi-Fi IoT device
Figure 2: Startup Files on DA16200 (DA16600) Project

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
10 of 79
© 2023 Renesas Electronics
[ ~/FreeRTOS_SDK/core/main/src/main.c ]
int main(char init_state)
{
...
xTaskCreate(system_launcher,
"system_launcher",
256*3, // for SecureBoot
(void *)NULL,
(tskIDLE_PRIORITY+1),
NULL);
...
vTaskStartScheduler();
}
void system_launcher( void *pvParameters)
{
...
// Initialize and run system application
// and run user application if needed.
start_da16x();
...
}
static void start_da16x(void)
{
...
/* Configure Pin-Mux of DA16200 */
config_pin_mux();
/* Initialize WLAN interface */
wlaninit();
/* Start DA16200 IoT system layer */
user_main(ramlib_ptim_init_status); // USER main
}
The following system initialization is done before applications start:
●Configure H/W and S/W features
●Configure system resources for system clock and TX power
●Initialize Wi-Fi function in wlaninit()
int user_main(char init_state)
{
...
/* Entry point for customer main */
if (init_state == pdTRUE) {
system_start();
} else {
Printf("\nFailed to initialize the RamLib or pTIM !!!\n");
}
return status;

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
11 of 79
© 2023 Renesas Electronics
}
After the basic HW resources are initialized, system_start() is called to run system/user
applications. The following happens:
●Start of system-provided applications in start_sys_apps()
●Start of user applications in start_user_apps()
[~/FreeRTOS_SDK/apps/da16200/get_started/src/user_main/system_start.c ]
int system_start(void)
{
/* Config HW wakeup resource */
config_user_wu_hw_resource();
/* Set configuration for H/W button */
config_gpio_button();
/* Set paramters for system running */
set_sys_config();
/* Initialize WLAN interface */
wlaninit();
... ...
/* Start system applications for DA16XXX */
start_sys_apps();
/*
* Entry point of user's applications
* : defined in user_apps_table.c
*/
/* Start system applications for DA16XXX */
start_user_apps();
}
NOTE
The main header files including configurable features are located in
./apps/da16xxx/get_started/include/user_main for generic projects or ./apps/common/examples/*(sample-
groups)/*(samples)/include for sample projects. All features in config_generic_sdk.h are configurable as
required. But some features in the sys_common_feature.h can be changed to handle delicate operations, if
there are anything unclear then contact the Renesas Electronics support team.

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
12 of 79
© 2023 Renesas Electronics
1.4 Startup System Applications
After running the main function, the DA16200 (DA16600) SDK runs applications provided by the
system and user defined. Each system application is started by the customer-define features.
Figure 3: Applications on Eclipse Project
[ ~/FreeRTOS_SDK/core/system/src/common/main/sys_apps.c ]
void start_sys_apps(void)
{
...
/* Start user application functions */
run_sys_apps();
}
The system applications run in two parts:
●Applications that should be executed regardless of network settings
●Applications that should be executed after the network setting is complete

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
13 of 79
© 2023 Renesas Electronics
static void run_sys_apps(void)
{
... ...
/* Create network independent apps */
create_sys_apps(sysmode, FALSE);
/* Create user's network independent apps */
create_user_apps(sysmode, FALSE);
...
/* wait for network initialization */
while (1) {
if (check_net_init(iface) == pdPASS) {
i = 0;
break;
}
i++;
vTaskDelay(1);
}
...
/* Check IP address resolution status */
while (check_net_ip_status(iface)) {
vTaskDelay(1);
}
/* Create network apps */
create_sys_apps(sysmode, TRUE);
}
All system applications are provided in the sys_apps_table[] as shown in the example code below:
[ ~/FreeRTOS_SDK/core/system/src/common/main/sys_apps.c ]
static const app_task_info_t sys_apps_table[] =
{
/* name, entry_func, stack_size, priority, timeslice, net_chk_flag, dpm_flag, port_no,
run_sys_mode */
/****** For function features ***********************************/
… …
#if defined ( __SUPPORT_MQTT__ )
{ APP_MQTT_SUB, mqtt_auto_start, 320, (U_PRIO), TRUE, TRUE, UNDEF_PORT, RUN_STA_MODE},
#endif// __SUPPORT_MQTT__
… …
/******* End of List ********************************************/
{ NULL, NULL, 0, 0, FALSE, FALSE, UNDEF_PORT, 0 }
};
NOTE
The user does not need to modify the system application tables provided in the DA16200 (DA16600) SDK.

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
14 of 79
© 2023 Renesas Electronics
NOTE
If the user wants to modify the system application table, then that is possible but only with the support of a
Renesas Electronics engineer.
1.5 Startup User Applications
After running the main function, the DA16200 (DA16600) SDK can run user-written applications.
The user applications also run in two parts:
●Applications that should be executed regardless of network settings
[ ~/FreeRTOS_SDK/core/system/src/common/main/sys_apps.c]
static void run_sys_apps(void)
{
... ...
/* Start user's network independent applications */
create_user_apps(sysmode, FALSE);
... ...
●Applications that should be executed after the network settings are completed
[ ~/FreeRTOS_SDK/core/system/src/common/main/sys_apps.c ]
void start_user_apps(void)
{
int sysmode;
… …
/* Run user's network dependent apps */
create_user_apps(sysmode, TRUE);
}
All user applications can be written in the user_apps_table[] as shown in the example code below.
The DA16200 (DA16600) SDK provides a “hello_world” application. (Enable
__SUPPORT_HELLO_WORLD__ in
~/FreeRTOS_SDK/apps/da16200/get_started/include/user_main/config_generic_sdk.h to use.)
[ ~/FreeRTOS_SDK/apps/da16200/get_started/src/apps/user_apps.c ]
const app_task_info_t user_apps_table[] = {
/* name, func, stack_size, pri, net_flag, dpm_flag, port_no, sys_mode */
#if defined (__SUPPORT_HELLO_WORLD__)
{ HELLO_WORLD_1, customer_hello_world_1, 64,(U_PRIO),FALSE,FALSE,UNDEF_PORT, ALL_MODE },
{ HELLO_WORLD_2, customer_hello_world_2, 64,(U_PRIO),TRUE, FALSE,UNDEF_PORT, ALL_MODE },
#endif // __SUPPORT_HELLO_WORLD__
{ NULL, NULL, 0, 0, FALSE, FALSE, UNDEF_PORT, 0 }
};

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
15 of 79
© 2023 Renesas Electronics
●HELLO_WORLD_1 Not network-dependent, this application starts after system start
●HELLO_WORLD_2 Network-dependent, this application starts after the Wi-Fi interface is up and
running
Figure 4: Results of Running the ‘Hello World’Applications
1.6 Write User Application
The user can add new application codes in the folder
~/FreeRTOS_SDK/apps/da16200/get_started/src/apps and can add a newly written application file in
the project such as hello_world.c. See Figure 5.

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
16 of 79
© 2023 Renesas Electronics
Figure 5: Customer Project in Eclipse IDE
The DA16200 (DA16600) SDK provides an interface to add a user application. The interface is
designed to create a user thread. For this purpose, define your application with this interface and
then a user thread is automatically created and run when the DA16200 (DA16600) starts.
The structure of the application thread information is as shown in the example code below:
[ ~/FreeRTOS_SDK/apps/da16200/get_started/include/apps/application.h ]
typedef struct _app_task_info {
/// Thread Name
char *name;
/// Funtion Entry_point
VOID (*entry_func)(ULONG);
/// Thread Stack Size
USHORT stksize;
/// Thread Priority
USHORT priority;
/// Flag to check network initializing
UCHAR net_chk_flag;
/// Usage flag for DPM running
UCHAR dpm_flag;
/// Port number for network communitation
USHORT port_no;
/// Running mode of DA16xxx

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
17 of 79
© 2023 Renesas Electronics
int run_sys_mode;
} app_thread_info_t;
●name Unique thread name
●entry_func Thread entry point
●stksize Stack size of thread
●priority Thread running priority
●net_chk_flag [DA16200 (DA16600) feature] Indicate if the software must wait until the
network interface is up and running before the user thread runs. If set to 1, the user thread waits
until the network interface is up and running. You must set the value to 1 if your program is a
network application
●dpm_flag [DA16200 (DA16600) feature] [To Be Used Later When DPM feature is
enabled –TBU_DPM] Indicate if the user thread uses the DPM function
●port_no [DA16200 (DA16600) feature] [TBU_DPM] Data transfer port number for
DPM mode. When a user thread has UDP/TCP operation with a specific port number, this port
number should be registered to distinguish the data in DPM mode. This port number should be
unique in the user thread table
●run_sys_mode [DA16200 (DA16600) feature] Runs a Wi-Fi mode (STA / Soft-AP). The
application runs only the specified Wi-Fi mode
NOTE
Do not use malloc() or free() function to allocate or free memory. Please make sure to use pvPortMalloc() or
vPortFree() function for allocate or free memory.
To add user application code in the DA16200 (DA16600) SDK:
1. Write new user code files and put the files in the customer folder. For example, hello_world.c.
Figure 6: Location of User Codes

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
18 of 79
© 2023 Renesas Electronics
2. Add the written user code files to the Eclipse project. See Figure 7.
Figure 7: Add User Files to the Eclipse Project
1.7 SDK Compilation
After an application is written, right-click on the project DA16200 (DA16600), and then click Build
Project. If you compile for the first time, it is recommended to run command Clean first. See Figure
8.
Figure 8: Compile SDK on Eclipse IDE

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
19 of 79
© 2023 Renesas Electronics
Figure 9: Build Success on Eclipse IDE
If the build is successful, two binary images will be created in the~/FreeRTOS_SDK/
apps/da16200/get_started/img folder. The names of the image files are:
●RTOS : DA16200_FRTOS-GEN01-01-XXXXXXXXX-000000.img
●2nd Bootloader : DA16200_FBOOT-GEN01-01-XXXXXXXXX-000000_W25Q32JW.img
(In case of Winbond W25Q32JW SFLASH)
For more information about the firmware download, see Section 4.5 of Ref. [4].
1.8 Make fcCSP RTOS Image
The DA16200 (DA16600) SDK provides a QFN-type RTOS SFLASH image file. After a compilation
with the DA16200 (DA16600) SDK, the QFN-type RTOS image with filename DA16200_FRTOS-
GEN01-01-XXXXX-000000.img is created in folder ~/SDK/apps/da16200/get_started/img/.
To create a RTOS image for the fcCSP type package with the DA16200 (DA16600) SDK, change the
files as shown below, and then follow the SDK Compilation instructions given in Section 1.7.
●Library file for Low-Power:
○~/FreeRTOS_SDK/library/liblmac.a.fcCSP_LP →~/FreeRTOS_SDK/library/liblmac.a
●Library file for Normal-Power:

UM-WI-046
DA16200 DA16600 FreeRTOS SDK Programmer Guide
Revision 1.9
04-Jan-2023
CFR0012
20 of 79
© 2023 Renesas Electronics
○~/FreeRTOS_SDK/library/liblmac.a.fcCSP_NP →~/FreeRTOS_SDK/library/liblmac.a
●Compile feature:
○~/FreeRTOS_SDK/apps/da16200/get_started/include/user_main/sys_common_features.h
–#undef __FOR_FCCSP_SDK__ →#define __FOR_FCCSP_SDK__
–In case of Low-Power: #define __FCCSP_LOW_POWER__
–In case of Normal-Power: #undef __FCCSP_LOW_POWER__
After the compilation and download (see Section 4.5 of [4] for the firmware download), it shows SDK
Version information as "V3.2.x.0 CSP LP" for Low-Power or “V3.2.X.0 CSP NP” for Normal-Power.
See Figure 10.
Figure 10: Boot Logo with fcCSP-LP RTOS Image
Other manuals for DA16200 PMOD
12
This manual suits for next models
1
Table of contents
Other Renesas Measuring Instrument manuals
Popular Measuring Instrument manuals by other brands

Aspion
Aspion G-Log Series user manual

SICK
SICK FLOWSIC500 operating instructions

Agilent Technologies
Agilent Technologies U5309A Startup guide

Extech Instruments
Extech Instruments HD450 user guide

geo-FENNEL
geo-FENNEL Selection Pro FLG 80-GREEN Tracking SP user manual

sauter
sauter CT P1 Instruction Manual and Data Sheet