Forums - About CSR1010 Module Connect with I2C Sensor

10 posts / 0 new
Last post
About CSR1010 Module Connect with I2C Sensor
takuyatse
Join Date: 28 Jun 16
Posts: 5
Posted: Tue, 2016-06-28 18:50

Hi All,

I am trying to CSRmesh Module connect my PCB to I2C Sensor

Which is HIH6120-021-001

http://sensing.honeywell.com/honeywell-sensing-humidicon-hih6100-series-...

I feel confused how to write the code for the PIO port to simulate I2C interface.

Is there any source code from CSR that I can refer to

or will you guys have some examples that can let me make a reference?

Many Thanks

  • Up0
  • Down0
Shumin1992
Join Date: 6 Jun 16
Posts: 5
Posted: Wed, 2016-06-29 00:14

There are APIs for that. 

The doc of APIs of uEnergy can be found at 

C:/CSR_uEnergy_SDK-xxxxxx/doc/reference/html/

  • Up0
  • Down0
takuyatse
Join Date: 28 Jun 16
Posts: 5
Posted: Sun, 2016-07-03 06:58

Thanks for your help Shumin1992

Is it i2c_8h_source?
I found the library files at
D:\CSR_uEnergy_SDK-2.6.0.10\tools\include\CSR101x_A05

How to install the library to my SDK?
Also, what should I set up at the project properties?

  • Up0
  • Down0
Shumin1992
Join Date: 6 Jun 16
Posts: 5
Posted: Sun, 2016-07-03 14:06

I thik the header file you should read is i2c.h, available at the same folder. 

  • Up0
  • Down0
takuyatse
Join Date: 28 Jun 16
Posts: 5
Posted: Sun, 2016-07-03 23:39

Sorry, can you tell me how to apply this into project?

I am not familiarizing with plugging library into project.

Thank you!!

  • Up0
  • Down0
Shumin1992
Join Date: 6 Jun 16
Posts: 5
Posted: Mon, 2016-07-04 04:52

This is part of the uEnergy firmware, there is no need to plugin anything. Just include the i2c.h file, and then you can use the functions in it.  

  • Up0
  • Down0
takuyatse
Join Date: 28 Jun 16
Posts: 5
Posted: Mon, 2016-07-04 18:37

DO I NEED TO WRITE ANOTHER C&H FILE TO CALL THE I2C.H?

  • Up0
  • Down0
takuyatse
Join Date: 28 Jun 16
Posts: 5
Posted: Tue, 2016-07-05 02:23

or will you have skype

Running 'D:/CSR_uEnergy_SDK-2.6.0.10/tools/bin/make SDK=D:/CSR_uEnergy_SDK-2.6.0.10/tools -f TEST.release.mak build'...

D:/CSR_uEnergy_SDK-2.6.0.10/tools/bin/xap-local-xap-gcc -Wa,-ahln=depend_Release_CSR101x_A05/lis2ds12_driver.si -gdwarf-2 -g -msmall-mode -mconst-switch-tables -mas-mode -mno-initc -Os -Wall -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wdisabled-optimization -Wcast-qual -Wundef -Wno-long-long -Wno-unused-parameter -Werror -fno-inline-functions -fno-inline-small-functions -fno-delete-null-pointer-checks -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-builtin --param large-stack-frame=10 --param large-stack-frame-growth=50 -DHAVE_ROM -DCSR101x -DCSR101x_A05 -DNVM_TYPE_EEPROM -MD -I. -ID:\Download\CSRmesh-1.3-Examples-Applications_icp\include -Idepend_Release_CSR101x_A05 -ID:/CSR_uEnergy_SDK-2.6.0.10/tools/include/CSR101x_A05 -ID:/CSR_uEnergy_SDK-2.6.0.10/tools/lib/CSR101x_A05 -ID:/CSR_uEnergy_SDK-2.6.0.10/tools/lib/otau -DCSR101x -DCSR101x_A05 -DNVM_TYPE_EEPROM -c -o depend_Release_CSR101x_A05/lis2ds12_driver.o ../I2C/lis2ds12_driver.c

cc1.exe: warnings being treated as errors

../I2C/lis2ds12_driver.c: In function 'LIS2DS12_ReadReg':

../I2C/lis2ds12_driver.c:60: error: implicit declaration of function 'LIS2DS12HWSetupI2c'

../I2C/lis2ds12_driver.c:60: error: nested extern declaration of 'LIS2DS12HWSetupI2c'

../I2C/lis2ds12_driver.c:66: error: implicit declaration of function 'LIS2DS12HWStopI2c'

../I2C/lis2ds12_driver.c:66: error: nested extern declaration of 'LIS2DS12HWStopI2c'

make: *** [depend_Release_CSR101x_A05/lis2ds12_driver.o] Error 1

Finished.

I am facing to this problem.
do you know how to solve it?

  • Up0
  • Down0
Dr. Nissim Zur
Profile picture
Join Date: 6 Jun 16
Location: Skype: nissim.test CSR1010 External design house
Posts: 235
Posted: Mon, 2016-07-18 22:14

I believe you try to use external code for accelerometer that needs to be modified to work with CSR1010 I2C

Call my Skype nissim.test for guides 

 

  • Up0
  • Down0
vctrkarthik
Join Date: 24 Oct 16
Posts: 4
Posted: Fri, 2017-09-15 08:05

Hi, 

I am trying the similar problem with MLX90615 IR temperature sensor. I like to look into an application example for I2C communication sensor.

If the code is available using CSR's i2c.h library, it will be helpful.

 

Or else

I could test this sensor with Arduino with i2cmaster.h library. But I don't know how to bring this library into CSR uenergy IDE.

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.