Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:19 14 Apr 2021 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 : ArmmiteF4 User Manual

     Page 1 of 2    
Author Message
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 10:07am 26 Feb 2021
Copy link to clipboard 
Print this post

Attached is the first draft of a consolidated User Manual for Armmite F4 on the STM32F407VET6 development board. It is aimed at the latest released 5.07 beta firmware.

This still needs a bit of work but should be complete enough to be useful and allow reporting of any errors via this thread.

It draws much content from the previous Micromite, Armmite and CCM2 manuals produced by Geoff and Peter and various threads on TBS. Some diagrams in Supported Devices still need to be updated to reflect Armmite F4 pins.

Sections highlighted in red probably need some corrections, where specific detail still refers to the PIC32 and the Armmite might be different e.g SPI speeds etc. highights in yellow may need some revision.

The Pin Out, connector tables, Options, Read Only Variables, Commands and Functions should all be complete and correct, please report errors in these.


Armmite F4 Manual Draft

Regards
Gerry
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 843
Posted: 10:54am 26 Feb 2021
Copy link to clipboard 
Print this post

Quick look. Excellent work.
ChopperP
 
Canada_Cold
Newbie

Joined: 11/01/2020
Location: Canada
Posts: 20
Posted: 12:03pm 26 Feb 2021
Copy link to clipboard 
Print this post

Great work.  I'm a newbie user of the F4 and this huge help.

Thank you so much!
 
Canada_Cold
Newbie

Joined: 11/01/2020
Location: Canada
Posts: 20
Posted: 12:03pm 26 Feb 2021
Copy link to clipboard 
Print this post

Great work.  I'm a newbie user of the F4 and this huge help.

Thank you so much!
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 07:57am 27 Feb 2021
Copy link to clipboard 
Print this post

Hi disco4now,

Great work.
Outside the yellow and red area's this may need adjustments:

- ADC part (refers to 480MHz and recording 3 ADC's simultaneous
- ENDIF is double in the command list
- CAT refers to the INC command ?
- on F4 the command LIST FILES is still the older FILES
- The PAGE #n command refers to CMM2
- GETSCANLINE refers to CMM2

I will see if I can get details on the highlighted sections

Volhout
If nothing goes right ... turn left
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 08:36am 27 Feb 2021
Copy link to clipboard 
Print this post

Hi disco4now,

started evaluating the highlighted sections.

Page 10:
the interpreter runs roughly 100000 lines per second (tested 102000 in a do loop with some variety of commands)
the power consumption is 70mA without LCD, and 140mA with LCD (backlight on)

Page 12:
the floating point is something we need to check with peter mather. The hardware floating point unit in the chip is single precission. But the interpreter does double precision floating point. So it is either SW or a combination of SW and HW.

Page 14:
The yellow text is OK

Page 15:
PWM runs up to 20MHz

Page 17:
there is no OPTION VCC command

Page 22:
see above 70mA/140mA. For other displays current consumption may be hiogher.

Page 26:
this table is absolutely useful but it does not give a quick solution as to which pins are free to use. The LCD pins are colored, but the SDcard pins not. Maybe colors can be used to identify free pins.

Page 29:
The I2C OPEN command does enable weak pullups. When I2C CLOSE then the pullups are disabled again.

Page 50:
from the datasheet: Vlow < 1.0V, Vhigh > 2.3V hysteresis minimal 300mV

Regards,

Volhout
Edited 2021-02-27 19:12 by Volhout
If nothing goes right ... turn left
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 09:34am 27 Feb 2021
Copy link to clipboard 
Print this post

OK Thanks - will add these in.

Are you sure about
OPTION VCC voltage  
not being valid.

The table on page 26.
Anything marked DIN-DOUT  is one of the 47 available pins. Anything else is not available to MMBasic.
They all have any special functions they have listed beside them, so you can see if you really want to steal them for something else.  
I will see if there is a way to make it clearer, perhaps just the above statement.
I stole the begining of that table so not sure was the OBS column heading is.
The TYPE sub heading could become  MMBASIC or AVAILABLE or something or maybe n/a instead of leaving the unavailabe one blank.

Regards
Gerry
Edited 2021-02-27 19:59 by disco4now
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 11:14am 27 Feb 2021
Copy link to clipboard 
Print this post

Hi Gerry,

I am not 100% sure about OPTION VCC.
when I type "option vcc 3.31" at the command line, the command is accepted, but "option list" does not show it. "option vcc 1.2" gives a Vcc too low error. So it does something. But what is the value of this command if you can't read it. "option vcc" alone does not respond with a value set.

Some additional information:

Page 50:
All pins except PA4 and PA5 (the DAC outputs) are 5V tolerant. PA4 and PA5 only accept 3.3V levels.

The red section on page 50 is basically valid, except for 28/44 pin devices. You could rewrite it to use the option vcc command, but most people will add calibration for external circuits anyway.

Tonight I will pull out some test equipment and check the text on page 51 (measuring pulses and counters)

Regards,

Volhout
Edited 2021-02-27 21:16 by Volhout
If nothing goes right ... turn left
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 12:29pm 27 Feb 2021
Copy link to clipboard 
Print this post

I have checked the PWM output.

These PWM's are remarkable fast and accurate, but need some explanation.

The PWM frequency can be set up to 20000000 (20 MHz). However, any duty cycle other than 50% will not be shown on the actual IO pin since the IO pins cannot change state (high to low and low to high) so fast.

The highest PWM frequency that gives good logic levels is 16000000 (16 MHz) at 50% duty cycle.

The useable range on the PWM is up to 1000000 (1MHz), where you can still have 1% accuracy in the PWM values between 4% and 96%. For the 1%..3% range and 97%-100% the pulses are so narrow they may not reach logic levels. Pure limitation of the speed of the logic pins. A claim that 250kHz is 1% accurate over the whole range is correct. But purely due to the limitation of the IO pins, not the PWM itself.

PWM frequency can be set as low as 1Hz, and 50Hz (servo PWM rate is 20ms) works also reliable.

All in all, the PWM text that is on page only needs revision of the limits: 1Hz to 20MHz. The accuracy claims for 25kHz and 250kHz can be left as is.

Regards

Harm

I checked this for all 3 PWM channels, and all 8 outputs.
If nothing goes right ... turn left
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 12:57pm 27 Feb 2021
Copy link to clipboard 
Print this post

Thanks,

I read somewhere that OPTION VCC needs to be in every program and does not show in OPTION LIST ie not permanent. There is information somewhere that tells how calculate the voltage using the reference value added to each chip during manufacture.

Gerry
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 04:32pm 27 Feb 2021
Copy link to clipboard 
Print this post

An awfull long post was not added to the log (time out ?)

So here is the text in short:

Page 51:

counter inputs: work up to 1.8MHz, but at 2MHz the whole system comes to a halt. Serial port is not serviced anymore. I guess this high frequency is eating all CPU cycles. Leave it at Peters recommended "up to 300kHz"

Page 61:
current draw 70mA
logic low < 1.0V
logic high > 2.3V to 3.3V (PA4/PA5) and 2.3V to 5V (others)

analog inputs:
accuracy depends on 3.3V accuracy (my F4 is -1.8%). can be calibrated using OPTION VCC, or basic code. Typically you need to calibrate in basic code anyway to compensate for input circuit.

Timing accuracy:
crystal controlled, worst case 50ppm (0.005%)

PWM
as in previous post 1Hz...20MHz.

count inputs are PE1, PE3, PE4, PA8

com ports: 2400baud....1Mbaud (higher can be set, but function may not be reliable. Strange that 1200 baud is not supported.

I2C: only 100 and 400 supported (kHz)
Edited 2021-02-28 02:37 by Volhout
If nothing goes right ... turn left
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4738
Posted: 05:12pm 27 Feb 2021
Copy link to clipboard 
Print this post

Option VCC is temporary and defaults to 3.3V

There are two functions that can help you calibrate your adc input

PIN(SREF)  this gives the measurement of the internal reference (nominally 1.21V) that ST have burned into the chip during production. This is measured at exactly 3.3V and 25degreeC

PIN(IREF) gives the value of the internal reference as measured in your environment.

Using these together you can calculate the actual voltage the chip is seeing and hence set OPTION VCC
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 706
Posted: 02:13am 28 Feb 2021
Copy link to clipboard 
Print this post

Maybe something that can be added to the manual:

The 5V from USB is passed through R25 which on the cct diagram shows as a fuse but is a 0 ohm resistor on the boards I have. If you want to power the board from a 5V supply and not the USB port you can remove this component or even replace with a diode so that the board can be powered through the pins labelled 5V and still have USB connectivity.

OA47
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 04:32am 28 Feb 2021
Copy link to clipboard 
Print this post

I was wondering about that, I guess most times you get away with it but you could ruin your expensive laptop it you are unlucky. I just replaced R25 with a schottky diode on one board and its gives 4.7 volts to at the 5v pins when power by USB.

I will add you statement to the manual.
Is there a statement about how likely you are to break the USB port if you don't take the precaution, presuming you don't use more then 5.0v for the external supply.
Edited 2021-02-28 14:46 by disco4now
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 561
Posted: 05:30pm 28 Feb 2021
Copy link to clipboard 
Print this post

  matherp said  Option VCC is temporary and defaults to 3.3V

There are two functions that can help you calibrate your adc input

PIN(SREF)  this gives the measurement of the internal reference (nominally 1.21V) that ST have burned into the chip during production. This is measured at exactly 3.3V and 25degreeC

PIN(IREF) gives the value of the internal reference as measured in your environment.

Using these together you can calculate the actual voltage the chip is seeing and hence set OPTION VCC


F4 sample board: cold boot, connected to PC through USB, running Putty
Fluke DMM, measure 3.3V : 3.144V


> ?pin(iref)
1.277289377
> ?pin(sref)
1.277289377
>


Both vales are identical. How can they help ? Should I use 1 of them ?

I can assume 3.3V is actual 3.3 x 1.21 / 1.277289377 = 3.1261V
And then set OPTION VCC 3.1261
If nothing goes right ... turn left
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 03:25am 01 Mar 2021
Copy link to clipboard 
Print this post

Anyone able to verify this is true for larger SDCards. I have a 64GB card from my security camera and I can see files and directories.Its probably FAT32. The text below is basically taken from CMM2 but might apply to F4 as well I am thinking.

SD Card Support

The SDcard is always enabled in the Armmite F4 firmware and no configuration is necessary.
The Armmite F4 has full support for SD cards.  This includes opening files for reading, writing or random access and loading and saving programs.
The firmware will work with cards up to 32 GB formatted in FAT32 and the files created can also be read/written on personal computers running Windows, Linux or the Mac operating system.
MMBasic will also work with cards up to 128GB in capacity. Cards larger than 32GB should be formatted as exFAT and cards 32GB or less formatted as FAT32. Small capacity cards may not be reliable so the smallest recommended size is 8GB formatted as FAT32.

Regards
Gerry
Edited 2021-03-01 13:25 by disco4now
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4738
Posted: 08:01am 01 Mar 2021
Copy link to clipboard 
Print this post

The ArmmiteF4, like the CMM2 supports exFAT for cards over 32Gb. It does not support non standard block sizes (Not 512bytes). However, The FATFS implementation for exFAT is not complete and does not allow thing like relative addressing (../file)
In the CMM2 I have coded round this but it is a huge amount of complex code that I don't intend to put into the ArmmiteF4
NB: exFAT is much slower than FAT32 so you are recommended to use cards of 32GB or less formatted with the standard 512byte block size
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 09:07am 01 Mar 2021
Copy link to clipboard 
Print this post

Thanks
 
morgs67
Newbie

Joined: 10/07/2019
Location: Australia
Posts: 12
Posted: 11:41am 01 Mar 2021
Copy link to clipboard 
Print this post

From the manual-
Embedded Fonts
The Armmite F4 supports embedded fonts. Note that because of the way the fonts are managed you cannot redefine fonts 1 or 6.

I have been using V5.07.00 (various betas) and MM Edit.
When I try to redefine font#7 This error message occurs:
Cannot redefine fonts 1, 6 or 7.
(and it does not work)
This was found when trying out DDS Function Generator V1 Modified for ArmmiteF4 by Peter Mather May 2020.
Changed to use Font #9 instead of #7 and it loaded and ran OK.

Cheers  Tony
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 482
Posted: 10:50am 02 Mar 2021
Copy link to clipboard 
Print this post

Armmite F4 User Manual Draft 2

Attached is draft 2.
I think I have included most of the feedback so far. Thanks everyone.
I still want to add a couple of things but its getting close I think.

I have learned a lot about the F4!



Armmite F4 Manual.pdf

Regards
Gerry
 
     Page 1 of 2    
Print this page
© JAQ Software 2021