Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 18:08 04 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : ARMmite b11, Selectable USB/UART Console

     Page 1 of 3    
Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 07:52am 09 Mar 2015
Copy link to clipboard 
Print this post

Please find attached a revised hex file for the STM32F407VG.
This now supports connecting the console via UART or USB.

To use USB you need to download and install the STM Serial Port Driver

To install the new firmware over a previous release you MUST use the option "Target/Erase chip" to clear the flash memory completely. Then load the new firmware:

2015-03-09_193433_ARMmiteb11.zip

Plug a micro-USB cable into the port next to the Audio output and connect to your computer. When you restart the microcontroller you should then get the usual messages about installing a USB driver. Help Windows as required to get the STM driver loaded and once that is successful open a terminal window and connect to the relevant virtual comm port. Press "enter" and you should get the command prompt displayed.

You can then swap between using a USB connected console or a normal UART as follows:

Use OPTION CONSOLE USB, or OPTION CONSOLE UART. This setting is stored in flash memory for subsequent restarts and power cycles. Once the processor is restarted, the appropriate driver will then be used.

Another new OPTION is "OPTION VCC n.nnn"
If you measure accurately the supply voltage to the microprocessor, then using this option will calibrate both the ADCs and the DACs correctly. The option is stored in flash memory for subsequent restarts and power cycles.
The Discovery board has a diode between the 3.3V regulator and the chip supply which drops the voltage, "OPTION VCC 2.92" works for my board. You can then confirm the setting by using "print pin(0)" which should then report 1.2V.
Valid values are 1.8V to 3.6V - the allowable range for the chip.

OPTION PIN has now been implemented

CPU RESTART has now been implemented.

I'd appreciate feedback on who, if anybody, has got a STM32 up and runningEdited by matherp 2015-03-10
 
atmega8

Guru

Joined: 19/11/2013
Location: Germany
Posts: 712
Posted: 10:41am 09 Mar 2015
Copy link to clipboard 
Print this post

Peter, Peter....

Chapeau for your great Job!
It is extreemly impressive to me, what you and the other guys working on this port are doing.
Also that Geoff has programmed and documented an MMBASIC Interpreter that can be ported to another Platform, awesome..

I will try to pick up a board on ebay for testing and debugging.

Next Step would be a PCB for the new Platform and debugging ( if necessary) and enhancing with geoffs Feature rich MMBasic, and my be more;-)

Thank you,

Dietmar
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 11:55am 09 Mar 2015
Copy link to clipboard 
Print this post

Damn it, now I have to get one of these....
Great work!!!!!
 
plasma
Guru

Joined: 08/04/2012
Location: Germany
Posts: 437
Posted: 12:16pm 09 Mar 2015
Copy link to clipboard 
Print this post

Hi Peter ,

works here on win 7 /64 bit.

now the serial part is easy as arduino
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 01:54pm 09 Mar 2015
Copy link to clipboard 
Print this post

Will get one ordered this weekend.. (payday)..
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 06:28am 10 Mar 2015
Copy link to clipboard 
Print this post

Is this the recommended board we can use. If so, damn, its cheap.Edited by viscomjim 2015-03-11
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3662
Posted: 07:36am 10 Mar 2015
Copy link to clipboard 
Print this post

Yes, that one.

John
 
dmasz
Newbie

Joined: 12/09/2013
Location: Poland
Posts: 21
Posted: 12:05pm 10 Mar 2015
Copy link to clipboard 
Print this post

Hi Peter,

I successfully flashed Discovery board with new ARmite
and i am using console port via micro USB with VCP drivers and teraterm.

I noticed that in terminal there is one character delay while typing.
in other words last pressed character shows after pressing another key and so on.

is it wrong config of teraterm or bug in ARMite firmware?

br
Dan
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 01:23pm 10 Mar 2015
Copy link to clipboard 
Print this post

Has anyone ST-Link running on Win 8.1? Damn, I upgraded all my comps to 8.1 and I'm able to upgrade FW via ST-link, but nothing else. So the communication basically works, but nothing else.







Any suggestion will be appreciated.

Regards

Bo
 
boss

Senior Member

Joined: 19/08/2011
Location: Canada
Posts: 268
Posted: 01:29pm 10 Mar 2015
Copy link to clipboard 
Print this post

I apologize for misplaced pictures, I sent the pictures from my iPhone and did't realize they are upside down.
For today it is enough,

Regards
Bo
 
Zonker

Guru

Joined: 18/08/2012
Location: United States
Posts: 761
Posted: 02:12pm 10 Mar 2015
Copy link to clipboard 
Print this post

OK... Discovery Board ordered from above link...
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 06:30pm 10 Mar 2015
Copy link to clipboard 
Print this post

I have purchased a STM32F4 Discovery I have it working using a USB/serial adapter.

I have downloaded and installed the "STM Serial Port Driver " (win 8.1) all went has normal. I have a serial bus device called STM32 STlink in device manager.

Now the embarrassing bit I can not remember how to find what com port it is connected to!

An update!

A reboot of my system resulted in a windows update (yet another worry with 8.1!).

I now have a device driver tree that looks like this :-




Properties page shows :-





A search for the driver says it is up to date. As usual solution does not make any difference.

Latest Update :-

Will not include a screen dump. I uninstalled the drivers and then manually installed them by pointing the driver update to the folder C:\Program Files (x86)\STMicroelectronics

All seems OK BUT I have no communication with the STM32 from either terra term via ST-LINK (comm5) or the STM32 ST-LINK Utility AND if I pull the plug on the USB console I can not see the STM32 from TT via the USART.

So I can go no further with out some ideas.
Edited by Bizzie 2015-03-12
Rob White
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 09:00pm 10 Mar 2015
Copy link to clipboard 
Print this post

Matherp,

Working at this end. Seems blindingly fast.

Just running a simple flash the leds program on the ST board, while the program is running it won't respond to CTL C?
The editor closes with a CTRL C allright.

- Rob.
For crying out loud, all I wanted to do was flash this blasted LED.
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 09:06pm 10 Mar 2015
Copy link to clipboard 
Print this post

  Bizzie said   I have purchased a STM32F4 Discovery I have it working using a USB/serial adapter.

I have downloaded and installed the "STM Serial Port Driver " (win 8.1) all went has normal. I have a serial bus device called STM32 STlink in device manager.

Now the embarrassing bit I can not remember how to find what com port it is connected to!

An update!

A reboot of my system resulted in a windows update (yet another worry with 8.1!).

I now have a device driver tree that looks like this :-




Properties page shows :-





A search for the driver says it is up to date. As usual solution does not make any difference.

Latest Update :-

Will not include a screen dump. I uninstalled the drivers and then manually installed them by pointing the driver update to the folder C:\Program Files (x86)\STMicroelectronics

All seems OK BUT I have no communication with the STM32 from either terra term via ST-LINK (comm5) or the STM32 ST-LINK Utility AND if I pull the plug on the USB console I can not see the STM32 from TT via the USART.

So I can go no further with out some ideas.


You do have two USB cables connected? the Mini-USB is for power and the Micro-USB (near the audio socket) is for serial comms.
(I'll get this editing right eventually!!)Edited by aargee 2015-03-12
For crying out loud, all I wanted to do was flash this blasted LED.
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 09:22pm 10 Mar 2015
Copy link to clipboard 
Print this post

Yes,

It is very interesting that connecting the "power USB", the one with the red led's either side shows a usb connection in my system tray!

Connecting the other USB (near audio conn.) makes a sound on the PC, this is also the case when I press the black reset button on the STM32.


Rob White
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 09:26pm 10 Mar 2015
Copy link to clipboard 
Print this post

  Quote  Just running a simple flash the leds program on the ST board, while the program is running it won't respond to CTL C?
The editor closes with a CTRL C allright.


Revised b12 hex file attached. I forgot I changed the uart routines to support ctr-C and hadn't done the same to the USB drivers

2015-03-11_090902_ARMmiteb12.zip

Edited by matherp 2015-03-12
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 11:54pm 10 Mar 2015
Copy link to clipboard 
Print this post

I think I have progressed!!? - Have regained connection with the STM32, switched off and went to dinner.

I now can not erase the STM32's memory :-





I tried both a complete erase and by sector, note error during sector erases.

Just tried loading STM32B10.hex after another unsuccessful clear memory. I now have Ver. B10 running fine so will play with that for a while and try Ver. B11 later.Edited by Bizzie 2015-03-12
Rob White
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 12:17am 11 Mar 2015
Copy link to clipboard 
Print this post

  Quote  I tried both a complete erase and by sector, note error during sector erases.



Try "Target/Setting/Mode/Connect under reset" when programming.
 
Bizzie
Senior Member

Joined: 06/07/2014
Location: Australia
Posts: 185
Posted: 12:32am 11 Mar 2015
Copy link to clipboard 
Print this post

That is the mode I have been using. If I try any other mode the STM32 ST-utility says it can not connect to use "Connect under reset".

Matherp, it seems the memory command has not been implemented, is that correct? It causes a lockup of my system I have to use the reset button to regain control.


Rob White
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8592
Posted: 12:42am 11 Mar 2015
Copy link to clipboard 
Print this post

You can also try putting a jumper between BOOT0 and VDD.

Just tested and "memory" works fine on both B10 and B12 using the hex files on the web and programming with ST-LINK so I assume you are not getting the chip properly erased. It must be fully erased before programming as the options are stored in sector 11 and they are different in the different versions.



 
     Page 1 of 3    
Print this page
© JAQ Software 2024