Renesas DA16200 User Manual
Renesas DA16200 User Manual

Renesas DA16200 User Manual

Freertos sdk programmer guide
Hide thumbs Also See for DA16200:
Table of Contents

Advertisement

Quick Links

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.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DA16200 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Renesas DA16200

  • Page 1: Abstract

    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...
  • Page 2: Table Of Contents

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Contents Abstract ..............................1 Contents ............................... 2 Figures ..............................5 Tables ..............................6 Terms and Definitions ......................... 7 References ............................7 Introduction............................ 8 Overview ..........................8 Development Environment ....................9 Startup Main() ........................9 Startup System Applications ....................
  • Page 3 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide 3.5.4 Sample Code ....................... 33 SD/eMMC ..........................34 3.6.1 Introduction ......................34 3.6.2 Application Programming Interface ..............34 3.6.3 Sample Code ....................... 35 PWM............................ 35 3.7.1 Introduction ......................35 3.7.2 Application Programming Interface ..............36 3.7.3...
  • Page 4 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Wi-Fi Interface Configuration ..................... 56 Application Programming Interface ..................56 7.1.1 Integer Type Parameters ..................57 7.1.2 String Type Parameters ..................59 7.1.3 Sample Code ....................... 59 Soft-AP Configuration by Factory Reset ................61 7.2.1...
  • Page 5: Figures

    DA16200 DA16600 FreeRTOS SDK Programmer Guide 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 ..................
  • Page 6: Tables

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide 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 ....................
  • Page 7: Terms And Definitions

    DA16200, Datasheet, Renesas Electronics DA16200 Mass Production, User Manual, Renesas Electronics DA16200 FreeRTOS, Example Application Manual, User Manual, Renesas Electronics DA16200 DA16600 FreeRTOS, Getting Started Guide, User Manual, Renesas Electronics DA16200, Provisioning the Mobile App, Renesas Electronics Revision 1.9 04-Jan-2023 CFR0012 ©...
  • Page 8: Introduction

    : 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...
  • Page 9: Development Environment

    DA16200 DA16600 FreeRTOS SDK Programmer Guide Figure 1: Eclipse Project Configuration Development Environment The DA16200 (DA16600) FreeRTOS SDK needs the Eclipse IDE . See Section 5.4 and 5.5 of Eclipse installation and Getting Started Guide. Startup Main() After system reboot, the system library invokes function main(). The following steps are run: ●...
  • Page 10 /* 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 ●...
  • Page 11 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. Revision 1.9 04-Jan-2023 CFR0012 ©...
  • Page 12: Startup System Applications

    DA16200 DA16600 FreeRTOS SDK Programmer Guide 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 ]...
  • Page 13 /******* 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. Revision 1.9 04-Jan-2023 CFR0012 © 2023 Renesas Electronics...
  • Page 14: Startup User Applications

    If the user wants to modify the system application table, then that is possible but only with the support of a Renesas Electronics engineer. 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: ●...
  • Page 15: Write User Application

    Figure 4: Results of Running the ‘Hello World’ Applications 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 Revision 1.9...
  • Page 16: Figure 5: Customer Project In Eclipse Ide

    DA16200 DA16600 FreeRTOS SDK Programmer Guide 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.
  • Page 17: Figure 6: Location Of User Codes

    ● 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 ●...
  • Page 18: Sdk Compilation

    Figure 7: Add User Files to the Eclipse Project 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...
  • Page 19: Make Fccsp Rtos Image

    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.
  • Page 20: Figure 10: Boot Logo With Fccsp-Lp Rtos Image

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide ○ ~/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 for the firmware download), it shows SDK Version information as "V3.2.x.0 CSP LP"...
  • Page 21: Memory Map

    OTP, and Serial Flash memory. Mask ROM boots the system and starts the Main image. Retention memory is a special memory to preserve the contents when in power save mode. The DA16200 (DA16600) SoC contains 512 kB SRAM. OTP is used to store some permanent information and its size is 8 kB.
  • Page 22: Serial Flash Memory Map

    The end address shown as 0x000F_DF80 can be changed by the variable size of DATA/BSS but less than 0x0010_0000 (512 kB). Serial Flash Memory Map The DA16200 and the DA16600 FreeRTOS SDK support 4 MB SFLASH only. 2.3.1 DA16200 Table 1: 4 MB SFLASH Map for the DA16200...
  • Page 23: Da16600

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide 2.3.2 DA16600 Table 2: 4 MB SFLASH Map for the DA16600 Address Name Size (kB) 0x0000_0000 Bootloader 0x0002_2000 Boot Index 0x0002_3000 RTOS #0 1788 0x001E_2000 RTOS #1 1788 0x003A_1000 Reserved Area 0x003A_2000 Debug / RMA Certificate...
  • Page 24: Peripheral Driver

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Peripheral Driver NOTE This document may be updated later with more detailed descriptions when the DA16200 (DA16600) SLR SoC is available. SPI Master 3.1.1 Introduction The SPI master communicates in full duplex mode that uses a master-slave architecture with a single master.
  • Page 25 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int SPI_IOCTL(HANDLE handler, UINT32 cmd, VOID *data) Parameter Handler SPI Driver (HANDLE) IOCTL command data IOCTL parameters Return TRUE / FALSE (int) Description SPI_SET_SPEED ● set the target SPI clock SPI_GET_SPEED ● get the current value of SPI clock SPI_SET_FORMAT ●...
  • Page 26: Sample Code

    3.2.1 Introduction The SPI slave interface enables support to control the DA16200 (DA16600) from an external host. The range of the SPI clock speed is the same as that of the internal bus clock speed. The SPI slave supports both burst mode and non-burst mode. In the burst mode, SPI_CSB remains active from the start to the end of communication.
  • Page 27: Table 5: Spi Interface Api Elements

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Table 5: SPI Interface API Elements Pin Number Pin Name Function Name fcCSP GPIOA2 GPIOA6 SPI_CSB F_CSN GPIOA3 GPIOA7 SPI_CLK F_CLK GPIOA1 GPIOA9 SPI_MOSI GPIOA11 F_IO0 GPIOA0 GPIOA8 SPI_MISO GPIOA10 F_IO1 Revision 1.9...
  • Page 28: Application Programming Interface

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide 3.2.2 Application Programming Interface Table 6: SPI Slave Interface API Elements void host_spi_slave_init(void) Change Slave I/F to SPI protocol. Enable clock to SPI slave device and GPIO Interrupt Set void host_i2c_slave_init(void) Change Slave I/F to I2C protocol. Enable clock to I2C slave device and GPIO Interrupt Set 3.2.3...
  • Page 29 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide HANDLE EMMC_CREATE(void); func_num Function number to disable Return If succeeded, return ERR_NONE. int SDIO_SET_BLOCK_SIZE(HANDLE handler, UINT32 func_num, UINT32 blk_size) Parameter handler Device handle func_num Function number blk_size Block size Return If succeeded, return ERR_NONE.
  • Page 30: Example Code

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int SDIO_READ_BYTE(HANDLE handler, UINT32 func_num, UINT32 addr, UINT8 *data) data Data pointer count Count of blocks blksz Block size Return If succeeded, return ERR_NONE. 3.3.3 Example Code See Ref. [3]. SDIO Slave 3.4.1 Introduction The GPIO4 and GPIO5 pins are set to SDIO CMD and CLK by default.
  • Page 31: Sample Code

    3.5.1 I2C Master The DA16200 (DA16600) includes an I2C master module. There are two supportable clock speeds for I2C in the DA16200 (DA16600); standard is 100 kbps and fast mode is 400 kbps. Table 10 shows the pin definition of the I2C master interface in GPIO Pin Configuration.
  • Page 32: Application Programming Interface

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Table 11: I2C Slave Pin Configuration Pin Number Pin Name Function Name fcCSP GPIOA1 GPIOA3 I2C_CLK GPIOA5 GPIOA7 GPIOA0 GPIOA2 I2C_SDA GPIOA4 GPIOA6 For more details, see Ref. [1]. 3.5.3 Application Programming Interface...
  • Page 33: Sample Code

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int DRV_I2C_IOCTL(HANDLE handler, UINT32 cmd, VOID *data) I2C_GET_CHIPADDR Get I2C Slave Device Address (8 bits) Read I2C_SET_CLOCK Set I2C Clock [kHz] (Max = 1200) Write int DRV_I2C_WRITE_DMA(HANDLE handler, VOID *p_data, UINT32 p_dlen, UINT32 dummy)
  • Page 34: Sd/Emmc

    3.6.1 Introduction The SD/eMMC host interface of the DA16200 (DA16600) provides access to SD or eMMC cards. The SD/eMMC host interface supports a 4-bit data bus with a maximum clock rate of 48 MHz giving a maximum data rate of 24 MB/s (192 Mbps). The SD/eMMC pin mux condition is defined in...
  • Page 35: Sample Code

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide HANDLE EMMC_CREATE(void) dev_addr Address p_data Data pointer block_count Block counter for write Return If succeeded, return ERR_NONE. Description EMMC write command void EMMC_SEND_CMD(HANDLE handler, UINT32 cmd, UINT32 cmd_arg) Parameter handler Device handle SDIO command without response. Defined in <SDIO.h>...
  • Page 36: Application Programming Interface

    Return If succeeded, return TRUE. If failed, return FALSE. Description Enable PWM block in the DA16200 (DA16600) with specified parameters period = (((period_us * 10) * (clock / 1000000))/10)-1; // minimum system clock 1mhz hduty = (((period + 1) * hduty_percent) / 100)-1;...
  • Page 37: Sample Code

    3.8.1 Introduction The DA16200 (DA16600) has Analog-to-Digital Converters (ADC): a four-channel single-end ADC of 12-bit resolution. Analog input is measured by means of 4 pins from GPIO0 to GPIO3, and the pin selection is changed through the register setting. See...
  • Page 38: Application Programming Interface

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide 3.8.2 Application Programming Interface Table 18: ADC Interface API Elements HANDLE DRV_ADC_CREATE(UINT32 dev_id) Parameter dev_id Device number to create a handle Return If succeeded, return handle for such device. If failed, return NULL.
  • Page 39 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide HANDLE DRV_ADC_CREATE(UINT32 dev_id) channel Channel number to read *p_data Buffer block to read p_dlen Number of samples to read with DMA, not buffer length Return If succeeded, return TRUE. If failed, return FALSE.
  • Page 40: Interrupt Description

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int DRV_ADC_WAIT_INTERRUPT(HANDLE handler, UNSIGNED *mask_evt); *mask_evt Mask for waiting interrupt bit[19] : Interrupt status for Threshold Difference of CHANNEL 3 bit[18] : Interrupt status for Threshold Difference of CHANNEL 2 bit[17] : Interrupt status for Threshold Difference of CHANNEL 1...
  • Page 41: Table 19: Gpio Pin Configuration

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide ● Address-masked byte writes to facilitate quick bit set and clear operations ● Address-based byte reads to facilitate quick bit test operations ● Make a GPIO pin to an interrupt pin possible to be the output signal of PWM [3:0], external Interrupt, SPI_CSB [3:1], RF_SW [1:0] and UART_TXDOE [1:0] on any GPIO pin It provides special functions for GPIO pin use.
  • Page 42: Application Programming Interface

    HANDLE GPIO_CREATE(UINT32 dev_type) Parameter dev_type Device index Return If succeeded, return handle for the device. If failed return NULL. Description The DA16200 (DA16600) can set GPIO_UNIT_A and GPIO_UNIT_C int GPIO_INIT (HANDLE handler) Parameter handler Device handle Return If succeeded, return ERR_NONE.
  • Page 43 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide HANDLE GPIO_CREATE(UINT32 dev_type) Description The necessary configuration of GPIO can be set with this function. Commands are as below: ● GPIO_GET_DEVREG = 1, ● GPIO_SET_OUTPUT, // set gpio as an output ● GPIO_SET_INPUT, // set gpio as an input ●...
  • Page 44: Sample Code

    Sample Code See Ref. [3]. 3.10 UART 3.10.1 Introduction The DA16200 (DA16600) has two UARTs (Universal Asynchronous Receiver-Transmitter), which have the following features: ● Programmable use of UART ● Compliance to the AMBA AHB bus specification for easy integration into SoC implementation ●...
  • Page 45: Table 22: Uart Pin Configuration

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide ● Supports both RS-232 and RS-485 ● Separate 32x8 bit transmit and 32x12 bit receive FIFO memory buffers to reduce CPU interrupts ● Programmable FIFO disabling for 1-byte depth ● Programmable baud rate generator ●...
  • Page 46: Application Programming Interface

    This function changes the baud rate of UART during UART operation int UART_IOCTL(HANDLE handler, UINT32 cmd, VOID *data) Parameter handler Device handle Commands are defined in <UART.h> in the DA16200 (DA16600) SDK data Data pointer Return If succeeded, return ERR_NONE.
  • Page 47 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int UART_IOCTL(HANDLE handler, UINT32 cmd, VOID *data) Description The user can set the configuration of UART with this function Configurations of UART should be called before the UART_INIT() function. Commands are as below: ●...
  • Page 48: Sample Code

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide int UART_READ (HANDLE handler, VOID *p_data, UINT32 p_dlen) Description User can use the UART_SET_RX_SUSPEND ioctl command to set the UART READ operation to suspend or not int UART_WRITE (HANDLE handler, VOID *p_data, UINT32 p_dlen)
  • Page 49: 3.11 Otp

    3.11 OTP 3.11.1 Introduction The DA16200 (DA16600) includes a one-time electrically field programmable non-volatile CMOS memory. This memory is to protect and manage major information essential for mass production and management of products, such as booting information, MAC address, serial number, and others.
  • Page 50 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide void otp_mem_close(void) Parameter void void Return void Close the OTP HW Description int otp_mem_read(UINT32 offset, UINT32 *data) offset OTP memory offset (0x00 ~ 0x1FE) Parameter data [out] data pointer of buffer Return OTP_OK if successes...
  • Page 51: Bluetooth_Le_Coexistence

    DA16200 (DA16600) that determines which has the priority over the other. When the priority of the DA16200 (DA16600) is set to be higher than BT/Bluetooth® LE, it ignores iBtAct signal and transmits its packet anyway. When the priority of the DA16200 (DA16600) is set to be lower than BT/Bluetooth®...
  • Page 52: Pin Multiplex

    _da16x_io_pinmux(PIN_EMUX, EMUX_BT); #endif _da16x_io_pinmux(PIN_FMUX, FMUX_GPIOBT); 3.12.3 SDK Feature Definition The Bluetooth ® LE coexistence feature can be enabled in the DA16200 (DA16600) SDK in the “config_generic_sdk.h” file as following: ● ® 3-Pin Bluetooth LE Coexistence #define __SUPPORT_BTCOEX__ // BT Coexistences ●...
  • Page 53: Nvram

    NVRAM The DA16200 (DA16600) has an NVRAM area on the flash memory to store system data and user data. NVRAM has various system configuration parameters to control the Wi-Fi function. Application Programming Interface There are NVRAM items of datatype integer and string.
  • Page 54: Hw Accelerators

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide HW Accelerators Set SRAM to Zero 5.1.1 Application Programming Interface Table 30: HW Acc API Elements void da16x_memset32(UINT32 *data, UINT32 seed, UINT32 length) Parameter data Buffer pointer to set seed value to fill...
  • Page 55: Pseudo Random Number Generator (Prng)

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Pseudo Random Number Generator (PRNG) 5.3.1 Application Programming Interface Table 32: PRNG API Elements UINT32 da16x_random(void) Parameter void Return 32 bits random value Description Generates 32 bits random value via HW accelerator 5.3.2 Sample Code #include <hal.h>...
  • Page 56: Wi-Fi Interface Configuration

    Wi-Fi Interface Configuration The DA16200 (DA16600) SDK defines various parameters for Wi-Fi interface configuration, and they are saved as profiles in the NVRAM. After system reset, the DA16200 (DA16600) reads an existing profile and sets the Wi-Fi interface based on that profile.
  • Page 57: Integer Type Parameters

    Wi-Fi authentication mode for Soft-AP interface ● CC_VAL_AUTH_OPEN ● CC_VAL_AUTH_WPA ● CC_VAL_AUTH_WPA2 ● CC_VAL_AUTH_WPA_AUTO (WPA & WPA2) (WEP is unsupported on the DA16200 (DA16600) AP mode) DA16X_CONF_INT_WEP_KEY_INDEX Wi-Fi WEP key index number (0~3) Revision 1.9 04-Jan-2023 CFR0012 © 2023 Renesas Electronics 57 of 79...
  • Page 58 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Name Description DA16X_CONF_INT_ENCRYPTION_0 Wi-Fi data encryption mode for STA interface ● CC_VAL_ENC_TKIP ● CC_VAL_ENC_CCMP ● CC_VAL_ENC_AUTO (TKIP & CCMP) DA16X_CONF_INT_ENCRYPTION_1 Wi-Fi data encryption mode for Soft-AP interface ● CC_VAL_ENC_TKIP ● CC_VAL_ENC_CCMP ● CC_VAL_ENC_AUTO (TKIP & CCMP) DA16X_CONF_INT_WIFI_MODE_0 Wi-Fi mode based on IEEE 802.11 standard for STA interface...
  • Page 59: String Type Parameters

    Soft-AP PSK to operate (~ 63 letters) DA16X_CONF_STR_COUNTRY Country code (2 or 3 letters, for example KR, US, JP, CH, etc.) defined by ISO 3166-1 alpha-2 standard DA16X_CONF_STR_DEVICE_NAME DA16200 (DA16600) device name (for WPS or Wi-Fi Direct) DA16X_CONF_STR_IP_0 STA interface IP address DA16X_CONF_STR_NETMASK_0 STA interface netmask...
  • Page 60: Table 38: Nvram Sample Code On Soft-Ap Mode

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide clear_tmp_nvram_env(); // Clear Cache // start setting name/value NVRAM parameters to NVRAM Cache (no delay) da16x_set_nvcache_int(DA16X_CONF_INT_MODE, 0); da16x_set_nvcache_str(DA16X_CONF_STR_SSID_0, ssid); da16x_set_nvcache_int(DA16X_CONF_INT_AUTH_MODE_0, auth_type); if (auth_type == CC_VAL_AUTH_WEP) { da16x_set_nvcache_str(DA16X_CONF_STR_WEP_KEY0, wep_key[0]); da16x_set_nvcache_str(DA16X_CONF_STR_WEP_KEY1, wep_key[1]); da16x_set_nvcache_str(DA16X_CONF_STR_WEP_KEY2, wep_key[2]); da16x_set_nvcache_str(DA16X_CONF_STR_WEP_KEY3, wep_key[3]);...
  • Page 61: Soft-Ap Configuration By Factory Reset

    Soft-AP Configuration by Factory Reset Many IoT devices start as a Soft-AP device to operate AP provisioning. The DA16200 (DA16600) has a Factory Reset function to change to Soft-AP mode after the Factory Reset button is clicked. This button is described in the section 4.2 and 4.3 in Ref.
  • Page 62 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide char country_code[4]; customer_ip_address; // IPADDR_DEFAULT, IPADDR_CUSTOMER char ip_addr[MAX_IP_ADDR_LEN]; char subnet_mask[MAX_IP_ADDR_LEN]; char default_gw[MAX_IP_ADDR_LEN]; char dns_ip_addr[MAX_IP_ADDR_LEN]; customer_dhcpd_flag; // DHCPD_DEFAULT, DHCPD_CUSTOMER //int dhcpd_ip_cnt; dhcpd_lease_time; char dhcpd_start_ip[MAX_IP_ADDR_LEN]; char dhcpd_end_ip[MAX_IP_ADDR_LEN]; char dhcpd_dns_ip_addr[MAX_IP_ADDR_LEN]; } softap_config_t; ● int customer_cfg_flag: Flag for SoftAP configuration ○...
  • Page 63: How To Configure The Soft-Ap Interface

    DA16200 DA16600 FreeRTOS SDK Programmer Guide 7.2.2 How to Configure the Soft-AP Interface The DA16200 (DA16600) SDK has the function shown in Table 40 to configure the Soft-AP interface. You can write your own values. This function is invoked when a factory reset is done.
  • Page 64: Soft-Ap Provisioning Protocol

    DA16200 DA16600 FreeRTOS SDK Programmer Guide Soft-AP Provisioning Protocol The DA16200 (DA16600) supports the Soft-AP mode for a Wi-Fi interface setup. The provisioning thread automatically runs when the DA16200 (DA16600) starts in Soft-AP mode. See DA16200 (DA16600) Provisioning the Mobile App in Ref. [5].
  • Page 65: Tx Power Table Edit

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide TX Power Table Edit The DA16200 (DA16600) SDK allows users to tune and edit TX Power (per channel) for FCC or country-dependent product customization/optimization. The country code and channels describe in Table Figure 15: TX Power Table NOTE The 2.4 GHz band is divided into 14 channels at 5 MHz intervals centered at 2.412 GHz, starting with channel...
  • Page 66: Apply Tuned Tx Power To Main Image

    DA16200 DA16600 FreeRTOS SDK Programmer Guide Apply Tuned TX Power to Main Image The following procedure describes how to set the tuned TX power indices to your Main image. 1. In the DA16200 (DA16600) SDK, open ~/FreeRTOS_SDK/core/system/src/common/main/sys_user_feature.c. Figure 16: TX Power Table Source Code The array cc_power_level contains the default values customized for FCC.
  • Page 67: Tips

    Tips Find/Optimize Stack Size for Your Application To check the stack size of the application, the DA16200 (DA16600) has a tool (a console command) called ps that shows the list of threads and the status of each application stack. is a snapshot of command ps when tcp_client_sample.c is run.
  • Page 68: Appendix A Open-Source License

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Appendix A Open-Source License ------------------------------------------------------------------------------------------------------------------- ------------------- Mosquitto 1.4.14 License Eclipse Distribution License 1.0 Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. All rights reserved. Redistribution and use in source and binary forms, with or without modification,...
  • Page 69: Appendix B Country Code And Tx Power

    DA16200 DA16600 FreeRTOS SDK Programmer Guide Appendix B Country Code and TX Power This section lists the country codes that the DA16200 (DA16600) supports and the supported channels of 2.4 GHz bandwidth in the STA and the Soft-AP mode. Country Code and Channels...
  • Page 70 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Country Country STA Channels Soft-AP Channels Code “CH” Switzerland 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CI” Ivory Coast 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CL” Chile 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CN” China 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CO” Colombia 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CR” Costa Rica 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “CU”...
  • Page 71 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Country Country STA Channels Soft-AP Channels Code “HN” Honduras 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “HT” Haiti 1,2,3,4,5,6,7,8,9,10,11 1,2,3,4,5,6,7,8,9,10,11 “HU” Hungary 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “ID” Indonesia 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “IE” Ireland 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “IL” Israel 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “IN” India...
  • Page 72 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Country Country STA Channels Soft-AP Channels Code “MN” Mongolia 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “MO” Macao 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 Northern Mariana “MP” 1,2,3,4,5,6,7,8,9,10,11 1,2,3,4,5,6,7,8,9,10,11 Islands “MQ” Martinique 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “MR” Mauritania 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “MT” Malta 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “MU”...
  • Page 73 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Country Country STA Channels Soft-AP Channels Code “SA” Saudi Arabia 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SE” Sweden 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SG” Singapore 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SI” Slovenia 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SK” Slovak Republic 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SN” Senegal 1,2,3,4,5,6,7,8,9,10,11,12,13 1,2,3,4,5,6,7,8,9,10,11,12,13 “SR”...
  • Page 74 UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Country Country STA Channels Soft-AP Channels Code “XX” 1,2,3,4,5,6,7,8,9,10,11 1,2,3,4,5,6,7,8,9,10,11 Revision 1.9 04-Jan-2023 CFR0012 © 2023 Renesas Electronics 74 of 79...
  • Page 75: Programming

    The power table consists of two types, one is for OFDM and the other is for DSSS. DA16200 (DA16600) will refer to the levels either of the cc_power_level table for OFDM mode or the cc_power_level_dsss for DSSS mode.
  • Page 76: Appendix C How To Use J-Link Debugger

    UM-WI-046 DA16200 DA16600 FreeRTOS SDK Programmer Guide Appendix C How to Use J-Link Debugger See Section 5.9 of Ref. [4]. Revision 1.9 04-Jan-2023 CFR0012 © 2023 Renesas Electronics 76 of 79...
  • Page 77: Revision History

    : #0, #1, #2, #3 → #1, #2, #3, #4 in section 14-Jun-2022 Updated company name of Reference documents Update SFLASH memory map for the DA16200/DA16600in section Updated TX power table programming in Appendix B.2 28-Mar-2022 Updated logo, disclaimer, and copyright.
  • Page 78 RoHS Compliance Renesas Electronics’ suppliers certify that its products are in compliance with the requirements of Directive 2011/65/EU of the European Parliament on the restriction of the use of certain hazardous substances in electrical and electronic equipment. RoHS certificates from our suppliers are available on request.
  • Page 79 Renesas disclaims responsibility for, and you will fully indemnify Renesas and its representatives against, any claims, damages, costs, losses, or liabilities arising out of your use of these resources. Renesas' products are provided only subject to Renesas' Terms and Conditions of Sale or other applicable terms agreed to in writing.

This manual is also suitable for:

Da16600

Table of Contents