Interfacing a sensor to DA14531 MOD with I2C

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at https://www.dialog-semiconductor.com/support . We’ll be fixing bugs / optimising the searching and tagging over the coming days.
6 posts / 0 new
Last post
ravikiran4
Offline
Last seen: 1 year 9 months ago
Joined: 2020-08-05 09:45
Interfacing a sensor to DA14531 MOD with I2C

Hello. Dialog Semiconductor team,

I was recently known about your BLE low energy devices, I was very much attracted to your products.

1. I want to interface a sensor with DA14531MOD via I2C connection and send that data to another DA14531MOD. I am not able to find a proper reference from your site regarding sensor I2C integration with  DA14531. I am only able to find I2C_EEPROM in SDK peripheral examples.

2. Where can I start a new project to develop as my requirement. I haven't seen any possible way for that. Please help me.

3. While running the I2C_EEPROM example without any modification, I am getting some issues. After build, there are 0 Error(s), 0 Warning(s). But, When debugging I am getting errors.

                              [Can not access target, Shutting down debug session]

                              [No Cortex M SW device found]

                              [Error: Target DLL has been canceled. Debugger aborted!]

I understood and successfully implemented some of your basic examples like blinky, GPIO Output, and Input, BLE_Barebone. I am using SDK 6.0.14.1114 and DA14531 ProDev Kit for this. I am new to your devices and now only I am getting started and try to understand, I hope you can provide me some useful information about my issues.

Thanks in advance.

D.RaviKiran

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi ravikiran4,

Hi ravikiran4,

Thanks for your question online and for your interest in our TINE module solution.

I would recommend checking the Codeless solution.

https://www.dialog-semiconductor.com/products/smartbond-codeless-commands

  • The CodeLess AT commands platform allows control over a local UART connected device as well as a remote device via BLE.
  • The comprehensive set of AT-Commands enables control of the BLE connectivity, sensor read-out and battery check of the device.
  • Control over issuing the AT commands can be on a PC or integrated in a 3rd party microcontroller.
  • Quick & Simple – out of the box. Download as binary directly into your module or device.
  • Take source code example and add your own commands. Compile. Download & Go.

Additionally you can use the DA14531-DA14585-586 Reading I2C Accelerometer BLE SW example

Since you are new user with our SDK, I would suggest first checking the following tutorials :

UM-B-117: DA14531 Getting Started with the Pro Development Kit (HTML)

BLE Advertising Tutorial (HTML)

Using SDK6 Peripheral Drivers (HTML)

DA14531 Sleep Mode Tutorial (HTML)

http://lpccs-docs.dialog-semiconductor.com/Tutorial_SDK6/index.html

Generally in the DA14531 product page, you will find great variety of SW examples that you will help you to get started!

https://www.dialog-semiconductor.com/products/connectivity/bluetooth-low-energy/products/da14531

Thanks, PM_Dialog

ravikiran4
Offline
Last seen: 1 year 9 months ago
Joined: 2020-08-05 09:45
ThankYou for your response.

ThankYou for your response.

I also used that codeless process. I want to get the data of an I2C sensor by sending AT commands.

I followed the process in your website (http://lpccs-docs.dialog-semiconductor.com/UM-140-DA145x-CodeLess/demo.html) in Chapter 3.3.3. I am actually using DA14531_MOD.

AT+IOCFG=8,7            ->OK
AT+IOCFG=11,8          ->OK
AT+I2CSCAN               ->(not giving any response[1]) [Actually as per your documentation, It should give Address of slave (0x00) as hex]

So I am not able to give the below commands to read or write data from the sensor.
AT+I2CCFG=7,100,8
AT+I2CREAD=0xD0,2   -> even I give this command I am getting error/(Sometimes it is not giving any response[1])

 

The good thing is I am able to read ADC data. I mean it is responding for AT+ADC=7  ->OK

[1].In no response situation, I have to re-download the .hex firmware into the board again (using SmartSnippets Toolbox) in order to get the response to normal condition. Which is a very bad situation. This may be one of the serious issues I am facing. Can you please let me know if I ware fallowing any miss direction somewhere in the process?

**While trying to control with the SmartConsole mobile application the module is automatically disconnecting after some time. (even we trying to give commands continuously)

Things I am working with:

1.SDK:  DA145xx_CODELESS_6.380.10.4

2.Console for AT commands: Dialog codeless_host (Provided with CODELESS SDK)

3.Dialog Hardware: DA14531_MOD with ProDev Kit Motherboard

I am hoping a quick response to this problem, Thank You in advance.

D.RAVIKIRAN

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi ravikiran4,

Hi ravikiran4,

>>> I have to re-download the .hex firmware into the board again (using SmartSnippets Toolbox) in order to get the response to normal condition.

Why you need to re-download the fw onto target? Can you see the device adverting over the air or it crashes?

Did you run it with the debugger attached? You will need to enable the “Development debug” first   -  #define CFG_DEVELOPMENT_DEBUG.

Are you using SET ONE or SET TWO project?

Thanks, PM_Dialog

ravikiran4
Offline
Last seen: 1 year 9 months ago
Joined: 2020-08-05 09:45
>>>>>>Are you using SET ONE

>>>>>>Are you using SET ONE or SET TWO project?

I am using SET TWO (codeless_531_set_two_standalone.hex)

>>>>>>Why you need to re-download the fw onto target?

Because that module is not responding to any AT commands (when we enter AT+I2CSCAN) or reset switch (SW3/RESET) and Disconnect and Connect on Dialog Codeless Console. and we also tried with Disconnecting and Connecting of JTAG even then also it is not responding to any AT commands. [It is only working normally again after re-downloading the fw].

>>>>>>Can you see the device adverting over the air or it crashes?

No, I am not able to see the device adverting over the air after AT+I2CSCAN, It is crashing.

>>>>>>Did you run it with the debugger attached? You will need to enable the “Development debug” first   -  #define CFG_DEVELOPMENT_DEBUG.

Yes, I am running with the debugger attached. May I know how can I enable “Development debug” -( #define CFG_DEVELOPMENT_DEBUG)

Can you explain this in a detailed manner, That maybe help full for me.

 

1. I am also not able to send AT commands using other consoles like QCOM and TeraTerm it is giving responses like.  ERROR: Not an AT command.

Please find some solutions to these issues as soon as possible.

 

ThankYou Dialog Support

D.RAVIKIRAN

PM_Dialog
Offline
Last seen: 7 months 1 week ago
Staff
Joined: 2018-02-08 11:03
Hi ravikiran4,

Hi ravikiran4,

In order to run the CodeLess project in debug mode and hot attach the debugger, you should define the CFG_DEVELOPMENT_DEBUG macro in da1458x_config_basic.h. After that you will need to re-build the Keil project and run it in debug mode.

Press the “Start /  Stop debug session” button (Ctrl + F5) and then the “Run” button (F5).

Is the code running correctly or are you getting and assertion ?

I’ll try to replicate it in my side as well.

Thanks, PM_Dialog