paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Bug report - v3.9 - i2c


From: Eric BAHIER
Subject: Re: [Paparazzi-devel] Bug report - v3.9 - i2c
Date: Sun, 08 Jul 2012 16:53:42 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

Hello the list,

I work in the past, I'll become a git friend...
My test platform : Lisa/L with aspirin1.5

I setup back my system to "master" (2012-06-30 15h 13) with GIT....

I have the same result with "new driver" or with the standard one :
    at power up I need about 10 sec to have the second les fullon
    after 20 to 100 sec the I2C (gyro ant mag) fall down.  During this 20to100 sec evry things is green....


I setup back to "quadshot integration" (2012-05-16 00:20)
    standard driver, no boot.
    New driver, it boot and crash after 20 to 100 sec...


I setup back to "feature 4 fixedwings in rotor" (2012-05-04 21:47))
    I have sone compile problem arround "guidance_v"

regards,

Eric

Le 06/07/2012 19:28, Eric BAHIER a écrit :

hi,

I am back on the paparazzi list, Xavier has decided to left the team this week.

 

The bug still alive....

 

This morning I have updated my system to 3.92 (up to date version), I have made some tests.

 

My IMU is an Aspirn 1.5 with larger PCB, the exact size of the GPS, to be mounted directly on the LISA/L without any adaptor.

 

I also have a LISA/M with the stamp size Aspirin 1.5. it have realy fly

 

To test my IMU, I have removed the stamp aspirin from the LISA/M, and solder some wire and a molex 12 pin connector.

First time I connect my IMU, it was wrong, it was a mistake on filtering cap on the power lines.

 

Now if I connect my IMU to the Lisa/M, everything is ok (with the standard i2c driver), I can go to fly, if mecanical fix My imu one the quad...

 

With the new driver  (<configure name="USE_NEW_I2C_DRIVER" value="1" />) the mag and the gyro run, after about 8 secondes they are died. The ACC still to run (SPI)

 

 

Test on the Lisa/L.

With the standard driver

         with my IMU plugged at power up, All four leds still off... nothing run !

 

         power-up without IMU, the first led flash at 1 sec (OK!) the 3 and 4 leds flash few sec, and still on.

                            I plug (hot plug!!!!) my IMU. The second led flash... and still on.

                            On GCS the PFD is ok !

                            Evry thing feel good, the motors can be start with the RC in ATT mode.

                            On message, with raw_sensor option the ACC is ok, the Gyro is OK, the
                             MAG is died.

 

With the new driver

                   with my IMU plugged at power up The mag and the gyro run, after few seconds they are died.

                   The ACC still to run (SPI)

                   GCS still in « Kill » mode.

        nothing better with "hot plug"

 

 

the tests have same result with «  lisa/L my aspirin1.5 » or Lisa/L stamp aspirin 1.5.

 

I have compile error with the option « newdriver » :

arch/stm32/mcu_periph/i2c_arch.rewritten.c: In function 'i2c_error':

arch/stm32/mcu_periph/i2c_arch.rewritten.c:667:11: warning: variable 'err_nr' set but not used [-Wunused-but-set-variable]

 

I will try to became friend with "git", and try move in th past, just before the change master/3.9

 

I still on line and I am open for all new test, or questionsss….

 

 Regards,


Eric

 

 

Le 02/07/2012 17:34, Felix Ruess a écrit :
Hi Xavier,

you don't have to use github, but could you please make some patches and post them here? That would make things a _lot_ easier...

Cheers, Felix

On Fri, Jun 29, 2012 at 9:34 AM, Xavier RIVIERE <address@hidden> wrote:
Hi,

I already post a lot about my I2C problem with Lisa/L + aspirin v1.5 + v3.9 configuration. After checking my electronics, I check the software. And finaly, it's working !!

Well... I change so much things that I'm not sure what is the main part... As I'm not in the dev team, and I don't want to open my own branch, I'm posting here my change.

----------------------

First, in my conclusion, the problem don't come from the I2C driver... I made little change here. I just put this line

while ((regs->CR1 & 0x200) == 0x200);

before each I2C_GenerateSTART and I2C_GenerateSTOP, to avoid double send, as describe in STM32 datasheet
Add this line if need in the function :

I2C_TypeDef *regs = (I2C_TypeDef *) periph->reg_addr;

----------------------

So, for me, the problem come from the I2C driver call... that's really a mess. There is T.H.R.E.E. calling function :
send_i2c_msg_with_retry
i2cSubmit
I2CTranmit

I put i2cSubmit everywhere -____-

----------------------

I change the function imu_periodic, in imu_aspirin.c this way :
http://pastebin.com/aWNAXQf1

I change the function imu_aspirin_event this way :
http://pastebin.com/vvXkNnkD

I change the interrupt function in stm32/imu_aspirin_arch.c :
http://pastebin.com/Ar0gD9fr

I activate the interrupt for the mag.

How it works ??
- Captor send interrupt
- Interrupt handler happen, and send i2c reading
- imu_aspirin_event catch the reading end, and send according handler
- imu_aspirin_periodic works as a watchdog. Mag timeout must be around 30+. Accel and Gyro timeout must be around 3+

------------------------

Hope this will help. If someone can test it before validate, it would be great ;)


Xavier


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

-- 
************************************
Lez Concept EURL

Eric BAHIER
15 chemin neuf
34 980 Montferrier sur LEZ
France

Tel : 33 4 67 59 92 53
Fax : 33 9 59 15 92 53
************************************




_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel

-- 
************************************
Lez Concept EURL

Eric BAHIER
15 chemin neuf
34 980 Montferrier sur LEZ
France

Tel : 33 4 67 59 92 53
Fax : 33 9 59 15 92 53
************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]