Skip to main content

Interfacing a sensor to DA14531 MOD with I2C

9 months ago

Interfacing a sensor to DA14531 MOD with I2C

Posted byravikiran42分 5 replies
0 upvotes

你好。yabo国际娱乐对话框半导体团队,

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

1.我想通过I2C连接接口DA14531Mod的传感器,并将该数据发送到另一个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!]

我明白并成功实现了您的一些基本示例,如Blinky,GPIO输出和输入,BLE_BAREBONE。我正在使用SDK 6.0.14.1114和DA14531 Prodev套件。我是新的设备,现在只有我入门并尝试了解,我希望你能为我提供有关我问题的一些有用信息。

Thanks in advance.

D.RaviKiran

9 months ago

PM_Dialog

Hi ravikiran4,

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

I would recommend checking the Codeless solution.

//www.xmece.com/products/smartbond-codeless-commands

  • Dodeless AT命令平台允许通过BLE控制本地UART连接的设备以​​及远程设备。
  • 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 theDA14531-DA14585-586 Reading I2C Accelerometer BLESW示例

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-semiciondiond.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!

//www.xmece.com/products/connectivity/bluetooth-low-energy/products/da14531

Thanks, PM_Dialog

9 months ago

ravikiran4 2分

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-semicondiond.com/um-140-da145x-codeless/demo.html.)在第3.3.3章中。我实际上是使用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]

因此,我无法提供下面的命令来从传感器读取或写入数据。
AT+I2CCFG=7,100,8
AT + I2CREAD = 0xD0,2 - >即使我给出这个命令我得到错误/(有时它没有给出任何响应[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 theSmartConsolemobile 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.在命令中的控制:对话框尾声_HOST(具有无附件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.

Attachment Size
CodeLess I2C error.zip 37.09 KB

9 months ago

PM_Dialog

Hi ravikiran4,

>>>我必须再次将.hex固件重新下载到板中(使用SmartSnippets Toolbox)以便响应正常情况。

为什么需要将FW重新下载到目标上?你能看到空气中的那个装置还是崩溃?

您是否随附调试器运行它?您需要启用“开发调试”首先 - #define CFG_Development_debug。

你用设定一个或一组两个项目吗?

Thanks, PM_Dialog

9 months ago

ravikiran4 2分

>>>>>>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 enterAT + i2cscan.) or reset switch (SW3/RESET) and Disconnect and Connect onDialog Codeless Console。我们还尝试断开和连接JTAG,即使它也没有响应任何AT命令。[重新下载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.

>>>>>>您是否与调试器一起运行?您需要启用“开发调试”首先 - #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.

请尽快找到一些解决方案。

谢谢你的对话支持

D.ravikiran.

9 months ago

PM_Dialog

Hi ravikiran4,

为了在调试模式下运行无附庸前的项目并热附加调试器,您应该在da1458x_config_basic.h中定义cfg_development_debug宏。之后,您需要重新构建Keil项目并以调试模式运行它。

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

代码是否正确运行,或者您得到和断言?

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

Thanks, PM_Dialog