|
From: | Christophe De Wagter |
Subject: | Re: [Paparazzi-devel] CHIMU Integration - Wiring and Configuration |
Date: | Tue, 27 Mar 2012 11:06:35 +0200 |
Thank you very much for your help Christophe.I tried connecting SSEL today, and the CHIMU works now. The SSEL on the CHIMU side is pin 4 of the main connector, called NSS (COM Select) - this is what confused me - I didn't think the CHIMU had SSEL on the main connector (and our CHIMU doesn't have the secondary connector).So thank you very much for your help. Everything is working now. I'm considering adding a paragraph about the connections to the Wiki (or maybe Stephen Dwyer will for me). I would add something like this, what do you think of it:Wiring:The CHIMU can be connected using SPI or UART. For SPI, connect as follows:
CHIMU Main Connector, Pin #
CHIMU Main Connector, Pin Name
Tiny SPI Header Pin
Description
1
Vin
+3.3V
3.3 V in
2
GND
GND
Ground
4
NSS
SSEL
Slave Select
5
MOSI
MOSI
Master Out, Slave In
8
MISO
MISO
Master In, Slave Out
9
SCK
SCK
Clock
It's similar to the description of the XTend in the modems section (which we found very helpful). I'd also add the pin connections for UART, but I don't know them myself.Thanks again,CameronOn Sat, Mar 24, 2012 at 9:34 AM, Christophe De Wagter <address@hidden> wrote:
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
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
_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel
[Prev in Thread] | Current Thread | [Next in Thread] |