In this guide, you’ll configure the Renesas DA14592 Bluetooth® Low Energy SoC to operate as a BLE peripheral using the SDK10 ble_adv project in e²studio.
You’ll learn how to:
- Adjust the advertising interval
- Change the device name
- Activate Extended Sleep Mode
- Output debug messages through UART
This setup gives you a power-efficient BLE peripheral — ideal for low-power IoT nodes, sensors, and wearable devices.
Step 1️⃣ — Open the Project- Launch e²studio.
- Import the
ble_advproject from SDK10.
Instructions can be found here: 8. Your First DA1459x Application – FreeRTOS_Retarget — DA14592 Getting Started Guide
After importing the ble_adv project you should see the following on your Project Explorer:
First make sure that the original project compiles without errors. Select the DA14592-00-Debug_eFLASH build configuration:
Final output on the Console window:
BLE devices broadcast “advertising packets” periodically.The advertising interval defines how often these packets are sent — shorter intervals improve visibility but increase power usage.
For this example, we’ll set the interval to 150 ms, a good balance between responsiveness and power efficiency.
Action:
Open main.c file and modify the ble_adv_demo_task Task function.
We are going to use the following API that can be found on ble_gap.h file:
/**
* \brief Set the advertising interval
*
* Set the minimum and maximum interval to be used for advertising. Intervals are set in steps of
* 0.625ms. Allowed values for intervals span from 0x20 (20ms) to 0x4000 (10.24s), while for
* non-connectable advertising the range is 0xA0 (100ms) to 0x4000 (10.24s).
*
* \note This function has to be called prior to an advertising start (\sa ble_gap_adv_start()) and
* it will not modify the advertising interval of an ongoing advertising operation.
*
* \param [in] adv_intv_min Minimum interval in steps of 0.625ms
* \param [in] adv_intv_max Maximum interval in steps of 0.625ms
*
* \return result code
*/
ble_error_t ble_gap_adv_intv_set(uint16_t adv_intv_min, uint16_t adv_intv_max);Before we call the ble_gap_adv_start(GAP_CONN_MODE_UNDIRECTED) API, we change the Advertising Interval:
The device name is what appears when scanning from a smartphone or BLE scanner.
On the same file and function we will modify the following API:
/**
* \brief Set the device name used for GAP service
*
* \note
* This API function has to be called prior to creating the attribute database of the device. This
* is because the device configuration is going to be modified, which will result in clearing the
* current attribute database (if it exists).
*
* \param [in] name Pointer to the device name
* \param [in] perm Device name attribute write permission
*
* \return result code
*/
ble_error_t ble_gap_device_name_set(const char *name, att_perm_t perm);Change it from the default name to:
/* Set device name */
ble_gap_device_name_set("DA14592_Test", ATT_PERM_READ);This helps you easily identify your device during development and pairing.
We will also need to change the Advertising Data so we can Read the name whenever the Central device scans.On the top of the main.c file we can find the adv_data variable:
/*
* BLE adv demo advertising data
*/
static const uint8_t adv_data[] = {
#if dg_configSUOTA_SUPPORT || dg_configASYM_SUOTA_SUPPORT
0x03, GAP_DATA_TYPE_UUID16_LIST_INC, U16(dg_configBLE_UUID_SUOTA_SERVICE),
#endif
0x11, GAP_DATA_TYPE_LOCAL_NAME,
'R', 'e', 'n', 'e', 's', 'a', 's', ' ', 'A', 'D', 'V', ' ', 'D', 'e', 'm', 'o'
};Modified:
static const uint8_t adv_data[] = {
#if dg_configSUOTA_SUPPORT || dg_configASYM_SUOTA_SUPPORT
0x03, GAP_DATA_TYPE_UUID16_LIST_INC, U16(dg_configBLE_UUID_SUOTA_SERVICE),
#endif
0x0D, GAP_DATA_TYPE_LOCAL_NAME,
'D', 'A', '1', '4', '5', '9', '2', '_', 'T', 'e', 's', 't'
};Step 4️⃣ —Activate Extended Sleep ModeThe DA1459x devices support 4 different Power Modes:1) Active2) Extended Sleep mode3) Deep Sleep4) HibernationDetailed information can be found on DA1459x Datasheet on section 5.4 Power Modes and Rails and on the following Guide: DA1459x Power Measurement — DA14592 Getting Started GuideOn our project we want to configure the DA14592 for Extended Sleep mode.
Action:
On the main.c file make sure that you enable Extended Sleep mode inside the System Initialization.
We are utilizing the following API:
/**
* \brief Sets the generic sleep mode of the system. The sleep mode can be temporarily bypassed using
* the pm_sleep_mode_request function. In all cases, the priority of the sleep mode (considering 'active'
* as the highest and 'hibernation' the lowest priority) defines which will be the current system sleep mode.
*
* \param[in] mode the sleep mode to be set
*
* \return the previous sleep mode
*
* \warning The function will block if another task is accessing the Power Manager.
*
* \sa pm_sleep_mode_request
*
*/
sleep_mode_t pm_sleep_mode_set(sleep_mode_t mode);Step 5️⃣ — Add UART Debug MessagesIn order to enable UART functionality to enable Debug messages we need to define the CONFIG_RETARGET macro on the custom_config_eflash.h file.
#define CONFIG_RETARGETBy defining this macro, we initialize the UART inside the config.c file.The default UART Pins are based on the DA1459x Dev Kit Pro and can be found on brd_prodk_da1459x.h file:
/* Serial port configuration section */
#define SER1_UART (HW_UART2)
#define SER1_TX_PORT (HW_GPIO_PORT_0)
#define SER1_TX_PIN (HW_GPIO_PIN_13)
#define SER1_TX_MODE (HW_GPIO_MODE_OUTPUT)
#define SER1_TX_FUNC (HW_GPIO_FUNC_UART2_TX)
#define SER1_RX_PORT (HW_GPIO_PORT_0)
#define SER1_RX_PIN (HW_GPIO_PIN_15)
#define SER1_RX_MODE (HW_GPIO_MODE_INPUT)
#define SER1_RX_FUNC (HW_GPIO_FUNC_UART2_RX)
#define SER1_RTS_PORT (HW_GPIO_PORT_1)
#define SER1_RTS_PIN (HW_GPIO_PIN_0)
#define SER1_RTS_MODE (HW_GPIO_MODE_OUTPUT)
#define SER1_RTS_FUNC (HW_GPIO_FUNC_UART2_RTSN)
#define SER1_CTS_PORT (HW_GPIO_PORT_0)
#define SER1_CTS_PIN (HW_GPIO_PIN_11)
#define SER1_CTS_MODE (HW_GPIO_MODE_INPUT)
#define SER1_CTS_FUNC (HW_GPIO_FUNC_UART2_CTSN)We are now able to utilize the printf API to print out statements.All the code changes can be found on the code snippets.
Step 6️⃣ — Flash and TestWe have finalized our Code changes and we are ready to test our firmware image.
Right click on the ble_adv project and Select the DA14592-00-Debug_eFLASH Build Configuration.
When build has finished, you can download your firmware on the board.Right click again on ble_adv project and Select: Debug As---> Debug Configurations:
On the menu window, select Renesas GDB Hardware Debugging and then select based on the Build Configuration you used on the previous step.
When the firmware has been downloaded on the eFlash of the DA14592 it should start from a break point on main function:
Open a Terminal with the following configuration:
Open also SmartSnippets Toolbox and the Power Profiler tab in order to verify the Extended Sleep mode. Note: Debugger must be de-attached in order to test Extended Sleep mode.
By following these steps, you have configured the DA14592 BLE Peripheral to:
- Advertise every 150 ms
- Show as DA14592_Test during scans
- Enter Extended Sleep Mode for low power
- Send debug messages over UART for development insight
This configuration forms a solid foundation for creating low-power Bluetooth IoT devices with Renesas’ DA14592.


_Ph2PeKyvYo.png)

Comments