Saturday, March 04, 2017

OpenOCD Error Connecting to STM32F4 Discovery Board

I recently setup a development system for STM32 microcontroller and I encountered this when setting up OpenOCD.

After following the instruction here on setting up openocd I was not able to connect using the command:


 openocd -f board\stm32f4discovery.cfg  
 GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-18:48)  
 Licensed under GNU GPL v2  
 For bug reports, read  
     http://openocd.org/doc/doxygen/bugs.html  
 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD  
 adapter speed: 2000 kHz  
 adapter_nsrst_delay: 100  
 none separate  
 srst_only separate srst_nogate srst_open_drain connect_deassert_srst  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : clock speed 1800 kHz  
 Error: open failed  
 in procedure 'init'  
 in procedure 'ocd_bouncer'  


The newer STM32F4 Discovery board uses ST-Link V2.1 and the stm32f4discovery.cfg uses ST-Link V2.

Edit the file: openocd/scripts/board/stm32f4discovery.cfg

Change the line:

source [find interface/stlink-v2.cfg]

to

source [find interface/stlink-v2-1.cfg]



 openocd -f board\stm32f4discovery.cfg  
 GNU ARM Eclipse 64-bits Open On-Chip Debugger 0.10.0-00113-g0f83948 (2017-01-24-18:48)  
 Licensed under GNU GPL v2  
 For bug reports, read  
     http://openocd.org/doc/doxygen/bugs.html  
 Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD  
 adapter speed: 2000 kHz  
 adapter_nsrst_delay: 100  
 none separate  
 srst_only separate srst_nogate srst_open_drain connect_deassert_srst  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : Unable to match requested speed 2000 kHz, using 1800 kHz  
 Info : clock speed 1800 kHz  
 Info : STLINK v2 JTAG v25 API v2 SWIM v14 VID 0x0483 PID 0x374B  
 Info : using stlink api v2  
 Info : Target voltage: 2.883666  
 Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints  


I was able to connect to the board.  I hope this helps.

Friday, January 20, 2017

Best Type C Dongles for Mac & PC


Features:

  • 2x USB 3.0 Ports ( 5Gbps Transfer Rate)
  • 1x SD Memory Card Input
  • 1x Micro SD Memory Card Input
  • 1x Micro USB Input (Additional Power Supply Port)
  • Aluminum Body



Type C RJ45 Gigabit Ethernet Lan Wires Netword Adapter, USB-C LAN Wired USB 3-Port Network Converter for Apple New Macbook, Chromebook Pixel and More(Rose Gold)

Features:


  • Support SuperSpeed USB 3.0 data transfer rate up to 5 Gbps for 1000 BASE-T network performance with backwards compatibility to 10/100 Mbps networks.
  • G-TING LAN USB-C adapter is an easy way to gain wired gigabit network speeds over USB-C for faster HD video streaming, gaming, web browsing, network storage and more,provides an alternative to connecting to the internet via Wi-Fi.
  • G-TING Ethernet Adapter,powered via USB – no external power adapter needed,is the perfect solution for the business traveler who prefers a secure and fast wired Ethernet connection.
  • Superior Aluminum Quality,Compact unibody aluminum design effectively saves precious desk space. To ensure reliability, work and fun is fully integrated.
  • Brand G-TING Products Have a Year Services that Begins on the Date of Purchase. If there are Any Product Quality Problems, Please Feel Free to Contact Our Customer Service Agents for Help



Features:


  • Add four USB 3.0 ports to your devices with USB-C adapter
  • USB 3.0 Ports support ultra-fast data transfer rates of up to 5Gbps and downward compatible with USB 2.0/1.1 specifications
  • VGA port outputs resolutions up to 1080p to VGA displays or projectors
  • Easy installation - No driver or power adapter required
  • Package Contents: AUKEY CB-C27 USB C Hub, Instruction Manual, 24 Month Warranty Card






Friday, October 14, 2016

Flysky iA6 iBUS Setup

The Flysky iA6 receiver is PWM only receiver.  It doesn't even support PPM.  It is a low cost and compact receiver for the Flysky i6 Transmitter.

iBUS Hack

 If you know how to solder and compile your own copy of Cleanflight/Betaflight firmwares you can have an iBUS receiver using the FS-iA6.  It is very compact once you remove the pins and only uses the iBUS wires.

Wiring


Use this versions of the files then recompile.


Read the RCGroup user darven that started it here

Read the betaflight PR here.

Alternative

This is just an alternative if you have extra iA6 receivers.  The FS-iA6B is the same price as the iA6 and it has ibus/ppm port and can output 10 channels on ibus configuration.


Eachine EB185 FPV Racing Drone

Eachine EB185 FPV Racing Drone is a very compact racing drone from Eachine that comes ready to fly package.  It can be purchased with an optional GPS module.  It is running a Cleanflight firmware making it very configurable.

Specifications:


Aircraft

  • 4" rotors (101mm)
  • Dimension: (L x W x H): 197mm x 168mm x 75mm
  • Weight: 350g including battery
  • Controller: Eachine I6
  • Receiver: Eachine X6
  • GPS: EB7M
  • OSD: EB185 OSD
  • Flight Controller: NAZE32 REV6 Full
  • VTX: TX58200 40ch
  • Motor: Eachine B1806-2300KV
  • ESC: BLheli 12A
  • Battery: 11.1v 1300mAh 30C 3S Lipo
  • Flight time: 5-7mins


Suggested Upgrades

Wednesday, October 12, 2016

Interfacing The SSD1306 OLED Display To OrangePi

I recently purchased an 0.96 Inch 4Pin IIC I2C OLED Display Module and needed to interface it to my OrangePi.  It uses the SSD1306 chipset and can be updated via I2C interface.

SSD1306 Datasheet.

I modified a Python library built for RaspberryPi so it would work with the OrangePi I2C ports.

You can checkout the library here: https://github.com/nukem/ssd1306


You can buy the OLED Display here: https://goo.gl/coVB5o