If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
this thread is for the useful program writing for the STM32 series and realated devices. no "hello world" programs here!
so first, ill try to modify known good examples of c-Code based PID functions, from Bret Beureguard.
then, ill try some servo code which is written by an STM32 expert, which should be good enough as is.
next, ill try to organize a IMU board based on a 9DOF, mag, accel, and gyro, to support full feedback and closed loop flight path execution.
Finnally, (eventually) ill write a movement "decision making model" for my drone, based on functions of the above two attempts.
im hoping for help from Linas and any others who will contribute to make sure i dont goof all the implementation up, im not real familar with code like C or C++, ive just sat in classrooms and done the typical simple programs, with I/O from the keyboard to the screen. Embedded systems programming is way more capable and i fear, more easy for a new guy to screw up.
further, my goal is to write and maintain a free-open standard, that is specifically meant for my drones, GV's, UAV's, USV's, but text based. so it would be based on the philosphy of XYZ, polar and rectilinear coordinates, and then G and M codes. thus this standard will be flying a drone in the same way we machinists "fly"an endmill through a CNC mill, or how i set the Vipros 358, and 556 NC punch presses (this was in the long-long ago, when i was employed).
a first servo attempt will be made using whats in this link :
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
the discovery board im using has 1MB of ram,
im wondering how much I can get programmed, or if expansion is possible via the GPIO... it would only be low speed common ram, for storing instructions.
id like to attach the following devices: -XV-11 LiDAR, (115kbps, ttl serial) -simple CCD cam, which ouputs servo data. -serveral RC servos, 6 I think. -two ultrasound range finders. -one optical range finder. -the second slow IMU... (for long term navigation) -normal RC radio receiver. -normal emebedded flight control W/first IMU support. -SD memory socket, for flight data .TXT, and .bmp and .jpeg captures too. (low speed data stuff), decision making model and Maze navigation, and a real-time cubic memory map.
the first IMU is integrated into the Crius flight controller, a acc, gyro, and mag (9DOF). but is used only for immeadiate flight stability.
the second IMU is lower in speed, acc, mag, gyro (also 9DOF), but used for long-term autonomous navigation. "where ive been, where I am, where I need to still go", type questions... I wont be using SLAM, but maze map planning, which is much easier to code. but more primmative.
Registered Member #27
Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
The chip on the board has 1 MB of FLASH memory and 192 kB of RAM. The FLASH is for storing code and constant data, it is easy to read from but slow and messy to write to.
The chip itself support external FLASH and static RAM with 8 and 16 bit bus at up to 60 MHz.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
oops! distracted, yes Bjorn that is what I meant... 192kB of volatile RAM is more than adequate. but 1MB of Flash might not be....I do still need the "mouse maze navigation model", "Decision Making Model", and the "XYZ dimensional array." All three exist nearly entirely in Flash, and though the "DMM" is mostly running in RAM, it must be first drawn out of Flash upon the drones first power up.
(SLAM is not being used, as I cant afford the CPU, ram, base-station and/or the time needed to code a useful SLAM model, as im working full time, and a college student. Furthermore I will discuss a possible breakthrough that may make SLAM unnessacary given the course type and rules set out by the IARC judges...after August, in detail.)
[EDIT: I am not trying to imply a negative connotation on SLAM as an idea or technology either, I just cant use it with my year round circumstances.]
how difficult would it be to attach more flash? im trying to find the schematic for the STM32F4 Discovery, but I think all the nessacary support pins can be taken off the existing Discovery board to a new 16 bit wide flash chip.
Registered Member #27
Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
All the models except STM32F405RG got the FMSC memory controller and the signals are externally available on packages with 100 pins or more. The datasheet for the discovery board says LQFP100 so it has the memory controller and the pins required.
Registered Member #2431
Joined: Tue Oct 13 2009, 09:47PM
Location: Chico, CA. USA
Posts: 5639
Steve Conner wrote ...
Since when does the STM32F407 support external RAM? I'm pretty sure you need to go to the STM32F427 or 437 to get the external memory interface.
We are using the STM32F407 in a project at work and are running short of RAM, so if it would support external memory that would be awesome.
If you want more flash, you can always attach a SD card or SPI flash chip.
First, I only need more flash RAM...I have no plans to add internal Cache.
Second, and yes, SPI driven SD cards are highly desireable, as they are so simple to implement the code and hardware for. But, I think a normal physical Flash ram chip, with parallel pins directly to the GPIO pins, will give faster speed (still flash--still slow) due to the bottle necking of the 4 data pins on the SD/SPI physical implementation.
I remind everyone, I will be using at least one SD card on board, because its just so easy to load special files and implement changes before the judges demand another flight...the drone will also be recording video, pics and audio, as well as a transcript of what was seen or not, what decisions were made and why...
[I saw the need for and absence of this capability in both 2011 and 2012, across all flight teams. this way I can take a SD card out of a crashed drone, using a normal laptop and text/graphic editor without starting up a compiler to access internal memory for answers...]
EDIT: upon further thought, I need to make a flow chart of each device on the drone... let me post the current primitive one now. this will help you all advise me better.
Links: my RCGroups thread, airframe and sensor pics.
allteh attactchments for the build thread, a pretty concise summary of my efforts too.
Registered Member #1143
Joined: Sun Nov 25 2007, 04:55PM
Location: Vilnius, Lithuania
Posts: 721
LQFP144 device can be interfaced via high speed to external memory , SRAM, FLASH, PSRAM And others If you want to know what you have in STM32XXXXX download MIcroXplorer from , it shows what pin do what, and what function does it have, very handy
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.