Skip to main content

Bluetooth low energy

SmartBond™: power, size and system cost without compromise

Bluetooth® low energy is the de facto low power standard for connecting devices to each other and to the cloud. Highly integrated, the SmartBond™ SoC family features the smallest, most power efficient Bluetooth low energy solutions available and enables the lowest system costs. An extensive suite of support tooling ensures ease of use and a fast route to market.

Latest News Success Stories

Bluetooth Low Energy
SmartBond™ Product Portfolio Download PDF
Part Number DA14699/7/5/1 DA14683 DA14682 DA14586 DA14585 DA14531/0 DA14531MOD
  Product Description The world’s most advanced wireless microcontroller product family Single-chip high-security Bluetooth 5 solution with expandable memory Small size, low power and most integrated Bluetooth 5 SoC The world’s smallest and lowest power Bluetooth 5.1 System-on-Chip which enables the next 1billion IoT devices The DA14531 SmartBond TINY™ Module, based on the world’s smallest and lowest power Bluetooth 5.1 system-on-Chip
TYPE
SoC      
SiP          
Module            
TECHNOLOGY
Bluetooth® LE 5.2 5.0 5.0 5.0 5.0 5.1 5.1
2.4 GHz proprietary            
CORE SYSTEM
CPU 96MHz Arm
Cortex-M33
Floating Point DSP Extension
96MHz Arm
Cortex-M0
96MHz Arm
Cortex-M0
16MHz Arm
Cortex-M0
16MHz Arm
Cortex-M0
16MHz Arm
Cortex-M0+
16MHz Arm
Cortex-M0+
RAM 512kB
384kB (691)
128kB 128kB 96kB 96kB 48kB 48kB
ROM
OTP
128kB
4kB
128kB
64kB
128kB
64kB
128kB
64kB
128kB
64kB
144kB
32kB
144kB
32kB
Flash QSPI Flash QSPI Flash 1024kB 256kB SPI Flash SPI Flash 128kB
Crystals 32MHz+32kHz 32/16MHz+32kHz 32/16MHz+32kHz 16MHz+32kHz 16MHz+32kHz 32MHz 32MHz
POWER
Internal DCDC Buck Buck Buck Buck&Boost Buck&Boost Buck&Boost Buck
External System Power Rails 2x1.8V, 1x3.3V 2x1.8V, 1x3.3V 2x1.8V, 1x3.3V        
Charger ● ● ● ○        
SECURITY
AES/SHA 256/512 256/512 256/512 128 128 128 128
ECC/TRNG ● ● ● ● ● ●     ○ ● ○ ●
Secure Key Handling        
RADIO
Frequency 2.4GHz 2.4GHz 2.4GHz 2.4GHz 2.4GHz 2.4GHz 2.4GHz
Tx Power 6dBm 0dBm 0dBm 0dBm 0dBm 2.5dBm 2.2dBm
Rx Sensitivity -97dBm -94dBm -94dBm -93dBm -93dBm -94dBm -94dBm
PERIPHERALS
UART/SPI/I2C 3/2/2 2/2/2 2/2/2 2/1/1 2/1/1 2/1/1 2/1/1
QSPI XiP
On-the-fly decryption
2/2/2/1
1
1
       
USB FS/HS 1 1 1        
Timers/PWM/RTC 4/4/1 3/3 3/3 4/2 4/2 3/2/1 3/2/1
I2S,PCM/PDM 8CH/2CH 8CH/2CH 8CH/2CH 8CH/2CH 8CH/2CH    
LCD ● ● ● ○            
Keyboard/QDEC/IR   ● ● ● ● ● ● ● ● ○ ● ● ○ ● ● ○ ● ● ○
ADC 8CH 10b
8CH 14b
8CH 10b 8CH 10b 4CH 10b 4CH 10b 4CH 10b 4CH 10b
LED driver 2 2 ○ ○ 3 3        
Temperature sensor    
Other Haptics / Motor Controller            
APPLICATIONS
Appliances
Asset Tracking    
Beacons      
Consumer Electronics
Direction finding            
Gaming and AR/VR        
Industrial Automation      
Medical and Healthcare
MESH networks        
PC Peripherals
Smart Home and Building
Wearables  
Wireless Ranging (WiRa)            
Smart door-locks        
IoT sensors
PACKAGES
Type#Pins (#GPIO)
Dimensions
VFBGA100 (55)
5x5 mm
(699/697)
WLCSP53 (21)
3.41x3.01 mm

AQFN60 (37)
AQFN60 (31)
6x6 mm
QFN40 (24)
5x5 mm
WLCSP34 (14)
2.40x2.66 mm

QFN40 (25)
WLCSP17 (6)
1.7x2.05 mm
(531 only)
MOD16 (9)
12.5x14.5 mm
Operating Temperature -40 to 85°C -40 to 85°C -40 to 85°C -40 to 85°C -40 to 85/105°C -40 to 85°C -40 to 85°C
Supply Voltage Range 2.4 to 4.75V 1.7 to 4.75V 1.7 to 4.75V 0.9 to 3.3V 0.9 to 3.3V 1.1 to 3.3V 1.8 to 3.3V
DEVELOPMENT KITS DA14695 PRO
DA14695 USB
DA14683 PRO
DA14683 USB
DA14683 PRO
DA14683 USB
DA14585 PRO
DA14585 BASIC
DA14585 PRO
DA14585 BASIC
DA14531/0 PRO DA14531 USB DA14531MOD PRO
Partner Modules
Read more
Product Security Vulnerabilities
Read more
Legacy Products
DA14680/1 Not Recommended for New Designs; For Improved Performance – See DA14682/3
DA14580/1/2/3 Not Recommended for New Designs; For Improved Performance – See DA14585/6 and DA14530/1

 

bleuio dongle

A faster way to new Bluetooth® applications

Swedish IoT company Smart Sensor Devices AB believes developing new Bluetooth applications should be as easy as using them. That’s why they created the BleuIO Bluetooth Low Energy USB dongle using Dialog’s Bluetooth SoCs– a smart, highly integrated device that lets developers create new Bluetooth LE 5.0 applications with minimal effort.

web_bluetooth_blog

Motion Aware Thin Bluetooth® Low Energy Beacon Solution for Smart Labels

A beacon is a tiny Bluetooth radio battery-powered transmitter. Beacons provide an inexpensive broadcasting solution capable of autonomous operation over very long periods of time. In this paper, we will show how beacons can support extended functionality by employing a range of peripherals to allow them to process and display data while maintaining autonomous operation.

Success Stories banner

Smart devices that don’t need charging?

Smartcube Co. produces modular chips that convert everyday objects like sport shoes and ID badges into smart, connected IoT devices. Remarkably, they aim to produce chips that are so energy-efficient, the resulting devices never need charging! Dialog’s SmartBond Bluetooth low energy range is helping them achieve their power consumption goals at low cost while delivering excellent reliability.

Every quarter, we bundle up the best technical info on our products, software development topics, trainings, events and deliver it to your inbox.

Sign me up
Check out previous editions

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters
Product ID Application Standard Memory size FLASH (Mb) Memory size ROM (kB) Memory size OTP (kB) Memory size RAM (kB) GPIOs (max) Power supply min (V) Power supply max (V) Tx current (mA) Rx current (mA) Output power (dBm) Sensitivity (dBm) Microcontroller Recommended for new Designs Package Max system clock (MHz) Flexible system clock Execute from FLASH HW crypto engine QSPI SPI UART I2C USB PDM Documents
                                                       
DA14580-01UNA Beacon & Proximity Health & Fitness Human Interface Devices Smart Home BLE 4.2 Core specification 0 84 32 50 14 0.9 3.6 4.8 5.1 0 -93 M0 No WL-CSP34,2.5*2.5*0.5mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14580-01AT2 Beacon & Proximity Health & Fitness Human Interface Devices Smart Home BLE 4.2 Core specification 0 84 32 50 24 0.9 3.6 4.8 5.1 0 -93 M0 No QFN40,5*5*0.9mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14580-01A32 Beacon & Proximity Health & Fitness Human Interface Devices Smart Home BLE 4.2 Core specification 0 84 32 50 32 0.9 3.6 4.8 5.1 0 -93 M0 No QFN48,6*6*0.9mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14581-00UNA Wireless Charging Host Controller Interface BLE 4.2 Core specification 0 84 32 50 14 0.9 3.6 4.8 5.1 0 -93 M0 No WL-CSP34,2.5*2.5*0.5mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14581-00000VRA Wireless Charging Host Controller Interface BLE 4.2 Core specification 0 84 32 50 14 0.9 3.6 4.8 5.1 0 -93 M0 No WL-CSP34,2.5*2.5*0.3mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14581-00AT2 Wireless Charging Host Controller Interface BLE 4.2 Core specification 0 84 32 50 24 0.9 3.6 4.8 5.1 0 -93 M0 No QFN40,5*5*0.9mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14583-01F01AT2 Beacon & Proximity Health & Fitness Human Interface Devices Smart Home BLE 4.2 Core specification 1 84 32 50 24 2.35 3.6 4.8 5.1 0 -93 M0 No QFN40,5*5*0.9mm 16 No No Yes 0 1 2 1 0 0 Documentation
DA14585-00000VV2* Beacon & Proximity Health & Fitness Human Interface Devices Smart Home Remote Controls with voice commands over BLE BLE 5.0 Core specification + supplemental features 0 128 64 96 14 0.9 3.6 4.8 5.1 0 -93 M0 Yes WL-CSP34,2.4*2.66*0.5mm 16 No No Yes 0 1 2 1 0 1 Documentation
DA14585-00000AT2* Beacon & Proximity Health & Fitness Human Interface Devices Smart Home Remote Controls with voice commands over BLE BLE 5.0 Core specification + supplemental features 0 128 64 96 25 0.9 3.6 4.9 5.3 0 -93 M0 Yes QFN40,5*5*0.9mm 16 No No Yes 0 1 2 1 0 1 Documentation
DA14586-00F02AT2* Beacon & Proximity Health & Fitness Human Interface Devices Smart Home Remote Controls with voice commands over BLE BLE 5.0 Core specification + supplemental features 2 128 64 96 24 1.8 3.6 4.9 5.3 0 -93 M0 Yes QFN40,5*5*0.9mm 16 No No Yes 0 1 2 1 0 1 Documentation
DA14680-01F08A92 Wearables Smart Home Apple HomeKit Human Interface Devices Other rechargeable device BLE 4.2 Core specification + optional features 8 128 64 128 31 1.7 4.75 5.2 6 0 -94 M0 No AQFN60,6*6*0.8mm 96 Yes Yes Yes 0 2 2 2 1 1 Documentation
DA14681-01000U2 Wearables Smart Home Apple HomeKit Human Interface Devices Other rechargeable device BLE 4.2 Core specification + optional features 0 128 64 128 21 1.7 4.75 5.2 6 0 -94 M0 No WL-CSP53,3.4*3.0*0.5mm 96 Yes Yes Yes 1 2 2 2 1 1 Documentation
DA14681-01000A92 Wearables Smart Home Apple HomeKit Human Interface Devices Other rechargeable device BLE 4.2 Core specification + optional features 0 128 64 128 37 1.7 4.75 5.2 6 0 -94 M0 No AQFN60,6*6*0.8mm 96 Yes Yes Yes 1 2 2 2 1 1 Documentation
DA14682* Wearables Smart Home Apple HomeKit Bluetooth mesh Cloud connected applications BLE 5 8 128 64 128 31 1.7 4.75 5.2 6 0 -94 M0 Yes AQFN60,6*6*0.8mm 96 Yes Yes Yes 0 2 2 2 1 1 Documentation
DA14683* Industrial Human Interface Devices Virtual reality remotes Banking BLE 5 0 128 64 128 37 1.7 4.75 5.2 6 0 -94 M0 Yes AQFN60,6*6*0.8mm 96 Yes Yes Yes 1 2 2 2 1 1 Documentation
DA14691-00000HQ2* Wearables Smart Home Apple HomeKit Bluetooth mesh Cloud connected applications BLE 5.0 Core specification + optional features Optional external 128 4 384 44 2.4 4.75 3.5 2.2 6 -97 M33 Yes VFBGA86, 6 x 6 x 0.55 mm 96 Yes Yes Yes 1 2 3 2 1 1 Documentation
DA14695-00000HQ2* Wearables Smart Home Apple HomeKit Bluetooth mesh Cloud connected applications BLE 5.0 Core specification + optional features Optional external 128 4 512 44 2.4 4.75 3.5 2.2 6 -97 M33 Yes VFBGA86, 6 x 6 x 0.55 mm 96 Yes Yes Yes 1 2 3 2 1 1 Documentation
DA14697-00000HR2* Wearables Smart Home Apple HomeKit Bluetooth mesh Cloud connected applications BLE 5.0 Core specification + optional features Optional external 128 4 512 55 2.4 4.75 3.5 2.2 6 -97 M33 Yes VFBGA100, 5 x 5 x 0.475 mm 96 Yes Yes Yes 2 2 3 2 1 1 Documentation
DA14699-00000HR2* Wearables Smart Home Apple HomeKit Bluetooth mesh Cloud connected applications BLE 5.0 Core specification + optional features Optional external 128 4 512 55 2.4 4.75 3.5 2.2 6 -97 M33 Yes VFBGA100, 5 x 5 x 0.475 mm 96 Yes Yes Yes 2 2 3 2 1 1 Documentation
DA14531 Disposables Beacons Asset tracking Connected health RCU BLE 5.1 Core specification + supplemental features 0 144 32 48 12 0.9 3.6 3.5 2.2 0 -94 M0 + Yes QFN24*2.2*3.04mm 16 Yes Yes Yes 0 1 2 1 0 0 Documentation

*Recommended for new designs

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters

Wearables

Wearable electronics is entering every facet of our daily life, giving us new ways to improve our lives: from productivity to health and lifestyle. Revealing previously unattainable information about ourselves and our surroundings, they help advise us.

SmartBond Solutions: DA14682/3, DA14585/6, DA1469x

Proximity & Asset Tracking

Proximity applications are based on knowing and alerting you of the distance between two devices, such as keys or wallets, if the label goes out of range. Proximity information can also be used in asset tagging for inventory and automated access control or monitoring in cold chain tracking.

SmartBond Solutions: DA1469x, DA14531

Connected Medical

Connected medical offers solutions in allowing patients to take care of their own health condition in monitoring, sending alerts and making drug delivery easy. Bluetooth low energy is the technology to connect health products to the cloud. Examples of connected medical products are blood pressure meters, heart rate monitors, glucose meters and patches, body temperature meters, virus testers and drug delivery with injectables or via patches through the skin.

SmartBond Solutions: DA14531, DA1469x

Smart Home & Buildings

Long dreamt of, the Smart Home is now becoming a reality. We can monitor and control our home security, lighting, appliances and heating, ventilation and air-conditioning (HVAC) from our smartphones and tablets – even remotely via the cloud.

SmartBond Solutions: DA14682/3, DA14585/6, DA14531

Computing & Gaming

Bluetooth has played a key role in connecting computing and gaming peripherals since its introduction. It provides a simple and proven connectivity option for a host of new and emerging peripherals, while securing access to the most personal data.

As electronic equipment becomes smarter and more mobile, the way we interact with it is changing. We want more control, more convenience and less clutter, which is driving huge growth in the wireless HID market. Bluetooth low energy is per default supported in recent versions of windows, which truly enables the wireless desktop.

SmartBond Solutions: DA14585/6, DA1469x

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters
SmartBond™ SDK Overview Product Supported
SDK6 DA14585/6 + DA14531/0
SDK10 DA1469x
SDK1 DA14682/3

Also available for DA14680/1 but not recommended for new designs

SDK5 DA14580/1/3

Not recommended for new designs

 

SmartBond™ Development tools overview Product Supported
Dialog Smartbond Flash Programmer DA14531/0, DA1458x and DA1469x
SmartSnippets Toolbox All
SmartSnippets Studio All
Production Line Tool  

 

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters

Social distancing

Embedded Software Applications for Social Distancing Applications

Read More

Bluetooth Low Energy Range Extender

The SmartBond™ BLE Range Extender reference design enables you to take full advantage of the output power of the Bluetooth low energy standard to extend the range of your applications.

Read more

Smart USB Dongle

The Smart USB Dongle device is a fully integrated USB to Bluetooth® LE solution, based on SmartBond™ DA14683 high-security Bluetooth LE SoC.

Read more

emWin

The emWin embedded graphics library developed by SEGGER Microcontroller is now offered by Dialog Semiconductor in library form for free commercial use with the SmartBond® DA1469x wireless microcontrollers.

Read more

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters

Our SmartBond products are supported by development kits and a profiling to help you create applications that exploit the unique benefits of the SmartBond family to the fullest. These tools help you minimize your time to market.

Hardware Development Kits

DA14531 DA14531 - USB, DA14531 - Pro
DA14585 DA14585 - BasicDA14585 - Pro
DA14683 DA14683 - USBDA14683 - Pro
DA14695 DA14695 – USB, DA14695- Pro
All Bluetooth LE Products Production Line Tool

 

Application Focused Development Kits

 

Discontinued Kits

DA14583 DA14583 IoT Sensor Development Kit
The DA14585 IoT is an upgraded sensor development kit with more supported sensors and cloud connectivity
DA14681 DA14681 HomeKit Development Kit
DA14681 DA14681 Wearable Development Kit

 

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters

Japan-based company mainly engaged in the manufacture and sale of electronic components and audio equipment. 

See More

Bithium - your partner in the design of innovative wireless embedded systems (firmware, hardware, software). Bithium keeps a clear focus on achieving project targets and customer satisfaction. 

See More

Cambridge Consultants is a premium multidisciplinary supplier of innovative product development engineering and technology consulting. We help clients deliver groundbreaking products to market fast, with cutting-edge technology that often results in new IP generation for our clients. 

See More

Cloud2GND is a global engineering services firm specializing in standards-based wireless connectivity solutions. Our clients range from innovative start-ups to large semiconductor companies and standards organizations. We offer deep domain knowledge in embedded systems, especially around Bluetooth technology, where we provide consulting, design, development, test, deployment and maintenance services for our clients and their customers. Our engineering services division offers a flexible engagement model acting as a specialized team of standards experts or a complete engineering team able to manage your project needs to completion.

See more

Lauterbach is the leading manufacturer of complete, modular and upgradeable microprocessor development tools worldwide with experience in the field of embedded designs since 1979. The engineering team develops and produces highly proficient and specialized Development Tools, which are utilized all over the world under the brand TRACE32®.

LitePoint is the leading provider of test solutions for the world's leading manufacturers of wireless

See more

Murata is a global leader in the design, manufacture and supply of advanced electronic materials, leading edge electronic components, and multi-functional, high-density modules.

See more

Panasonic Industrial Devices Sales Company of America. Many products sold by Fortune 500 companies are in fact Powered by Panasonic technology, and we are proud to provide manufacturers with the performance, quality, and reliability that are synonymous with the Panasonic brand. The Power of Panasonic Industrial Devices brings strategic innovations to our customers’ product development process.

See more

TDK is one of the largest electronic components manufacturers in the world.

See more

Tieto is the leading product development services company enabling semiconductor, connected device and communication infrastructure manufacturers, build next generation connected devices & things, cars and networks.

See more

Wireless technology experts. Xtel's core competency is technology development, which makes up a substantial part of its business. It utilizes state-of-the-art technologies to create the next product or technical platform for its partners. Among its clients, it counts some of the world’s leading tech innovators. It is typically tasked with the development of wireless technology, protocols, and ultralow power designs and products. Xtel has in-depth knowledge of the product development and maturation of wireless technologies. It typically uses proven and tested standard components or platforms, helping its partners to reduce time to market. Where a technology boost is needed, it develops complete products or assist a development team in the company. Its technological solutions and innovative skills are recognized by its partners.

See more

Quuppa is a leading technology provider for real-time locating systems (RTLS) and indoor positioning systems (IPS). The company was established in 2012 by a team of experienced engineers and scientists as a spin-off from Nokia Research Center and has since successfully commercialised its offering, creating a complete product platform: the Quuppa Intelligent Locating System™, a one-size-fits-all technology platform for location-based services and applications. Our platform offers companies a complete software suite of tools for planning, simulating and commissioning projects, that can be used as a solid and scalable foundation for building various location-based solutions. The open API makes it fast and easy to take the platform into use. To date, the Quuppa Ecosystem has more than 200 partners around the world who use Quuppa’s open, versatile and reliable positioning platform to deliver accurate, real-time and cost-effective location solutions to companies in a range of industries, including manufacturing and logistics, retail, healthcare, sports, law enforcement and security, government, asset tracking.

See more

 

Stay connected

Get in touch with us directly through our worldwide sales offices, or contact one of our global distributors and representatives.

Inquiries Distributors and Representatives Register for newsletters
Back to results

DA14585 and DA14586

2 weeks ago

Basic I2C connection with a sensor

Posted by mu234 230 points 9 replies
0 upvotes

Hello all, 

I am up to connect the basic proximity sensor to the DA145985 DEVKT-Basic. I am aware that I2C connection, namely SDA and CLK can be connected at any GPIO on board, however, I am not sure how to modify the basic code that can be seen in the example of the SDK6, namely I2Ceeprom (more here: https://www.dialog-semiconductor.com/sites/default/files/um-b-080_da145… on p.36). For example in previous posts it was mentioned that the following files should be customized, but I am not really sure at what to focus on ? 

/**
 ****************************************************************************************
 *
 * @file periph_setup.c
 *
 * @brief Peripherals initialization functions
 *
 * Copyright (C) 2012-2019 Dialog Semiconductor.
 * This computer program includes Confidential, Proprietary Information
 * of Dialog Semiconductor. All Rights Reserved.
 *
 ****************************************************************************************
 */

/*
 * INCLUDE FILES
 ****************************************************************************************
 */

#include "user_periph_setup.h"
#include "gpio.h"
#include "uart.h"
#include "i2c.h"
#include "i2c_eeprom.h"
#include "syscntl.h"

/*
 * GLOBAL VARIABLE DEFINITIONS
 ****************************************************************************************
 */

static void set_pad_functions(void)
{
/*
    i.e. to set P0_1 as Generic purpose Output:
    GPIO_ConfigurePin(GPIO_PORT_0, GPIO_PIN_1, OUTPUT, PID_GPIO, false);
*/

#if defined (__DA14586__)
    // Disallow spontaneous DA14586 SPI Flash wake-up
    GPIO_ConfigurePin(GPIO_PORT_2, GPIO_PIN_3, OUTPUT, PID_GPIO, true);
#endif

    // Configure UART2 pin functionality
    GPIO_ConfigurePin(UART2_TX_PORT, UART2_TX_PIN, OUTPUT, PID_UART2_TX, false);

    // Configure I2C pin functionality
    GPIO_ConfigurePin(I2C_SCL_PORT, I2C_SCL_PIN, INPUT, PID_I2C_SCL, false);
    GPIO_ConfigurePin(I2C_SDA_PORT, I2C_SDA_PIN, INPUT, PID_I2C_SDA, false);
}

// Configuration struct for UART2
static const uart_cfg_t uart_cfg = {
    .baud_rate = UART2_BAUDRATE,
    .data_bits = UART2_DATABITS,
    .parity = UART2_PARITY,
    .stop_bits = UART2_STOPBITS,
    .auto_flow_control = UART2_AFCE,
    .use_fifo = UART2_FIFO,
    .tx_fifo_tr_lvl = UART2_TX_FIFO_LEVEL,
    .rx_fifo_tr_lvl = UART2_RX_FIFO_LEVEL,
    .intr_priority = 2,
};

// Configuration struct for I2C
static const i2c_cfg_t i2c_cfg = {
    .clock_cfg.ss_hcnt = I2C_SS_SCL_HCNT_REG_RESET,
    .clock_cfg.ss_lcnt = I2C_SS_SCL_LCNT_REG_RESET,
    .clock_cfg.fs_hcnt = I2C_FS_SCL_HCNT_REG_RESET,
    .clock_cfg.fs_lcnt = I2C_FS_SCL_LCNT_REG_RESET,
    .restart_en = I2C_RESTART_ENABLE,
    .speed = I2C_SPEED_MODE,
    .mode = I2C_MODE_MASTER,
    .addr_mode = I2C_ADDRESS_MODE,
    .address = I2C_SLAVE_ADDRESS,
    .tx_fifo_level = 1,
    .rx_fifo_level = 1,
};

// Configuration struct for I2C EEPROM
static const i2c_eeprom_cfg_t i2c_eeprom_cfg = {
    .size = I2C_EEPROM_DEV_SIZE,
    .page_size = I2C_EEPROM_PAGE_SIZE,
    .address_size = I2C_ADDRESS_SIZE,
};

void periph_init(void)
{
#if defined (__DA14531__)
    // Disable HW Reset functionality of P0_0
    GPIO_Disable_HW_Reset();
    // In Boost mode enable the DCDC converter to supply VBAT_HIGH for the used GPIOs
    // Assumption: The connected external peripheral is powered by 3V
    syscntl_dcdc_turn_on_in_boost(SYSCNTL_DCDC_LEVEL_3V0);
#else
    // Power up peripherals' power domain
    SetBits16(PMU_CTRL_REG, PERIPH_SLEEP, 0);
    while (!(GetWord16(SYS_STAT_REG) & PER_IS_UP));
    SetBits16(CLK_16M_REG, XTAL16_BIAS_SH_ENABLE, 1);
#endif

    // Initialize UART2
    uart_initialize(UART, &uart_cfg);

    // Configure I2C EEPROM environment
    i2c_eeprom_configure(&i2c_cfg, &i2c_eeprom_cfg);

    // Initialize I2C
    i2c_eeprom_initialize();

    // Set pad functionality
    set_pad_functions();

    // Enable the pads
    GPIO_set_pad_latch_en(true);
}

 

/**
 ****************************************************************************************
 *
 * @file user_periph_setup.h
 *
 * @brief Peripherals setup header file.
 *
 * Copyright (C) 2015-2020 Dialog Semiconductor.
 * This computer program includes Confidential, Proprietary Information
 * of Dialog Semiconductor. All Rights Reserved.
 *
 ****************************************************************************************
 */

#ifndef _USER_PERIPH_SETUP_H_
#define _USER_PERIPH_SETUP_H_

/*
 * INCLUDE FILES
 ****************************************************************************************
 */

#include "uart.h"
#include "gpio.h"
#include "i2c_eeprom.h"

/*
 * DEFINES
 ****************************************************************************************
 */

/****************************************************************************************/
/* UART2 configuration to print messages                                                */
/****************************************************************************************/
#define UART                        UART2
// Define UART2 Tx Pad
#if defined (__DA14531__)
    #define UART2_TX_PORT           GPIO_PORT_0
    #define UART2_TX_PIN            GPIO_PIN_6
#else
    #define UART2_TX_PORT           GPIO_PORT_0
    #define UART2_TX_PIN            GPIO_PIN_4
#endif

// Define UART2 Settings
#define UART2_BAUDRATE              UART_BAUDRATE_115200
#define UART2_DATABITS              UART_DATABITS_8
#define UART2_PARITY                UART_PARITY_NONE
#define UART2_STOPBITS              UART_STOPBITS_1
#define UART2_AFCE                  UART_AFCE_DIS
#define UART2_FIFO                  UART_FIFO_EN
#define UART2_TX_FIFO_LEVEL         UART_TX_FIFO_LEVEL_0
#define UART2_RX_FIFO_LEVEL         UART_RX_FIFO_LEVEL_0

/****************************************************************************************/
/* I2C configuration                                                                    */
/****************************************************************************************/
// Define I2C Pins
#if defined (__DA14531__)
    #define I2C_SCL_PORT            GPIO_PORT_0
    #define I2C_SCL_PIN             GPIO_PIN_3
    #define I2C_SDA_PORT            GPIO_PORT_0
    #define I2C_SDA_PIN             GPIO_PIN_1
#else
    #define I2C_SCL_PORT            GPIO_PORT_2
    #define I2C_SCL_PIN             GPIO_PIN_3
    #define I2C_SDA_PORT            GPIO_PORT_2
    #define I2C_SDA_PIN             GPIO_PIN_1
#endif

// Select EEPROM characteristics
#define I2C_EEPROM_DEV_SIZE         0x20000               // EEPROM size in bytes
#define I2C_EEPROM_PAGE_SIZE        256                   // EEPROM page size in bytes
#define I2C_SLAVE_ADDRESS           0x50                  // Set slave device address
#define I2C_SPEED_MODE              I2C_SPEED_FAST        // Speed mode: I2C_SPEED_STANDARD (100 kbits/s), I2C_SPEED_FAST (400 kbits/s)
#define I2C_ADDRESS_MODE            I2C_ADDRESSING_7B     // Addressing mode: {I2C_ADDRESSING_7B, I2C_ADDRESSING_10B}
#define I2C_ADDRESS_SIZE            I2C_2BYTES_ADDR       // Address width: {I2C_1BYTE_ADDR, I2C_2BYTES_ADDR, I2C_3BYTES_ADDR}



/*
 * FUNCTION DECLARATIONS
 ****************************************************************************************
 */

/**
 ****************************************************************************************
 * @brief   Initializes application's peripherals and pins
 ****************************************************************************************
 */
void periph_init(void);

/**
 ****************************************************************************************
 * @brief Set gpio port function mode
 ****************************************************************************************
 */
void set_pad_functions(void);

#endif // _USER_PERIPH_SETUP_H_

Looking forward to any ideas how to tackle this!

 

BEST.

2 weeks ago

AA_Dialog

Hi mu234,

 

Thank you for your question online and your interest in DA14585 solutions.

First things first, since your requirement is reading ani2c sensor it might be more straightforward to use the following example from our git repository

https://github.com/dialog-semiconductor/BLE_SDK6_examples/tree/main/connectivity/ble_temperature_ntf

as a reference on how to setup i2c to communicate with a sensor. The git example showcases using i2c to read the MCP9808 temperature sensor. Now in order to set up i2c properly you can follow the steps below:

  1. Define I2C pins according to your needs. For example, in user_periph_setup.h you can define pins 0_7 and 0_4 as the SCL and SCA pins respectively
#define MY_SENSOR_SCL_PORT            GPIO_PORT_0

#define MY_SENSOR_SCL_PIN             GPIO_PIN_7

#define MY_SENSOR_SDA_PORT            GPIO_PORT_0

#define MY_SENSOR_SDA_PIN             GPIO_PIN_4
  1. Define the I2C configuration according to your sensor use case. For example, in the ble_temperature_ntf, in user_periph_setup.h we have the following configuration
#define I2C_SLAVE_ADDRESS           0x18                  // Set slave device address

#define I2C_SPEED_MODE              I2C_SPEED_FAST        // Speed mode: I2C_SPEED_FAST (400 kbits/s)

#define I2C_ADDRESS_MODE            I2C_ADDRESSING_7B     // Addressing mode: I2C_ADDRESSING_7B

#define I2C_ADDRESS_SIZE            I2C_1BYTES_ADDR       // Address width:   I2C_1BYTE_ADDR
  1. In file user_periph_setup.c make sure that you reserve the pins in function GPIO_reservations. For example
RESERVE_GPIO(SDA, MY_SENSOR _SDA_PORT, MY_SENSOR _SDA_PIN, PID_I2C_SDA);

RESERVE_GPIO(SCL, MY_SENSOR _SCL_PORT, MY_SENSOR _SCL_PIN, PID_I2C_SCL);
  1. In file user_periph_setup.c, in file set_pad_functions configure the reserved pins. For example
GPIO_ConfigurePin(MY_SENSOR _SCL_PORT, MY_SENSOR _SCL_PIN, INPUT_PULLUP, PID_I2C_SCL, false);

GPIO_ConfigurePin(MY_SENSOR _SDA_PORT, MY_SENSOR _SDA_PIN, INPUT_PULLUP, PID_I2C_SDA, false);
  1. In user_periph_setup.c, in function periph_init initialize I2C with the configuration struct i2c_cfg that is defined in the same file
i2c_init(&i2c_cfg);

           

Regards, AA_Dialog

2 weeks ago

Hello.

Thank you for the git hub link. Indeed, 1st things 1st.

According to the given link (GitHub example) it is confusing to follow the picture, especially when someone is trying to understand the text above the picture and their relation...

The example is suggesting the following connection:

- Connect Vdd to V3 on J4 (red line in the image below).
- Connect Gnd to ground on J4 (blue line in the image below).

Those two are clear enough.

- Connect SCL to P07 on J4 (orange line in the image below).
- Connect SDA to P12 on J4 (yellow line in the image below).        
 

The following two connections are confusing, therefore,  I am attaching a pic from the el. schematics and the pic. from the example under consideration.

.DA_Basic_J4DA_github example of i2c connection

-> the orange connection, namely the P_07 on the J4 is clear, it seems this is a number 17 in the el. schematics J4.

-> the yellow connection is not clear, original picture, the one on the right hand side above is not clear, for example as it can be seen, the yellow line is connected to P_04, namely number 11 on the original el. schematics. 

So, would someone, please let me know where to actually connect the yellow line :)

I have successfully linked the GIT HUB example and SDK ... the suggested demo compiles well, nor errors... meanwhile I have as well obtained the "code C/C++" to use the sensor, so, I am wondering how to use this code within the SDK6? Should I simply import, copy the folder into the uVision example project in this case the BLE_temperature ...  or to the SDK, third_party subfolder  ... or should I begin with an empty project template, if so where to get the template ? In addition, do I have to link this "library" to the SDK as well ?

Best.

 

 

 

 

2 weeks ago

AA_Dialog

Hi mu234,

You are right, SDA to P12 is wrong. The correct connection for the yellow line is to P0_4 on the basic SDK board, number 11 on the schematic. Please remove the 4 UART jumpers before making the SDA, SCL connections.

In the ble_temperature_ntf example you can see the location of the library files for the MCP9808 sensor. You can see that the files of the sensor reside in the src folder and have been added to the project in Keil folder user app. Similarly, you will need to add the files containing the code required to use your sensor in your Keil project and include them in your application files. This “library” doesn’t have to be linked to the SDK.

Now on whether you should start building on the BLE temperature_ntf project or on an empty project template that depends on what you find more convenient for your case. If your project is going to be very similar with the temperature notification project with minor differences, then it might be good to start from that and adjust the code for your sensor. If on the other hand your project is very different to the temperature_ntf one it might be better to start off from an empty project template and build on it.

Best regards, AA_Dialog

1 week ago

Hello and thank you for the input so far!

 

Have removed the J4 jumpers, actually all of them, btw now that I run the "blinky example" does not find the Cortex-M SW Device ... therefore, should the Jumpers on the P_05 and P_06 also be removed?

I am a bit confused , looking at the https://s3.eu-west-2.amazonaws.com/lpccs-docs.dialog-semiconductor.com/… should the pair of  P_04, P_05 and P_06, P_07 be used in tandem, for example, either pair is used to connect and communicate with the external device (in my case the sensor) ?   

So far, my connection is: P_04 and P_07, should not this be P_04 and P_05 ? Indeed, the input/output way is correct, however, are these two lines compatible transmission wise, especially within the code ?             

Anyway, I have added the library to the src folder via adding the existing files to the user_app folder within the uVIsion  ble_temp... project, however, when F7 is pressed I get 1 errors, actually 2 and 12  warnings... have a look at the pic below:

any ideas what is wrong, actually how to establish the connection with the sensor?

 

Attachment Size
DA_uvision_vcnl 969.18 KB

1 week ago

AA_Dialog

Hi mu234,

The warnings that you are getting are because the functions in VCNL4035X01_Application_Library.c have not been declared with the void argument type e.g. you need to declare VCNL4035X01_GET_PS_SD_Bit as

bool VCNL4035X01_GET_PS_SD_Bit(void);

The errors are not visible so I can’t speak about them. Please keep in mind that the library that you are using is not an SDK library or delivered by Dialog – it is third-party code and so you should debug it on your side before integrating it in your project. With regards to the third-party library you should decide on how to deal with the peripherals and use the SDK peripheral libraries where needed. Please let us know if you have any questions about the SDK6 functionalities.

Best regards, AA_Dialog

1 week ago

Thank you again, indeed, lets 1st focus on hardware connection, I am still not sure about the RXD/TXT RTS/CTS confusion... 

Can you help me here first before I move into the sensor library and i2c reading, are we on the same page here with regard to the cross connection ?

 

Best. 

1 week ago

AA_Dialog

Hi mu234,

The picture

https://s3.eu-west-2.amazonaws.com/lpccs-docs.dialog-semiconductor.com/DA14585_Getting_Started_basic/_images/direction_uart.svg

shows the connections for using pins P_04, P0_5, P0_6, P0_7 as UART with full flow control. When the jumpers are placed in these positions the DA14585 pins connect to the on-board chip that handles UART to USB conversion.

Please keep in mind that DA14585 pins are GPIOS (General Purpose Input Output). That means that they can be configured by the software to have different functionalities. In the temperature_ntf example the UART protocol is not used, instead the I2C protocol is used for connecting with the sensor. Therefore, pins P0_4 and P0_7 are configured by the software to be I2C SDA and I2C SCL respectively.

The two jumpers that connect J4_25 – J4_26 and J4_27 - J4_28 are required for connecting the DA14585 with the SWD so that you are able to load and debug the code via Keil.  

Kind regards, AA_Dialog

1 week ago

Thank you, indeed, I should be looking at the I2C, meanwhile got more information with regard to the sensor... and I did remember that each GPIO on the uC can be configured respectively, either way thank you again. Regarding the jumpers, I guess I need to put them back then :) 

Will continue from the temperature_ntf example... talk soon!

 

Best.

accepted answer!

1 week ago

AA_Dialog

Hi mu234,

Glad that I could be of help. If you have another question please raise a new forum ticket.

Kind regards, AA_Dialog