0
votes

I'm interested in interfacing an STM32-based flight controller with external sensors based on the SPI (Serial Peripheral Interface) protocol. I have a couple of FCs (Flip32 F3, shown in attached photo; EMAX Skyline 32) that have a section of pins marked 5V/GND/RST/SCK/MISO/MOSI, which I presume are there to support ISP (In-System Programming); i.e., these pins allow the FC to act as a slave device for a programmer device that acts as the master. Other boards, such as the multiFlite NANO-B-FC, provide pin headders explicitly for SPI (other attached image), with CS (Chip Select) instead of RST.

Am I correct in these assumptions: i.e., the first kind of pinout (RST/SCK/MISO/MOSI) does not support an external SPI sensor, and the latter (CS/SCK/MISO/MOSI) does?

Flip32 F3 flight controller; ISP pads upper-left:

Flip32 F3 flight controller; ISP pads upper-left

MultiFlight Nano-B flight controller pin header schematic:

MultiFlight Nano-B flight controller pin header schematic

1

1 Answers

0
votes

I don't know these boards, just had a look at some pics on the internet.

The Flip32 F3 seems to have an Atmel ATMEGA microcontroller on board. (as an auxiliary MCU) I would assume that the 6 pins you found are the ISP interace for that MCU.

Just use a multimeter in continuity test mode and check if the 6 pads are connected to the ISP pins of the ATMEGA.

The board's main MCU STM32 is more likely programmed through the SWD (serial wire debug) interface. That's a pin-reduced JTAG alternative. Just google for it.

enter image description here Here are some details if you are interested in Atmels ISP: http://www.atmel.com/images/doc0943.pdf

If the firmware supports it (or you write one that supports it) you should be able to use the ISP interface as a normal SPI interface which it basically is.

ISP is usually done through a simple serial interface like JTAG, SWD or in the AVR case SPI.

Best way to find out: Read the datasheet of your ATMEGA.