recommendations and suggestions

ersky9x is a port of er9x for use on the sky9x board.
Post Reply
tsenecal
Posts: 41
Joined: Wed Mar 22, 2017 8:32 pm
Country: United States

recommendations and suggestions

Post by tsenecal » Wed Nov 08, 2017 9:11 pm

If one where to start porting ersky9x to a new stm32 based board... what suggestions and recommendations would one have for me? I have learned my way around a small bit of the mbtx codebase while adding code to change the english language labels for the switches for an ar9x board, and i do understand the fundamental concepts about how ersky9x is built, with different hardware (like the Q7 and x9d and x12d and sky) having subdirectories attempting to segregate the differences between boards... but at a more fundamental level, i know the boards all have DFU support built into the MCU, and stlink/jlink debugger support, so i am thinking i should get the stm32 arduino support up and running for this little board so that i can test things like the microSD card and RTC and LCD support, then move those findings over to a new as yet un-named board with it's own set of support directories and compiler options/defines... then start diving into the really tricky stuff like getting the bootloader running, and defining the different pins for the different inputs/outputs. does that make sense or am i an idiot, and there are better ways to do this?

User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: recommendations and suggestions

Post by MikeB » Thu Nov 09, 2017 12:02 pm

For the STM based boards, there is a file called "Hal.h" where many of the I/O pins and ports are defined. You may need to check the code as I don't think everything is using values from that file. If you do find things that are hard coded, I should be able to change then to use the values from that file in most cases.

Clearly, using the same pins as one of the existing boards for the dedicated functions is useful (DAC output, serial ports, LCD connections).

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

tsenecal
Posts: 41
Joined: Wed Mar 22, 2017 8:32 pm
Country: United States

Re: recommendations and suggestions

Post by tsenecal » Fri Nov 17, 2017 3:44 pm

Mike,

a few rambling questions to help me on my quest.

some things native to the board, like its USB port and microSD card i would like to use, so i have made sure i am not using their pins for anything native to ersky9x...

does ersky9x use the hardware UARTs or software in the STM32? i want to keep that preference as well. I am also open to suggestions regarding the usage of analog and digital inputs. i know what i would like to have, basically a similar design to how AR-Uni works, where i can use 2 pins as either 2 2-position switches or 1 3-position switch... with 12 digital pins and 12 analog pins to use as wanted.... if there are enough GPIO pins to go around.

also, a question regarding the LCD... does ersky9x "prefer" any specific method of communicating with the 128x64 lcds? should i be looking at SPI, parallel or serial hookup for that?

User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: recommendations and suggestions

Post by MikeB » Fri Nov 17, 2017 4:18 pm

Hardware UARTS, although there is support for a software receive (one port only) to handle data of the "wrong" polarity.
Ersky9x supports configuring inputs as "extra" switches or pots in general. It does expect some are fixed.

Simply due to the hardware currently in use, Atmel based radios use paralled while STM based use serial (9Xtreme relays data to the original 9X for display).

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

tsenecal
Posts: 41
Joined: Wed Mar 22, 2017 8:32 pm
Country: United States

Re: recommendations and suggestions

Post by tsenecal » Fri Nov 17, 2017 8:29 pm

hmmm... well, that is going to make things a little bit more difficult. weeding through all the "serial" lcd displays that are actually SPI isn't going to be fun... but i would prefer to keep using serial and use the few pins that frees up for more inputs...


User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: recommendations and suggestions

Post by MikeB » Sat Nov 18, 2017 11:58 am

Using parallel doesn't lose the pins for inputs. Here is the circuit from the AR9X board. As with the SKY board, 7 of the 8 LCD data signals are used for navigation button inputs or 3 extra switch inputs as well.

Mike.
lcd.png
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

Post Reply

Return to “ersky9x”