/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Username:     
Password:     
             

Forum
  • Index
  •  » STM32 Family
  •  » I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

# 1   2011-09-04 22:03:01 I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Lync85
New member
Registered: 2011-09-04
Posts: 4

I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Hi my name is Alex and im from germany,
I'm very happy that i could found a good STM32 Forum (its hard to find one).

My Problem is, that I designed a Board with a STM32F103ZE T6 and sensors:

ITG3200 (Invensense) Gyro at I2C_1
Accelerometer LIS331DLH (STM) on the Board at  SPI_1

I'm new with STM32 cortex m3 MCU's (I'm a Adruino guy) i read many example's and bought a KEIL uLink2 + Eval Board to gain more know how but im still confused with the Sensors.

I need to know or maybe has some example code snipped that shows , how i can communicate with the sensors. The ST examples didnt helped me much.

I found the the code for Adruino but it's very hard for me to translate it into STM32 cortex m3 c-code (I'm using Keil + the template from the Std. periph. lib v3.5.0).

http://www.arduino.cc/cgi-bin/yabb2/YaB … 8367409/30


Here is my project and the schematic:
http://sourceforge.net/projects/imu200/files/Schematic/

It would be great if anyone could help me.

with regards
Alex

-
the next steps are using vcom for data transfer and using the Bluetooth Modul on USART2.

if you guys interested in the project, i would manage a IMU for you guys.


STM32F103ZE T6 | KEIL MDK-ARM

Offline

 

# 2   2011-09-06 20:11:02 I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

STPrime
Member
Registered: 2011-04-06
Posts: 35

Re: I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Hello Lync85,

I am also about to use this sensor and just briefly looked at the ST Example for it.  I will look at the Arduino code and see how well I can translate it.

Thanks,

STPrime


It is all about coming up with new ways...to do the same old thing.

Offline

 

# 3   2011-09-26 16:26:21 I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

STPrime
Member
Registered: 2011-04-06
Posts: 35

Re: I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Hello, I haven't had a chance to work on the LIS331 yet, but I did find some software on the ST site you can find it at the ST.com site.  Just enter lis331 into the search and go to the Design Support tab.

There are two software libraries out there, one is found in the Unico directry Andre Labombarda and the other by Fabio Tota is in the Design Support at ST.com. 

If you download Unico and Unico_Lite,  the firmware is found in the STMicrocontroller folder.  It has the lis331dlh_sw_driver.zip file and all the code for all the MEMS and is very, but complex.  The one by Fabio Tota is simpler, you just have to cut and past the I2C and GPIO setup to into your code.

Last edited by STPrime (2011-09-26 16:30:36)


It is all about coming up with new ways...to do the same old thing.

Offline

 

# 4   2011-09-28 15:44:26 I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Lync85
New member
Registered: 2011-09-04
Posts: 4

Re: I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Hi, thank you I will look on that.

I have a question for the GPIO setup for i2c and spi.

Is it necessary to set the pins for SCL SDA Pins when I already have layoutet them to the pins of the SPI (or I2C) ports of the MCU?

Or does the MCU already uses the SPI (or I2C) ports SCL SDA without any configuration?

thank you very much!


STM32F103ZE T6 | KEIL MDK-ARM

Offline

 

# 5   2011-09-28 16:17:45 I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Lync85
New member
Registered: 2011-09-04
Posts: 4

Re: I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

ok i fount that but im not good in translating to stm32


STM32F103ZE T6 | KEIL MDK-ARM

Offline

 

  • Index
  •  » STM32 Family
  •  » I2C, SPI example for STM32F103ZE (gyro: ITG3200, accel: LIS331DLH)

Board footer