Re: [psas-avionics] RTx Ethernet code base

2014-01-19 Thread Andrew Greenberg
Hi!

> It seems the projects all use an FTDI serial interface rather than USB
> for shell support.

Nah, we've given up on the FTDI cables. I agree with K: it's 2014, so
our microcontrollers all have built-in USB devices, so just use those.
On the Olimex, it's a USB Mini B and on our future Node6 boards it's a
USB micro B connector.

> Andrew, take note: Ethernet switches- on-board or off-the-shelf?

1) Onboard is way cooler, but *tons* of work. Especially if there's PoE
involved.

2) OTS is bigger, bulkier, more likely to have crappy connectors, but
Just Works(tm). Also, like you say, we can just get PoE switches.

So, it's up to you guys, but I'd recommend (2) with some modifications
to make the OTS hardware more reliable. Modifications should include
cable strapping down connectors, strain relief on cables, dust covers if
necessary, etc.

Andrew

-- 
---
Andrew Greenberg

Portland State Aerospace Society (http://psas.pdx.edu/)
and...@psas.pdx.edu  C: 503.708.7711
---

___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics


Re: [psas-avionics] RTx Ethernet code base

2014-01-19 Thread K Wilson

Hi Rob,

I've tried to answer some of your questions below:

On 01/19/2014 12:37 PM, Rob Gaskell wrote:
> K, Theo, Andrew, etc.,
>
> First, which project would you guys recommend as a starting point for 
> RocketTracks (RTx)? I'll need
> to both communicate between STM32-based modules and at least support future 
> communication with a
> laptop. My first step is the get two dev boards talking over enet. I'm 
> assuming UDP only unless
> someone talks me out of it.

UDP is what we've been using for the
Avionics system.

Example starting points:
Please look at Theo's adisdev branch in the stm32 repo:
Something like (assuming you are on master branch):
 git fetch
 git branch --track theoadis origin/adisdev
 git checkout theoadis

In projects/flight-rnh/main.c see two functions:
  eth_start
and
  ethernet_commands

I think these give you a good idea of how to set up for using
the ethernet interface using lwip.

> It seems the projects all use an FTDI serial interface rather than USB for 
> shell support. I intend
> to use the shell for development only- and I've used FTDI chips (designed 
> them into hardware) but
> never an FTDI cable straight to a UART- is this the way to go or should we 
> just use the USB
> peripheral like I planned?

You may use either one. Since carrying around YetAnotherCable(tm)
is annoying, you maybe should use the usb connector.

In common/devices/usbdetail.c please see:
 usbSerialShellStart

and in your code declare a pointer like this:
 BaseSequentialStream *chp = getActiveUsbSerialStream();

And then you should be using the usb interface for
your serial shell. (Look for a /dev/ttyACM... device
when connected.)

For an example look on master branch, project/flight-imu/sensor_mpu.c.

 76 #ifdef  DEBUG_SENSOR_MPU
 77 BaseSequentialStream *chp =  getActiveUsbSerialStream();
 78 static uint16_t count = 0;
 79
 80 ++count;
 81 if (count > 2000) {
 82 chprintf(chp, "\r\n*** MPU9150 ***\r\n");
 83 chprintf(chp, "raw_temp: %d C\r\n",
mpu9150_temp_to_dC(mpu9150_current_read.celsius));



 88 #endif

---

Hope this helps,
 -K





___
psas-avionics mailing list
psas-avionics@lists.psas.pdx.edu
http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics