Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

STM8 and Reflashing App


  • Please log in to reply
7 replies to this topic

#1 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 21 May 2012 - 01:05 AM

What connections are necessary between the GO!Bus and the STM8 to reflash the module similar to the STM32?
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL

#2 Matt Isenhower

Matt Isenhower

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSan Diego, CA

Posted 21 May 2012 - 01:09 AM

Hi Kevin, This wiki page details most of the hardware/electrical requirements for STM8S-based modules: http://wiki.netduino...ders-Guide.ashx Pin 4 should be connected to SWIM and pin 5 should be connected to NRST. The wiki pages for the potentiometer and RGB LED modules have Eagle schematics attached in the top right corner, and you can pretty much follow the schematics for those modules as a base for custom modules. Matt
Komodex Labs
Follow me on Twitter: @mattisenhower

#3 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 21 May 2012 - 10:58 AM

Thanks Matt -

This wiki page details most of the hardware/electrical requirements for STM8S-based modules:
http://wiki.netduino...ders-Guide.ashx


This looks like a great asset!

Pin 4 should be connected to SWIM and pin 5 should be connected to NRST


We probably have to assume that those lines are not Hi-Z, so durring development with the ST-Link2 attached, they should be disconnected? I guess a good approach would be cutting those lines in the 10 pin ribbon cable.

Kevin...
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL

#4 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 21 May 2012 - 11:20 AM

ST-LINK/V2 works correctly when the module is connected to the mainboard, there is no need to cut the cable (I often have ST-LINK/V2 connected through a different socket, wires directly plugged into the IDC cable header, I call it "a poor-man's SWIM adapter"). Technically, the SWIM programming requires only the SWIM pin to be connected, but with the reset wire (NRST) we allow the module to use the SWIM pin as general purpose I/O (configured via SWD bit in the CFG_GCR register).

#5 ByteMaster

ByteMaster

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 21 May 2012 - 01:15 PM

I often have ST-LINK/V2 connected through a different socket, wires directly plugged into the IDC cable header, I call it "a poor-man's SWIM adapter"


CW2 - Got-it...pretty cool!

Using a different socket, I assume you couldn't have another STM8 on the same side of the GO!BUS, correct? Or unless I'm missing something, you would end up programming two devices :) or at least get some serious issues with both chips on the SWIM line.

Hmmm...I'll bet you could also use the break out board that I'm using to connect to the logic analyzer, between the main board and the module, and hookup the ST-Link V2 up to that. This would allow us to leave the programming connector off our module! Way kewl!

Might be worth it to get some boards made up similar to...
Posted Image
...but with a socket to plug in the ST-Link V2. Would be a really good way to do development. All sorts of pins to connect a logic analyzer as well as program the device. In this case, you wouldn't tie those lines back to the main board and could have multiple STM8's without having to worry about bus contention.

Great H/W design here on the GO!Bus!!!

Kevin...
Kevin D. Wolf
Windows Phone Development MVP
President Software Logistics, LLC
Tampa, FL

#6 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 21 May 2012 - 01:40 PM

Using a different socket, I assume you couldn't have another STM8 on the same side of the GO!BUS, correct? Or unless I'm missing something, you would end up programming two devices

Yes, you are right, it is recommended to have only one module connected on the same go!bus for programming. It is not necessary to physically disconnect the other module cables, the mainboard can simply turn off their power.

#7 Matt Isenhower

Matt Isenhower

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSan Diego, CA

Posted 21 May 2012 - 03:21 PM

ST-LINK/V2 works correctly when the module is connected to the mainboard, there is no need to cut the cable (I often have ST-LINK/V2 connected through a different socket, wires directly plugged into the IDC cable header, I call it "a poor-man's SWIM adapter").

I understand this works, but is this actually a good practice? Are the programming lines actually configured in a hiz/weak pull-up mode when idle?
Komodex Labs
Follow me on Twitter: @mattisenhower

#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 21 May 2012 - 11:18 PM

When we debug STM8S modules while they're connected to the go!bus, we typically wire up two socket adapters...and then connect all the lines between them except the SWIM lines. That way we can debug that module--and others--at the same time, and there's no need to worry about anything else. The mainboard may put the UART pins in "input, pullup" mode during runtime. That may be okay with SWIM, as long as the high/low transitions don't become sloppy due to the weak pullup. Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.