<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Annoying serial ports&#039;  problems</title>
		<link>http://forums.leaflabs.com/topic.php?id=1185</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18:19 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1185" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Annoying serial ports&#039;  problems"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1185#post-7246</link>
			<pubDate>Fri, 25 Nov 2011 12:01:41 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7246@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;samtal&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;It is unclear to me how I combine any code I write with the IDE program?
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;AFAIK, the IDE will not run a serial upload program.&#60;/p&#62;
&#60;p&#62;I think there are three approaches:&#60;br /&#62;
- use command line programs (there is a bit of documentation for that), or&#60;br /&#62;
- Eclipse, or&#60;br /&#62;
- modify the IDE.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;How do I make the IDE send the same command to the Srerial1 instead of USB?
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;AFAIK, the IDE has no way to do this, so you'd have o change it, or go a different way.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;And even then, note that the Serial1 port on the Maple does not have a DTR line !
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The Reset signal from the host isn't going to a USART DTR line. The DTR signal is connected to Reset.&#60;br /&#62;
You could use any other control signal that can be set from the host by software. Your USB to serial might not have a DTR signal either, so you'd need to check. My FTDI has RTS &#38;amp; CTS.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;(I could connect my USB to serial device DTR line to the Maple reset, but will the Maple react to this?)
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;If your USB-to-serial has a DTR output signal (my FTDI does not), and you connect the Maple Reset to the DTR, then *IF* you can arrange for the DTR to be asserted (low), then the Maple will be reset.&#60;/p&#62;
&#60;p&#62;The IDE's upload program is useless for this, you'll need to use the Python USART upload.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>samtal on "Annoying serial ports&#039;  problems"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1185#post-7244</link>
			<pubDate>Fri, 25 Nov 2011 09:59:25 +0000</pubDate>
			<dc:creator>samtal</dc:creator>
			<guid isPermaLink="false">7244@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks gbulmer,&#60;/p&#62;
&#60;p&#62;Your advice is the right thing: Abandon the USB and use Serial1 instead, and this is what I will do, once I get it to work.&#60;/p&#62;
&#60;p&#62;I am familiar and experienced with the use of Serial1 for flashing and loading the Maple program (I use the Python with the st file).&#60;br /&#62;
I have briefly read the AN2606 and the Maple boot-loader section.&#60;/p&#62;
&#60;p&#62;BUT, I will need more of your (or someone else) kind support to get it work.&#60;/p&#62;
&#60;p&#62;It is unclear to me how I combine any code I write with the IDE program?&#60;br /&#62;
Or, do I have to set the Maple in receive mode by a separate program and expect the IDE to load the program within the few seconds the Maple is ready?&#60;/p&#62;
&#60;p&#62;The Maple boot-loader section says that the IDE initially automatically performs the reset via the USB port DTR line and sends the code sequence (“1EAF”) to load the program, but the IDE still insists on sending it to its default USB only.&#60;/p&#62;
&#60;p&#62;Now, here is the question:&#60;br /&#62;
How do I make the IDE send the same command to the Srerial1 instead of USB?&#60;/p&#62;
&#60;p&#62;And even then, note that the Serial1 port on the Maple does not have a DTR line !&#60;br /&#62;
(I could connect my USB to serial device DTR line to the Maple reset, but will the Maple react to this?)&#60;/p&#62;
&#60;p&#62;Thanks,&#60;br /&#62;
samtal
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Annoying serial ports&#039;  problems"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1185#post-7236</link>
			<pubDate>Thu, 24 Nov 2011 17:53:49 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">7236@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;samtel - you could completely bypass the Maple bootloader for uploading if you used USART1. Every STM32F103 has a bootloader manufactured into the chip, so it is always available. There are several Open Source loader programs available (in Python and C).&#60;/p&#62;
&#60;p&#62;This is how I bootstrap a raw STM32F chip, and load its bootloader. I use an FTDI USB-to-serial cable.&#60;/p&#62;
&#60;p&#62;Application Note AN2606 describes how the manufactured-in bootloader works. You can get that at the ST.com web site. You don't need to understand how it works in detail, but you will need to understand the limitations.&#60;/p&#62;
&#60;p&#62;The first constraint is the Reset signal must be triggered. The Reset signal is available on a header, so it can be triggered remotely.&#60;/p&#62;
&#60;p&#62;Have you got a 'full' Serial port that you could connect to USART1? You might use one of the serial control signals to trigger Reset.&#60;/p&#62;
&#60;p&#62;The Arduino approach to auto-reset is to use a software generated control signal to the USB-to-serial device driver. That control signal is interpreted by the USB-to-serial hardware to trigger a 'spare pin' which is tied to the Arduino's ATmega MCU's Reset, and so the host PC can force a hard Reset of the Arduino using a software signal.&#60;/p&#62;
&#60;p&#62;Generating the signal is about 6 lines of code (using an ioctl), and several example programs, designed to drive the Arduino, exist which demonstrate how to do it.&#60;/p&#62;
&#60;p&#62;So you could use the same technique.&#60;br /&#62;
(I think, but I really am unsure, that I have seen an upload program for the STM32F which already has the necessary code, but I may be mis-remembering.)&#60;/p&#62;
&#60;p&#62;The power of the approach is there might be no new software to develop, and it works.&#60;br /&#62;
A downside is the Maple IDE doesn't support this approach.&#60;/p&#62;
&#60;p&#62;HTH&#60;/p&#62;
&#60;p&#62;(full disclosure: I am not a member of Leaf:abs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>samtal on "Annoying serial ports&#039;  problems"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1185#post-7233</link>
			<pubDate>Thu, 24 Nov 2011 12:55:58 +0000</pubDate>
			<dc:creator>samtal</dc:creator>
			<guid isPermaLink="false">7233@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Well,&#60;br /&#62;
I am really getting tired of my Maple communications.&#60;br /&#62;
There have been many complains by myself and others, but to the best of my knowledge there is no cure so far. (am I wrong?)&#60;br /&#62;
I have my two r5 connected to two different computers' serial ports each:&#60;br /&#62;
The USB that works occasionally. More often than not I get the message &#34;Couldn't find the DFU device: [1EAF:0003]&#34;. I then press the Reset (at the very right moment) and it may work, or I change the computer's USB port and reset the device.&#60;br /&#62;
The port is seen on the WinXP device manager as a good one (&#34;Maple R3 device&#34;,  &#34;working properly&#34;).&#60;/p&#62;
&#60;p&#62;The other port is Serial1 or Serial3. Both work perfectly for my program data (up and downloading data), but my IDE program upload to the r5 does not work using those. &#60;/p&#62;
&#60;p&#62;There seem to be something very basic bad with the r5 ports, and I think LeafLab should do something about it. My time is precious, and I don't want to waste it on communications problems.&#60;br /&#62;
More than that, I want to be able to download programs remotely by RS232 (not by usb), not needing to use the reset button.&#60;br /&#62;
Can anyone help?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
