Almabraxas/2018-04-10 Needed ports on the prototype

  • SPI for radio communication (the circuit is Adafruit RFM69HCW for now) => needs SCK MOSI MISO CS + 1 GPIO for reset and 1 GPIO for interruption
  • SPI for flash card communication (super high speed) => (same ?) SCK MOSI MISO + 1 CS
  • I2S for the magnetometer => SCL SDA
  • Serial port for the GPS => TX1 RX
  • Serial port for the satelite modem (not on the prototype, but at least we count everything).
  • 2 PWM for the motors
  • 2 ADC for sensing the available power coming from the solar panel (voltage and current).

Thus we have

CN7|
PC10 PC11

Resulting in at least 18 wires (+power).

Let's use corresponding Arduino pins on the Nuxeo board, thus using

  • PB8/PB9 for I2S
  • PA5/PA6/PA7/PB6 for SPI
  • PB10/PB4 for the PWMs, but I'm planning to use STM32F4 TIM5 (to have 1 MHz basic clock, more on this later), so may be I'll have to switch to other pins
  • PA0/PA1 for ADCs.

I'd like to keep PA2/PA3 for the satellite modem, so we'll see for using TX2/RX2 for the GPS.

For the PWM, my understanding for now is that the Afro ESC is using a 1MHz cycle (their center impulse is defined as 1000 microsec), with a 50 Hz PWM repetition. Actually, they say they have "400 values" (the PWM width going from 0 to 2000 I think), so they could actually use something like a 200 KHz base clock for their PWM, may be I'll do that, because I could use then a 16-bit prescaler and timer instead of a 32 bit counter. Template:Wl-publish: 2018-04-10 23:28:44 +0200