paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] CHIMU Integration - Wiring and Configuration


From: Christophe De Wagter
Subject: Re: [Paparazzi-devel] CHIMU Integration - Wiring and Configuration
Date: Sat, 24 Mar 2012 16:34:24 +0100

Dear Cameron,

For SPI to work you need SCK, MISO, MOSI and SSEL/SS/CS connected from Master (CHIMU) to Slave (TWOG). You config WITH BIG-ENDIAN is correct for the Blue CHIMU. 

However, if you do not connect the Slave Select (also called Chip-Select, Slave-Select, SPI-Sync, ...), (not so) funny things can happen. Certainly if you plug the CHIMU while the TWOG was on. That is a guarantee for communication failure. 

In SPI, the slave simply counts the number of SCK (clocks). If a single one is missed, then all bytes are decoded incorrectly. To solve this, the chip-select (slave-select) pin is toggled to passive before every transfer to guarantee that even if errors occured before, the next transfer will be correct. 

So please confirm that you still have trouble when the Twog-SSel is connected to the CHIMU-SS-output. Could you also confirm that you receive other messages like GPS and STATUS correctly?

-Christophe 



On Sat, Mar 24, 2012 at 5:06 AM, Cameron Lee <address@hidden> wrote:
Hello everyone,

My name is Cameron Lee and I'm an engineering student at the University of Alberta. I'm trying to implement Paparazzi as part of a student group; the University of Alberta Aerial Robotics Group (UAARG).  We're using a TWOG, Leah GPS, XBee (although we're working on XTend) radio, and the CHIMU IMU. We've done a test flight with just the XBee and GPS working - we were able to see where the plane flew on the ground control station. Now I'm trying to get the CHIMU working, and I've been having troubles. If anyone knows the solution to my problem, that would be great.

We've got our CHIMU working with the GUI (although we get App Errors every once in a while, such as: XSUM fail! MsgID-2), but when connecting it to the TWOG over SPI, Paparazzi's ground control station always shows the attitude as perfectly flat - it gets altitude messages every second, but they're all zeros. I've connected Vin, GND, SCK, MISO, and MOSI between the CHIMU and the TWOG. I've also connected the SSEL of the TWOG to GND (and I tried +3.3 V at one point too). The yellow light on the CHIMU flashes, so I know it's getting power. I've included the following lines in my airframe file (along with all the other lines - the full file is attached):

  <modules>
      <load name="ins_chimu_spi.xml" >
      <define name="CHIMU_BIG_ENDIAN" />  
  </load>

  <firmware name="fixedwing">
      <subsystem name="spi_slave_hs"/>
  </firmware>

I've also tried without the CHIMU_BIG_ENDIAN line. I've however read that this is only for the CHIMU J, so I think I do need to have this line.

During my troubleshooting, I've used an oscilloscope on the SCK and MOSI lines. There seems to be a regular clock pulse on the SCK line as well as data on the MOSI line. I also tried plugging the CHIMU into the TWOG after the TWOG had booted up and connected to the ground station. When I did this, before connecting the CHIMU, the messages come in, but are all zero - i.e. the same thing as when the CHIMU is plugged in. But, once I've plugged the CHIMU in, with the SSEL set to +3.3V. and with the big endian line, Paparazzi Center displays:

Failure("Pprz.values_of_payload, too many bytes: 00 03 03 29 00 00 00 00 00 00 00 ")    (I don't remember exactly how many pairs of zero, but there were a few)
Failure("Pprz.values_of_payload, wrong arguement: 00 08")

and no attitude messages come in - in the messages window, I can see the time since the last attitude message increase.

When doing this but without the big endian line, the same thing happens except without the "too many bytes" line (maybe because of the timing I plugged it in).

When doing this but with the SSEL set to GND, I don't get these failures, and the attitude messages with zero values keep coming in.


Does anyone know what I need to do to get the CHIMU working?

Thanks,

Cameron Lee
address@hidden


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



reply via email to

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