Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:29 03 Aug 2025 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 L4: V5.05.02 - 64 pin support

     Page 2 of 2    
Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6284
Posted: 02:57am 10 Dec 2018
Copy link to clipboard 
Print this post

I can live with the single precision EPOCH. I probably won't live to see 2038 anyway.
But for normal maths, is the L4 single precision floats?
It seems to be.

Also
A bug with FOR NEXT
  Quote   FOR n = 1 TO 10
k% = n +
5000000000
PRINT k%
NEXT n
PRINT
FOR n = 1 TO 10
k% = n
k% = k% +
5000000000
PRINT k%
NEXT n


On the H7 the output is as expected:

5000000001
5000000002
5000000003
5000000004
5000000005
5000000006
5000000007
5000000008
5000000009
5000000010

5000000001
5000000002
5000000003
5000000004
5000000005
5000000006
5000000007
5000000008
5000000009
5000000010


On the L4, n does not get added to k% unless you assign n to an integer first.
5000000000
5000000000
5000000000
5000000000
5000000000
5000000000
5000000000
5000000000
5000000000
5000000000

5000000001
5000000002
5000000003
5000000004
5000000005
5000000006
5000000007
5000000008
5000000009
5000000010


I promise I will spend the rest of the day in the garden chasing a different kind of bug.

Jim
Edited by TassyJim 2018-12-11
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 08:44am 10 Dec 2018
Copy link to clipboard 
Print this post

  Quote  A bug with FOR NEXT


L4 is single precision and behaves exactly the same in your example as an MM2

n+5000000000 is calculated as floats and therefore n disappears below the floating point precision. The fact you then assign to an integer is too late.

H7 is double precision so no problem.

I could make L4 double precision and have tested this but it is slower as it then doesn't use the FP hardware

DP version attached for you to play with - interested in views

2018-12-10_191135_ArmmiteL4.zip

Edited by matherp 2018-12-11
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 949
Posted: 09:55am 10 Dec 2018
Copy link to clipboard 
Print this post

SUPER!
This is very useful for astronomical calculations!

THANKS!!!

Frank
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 10:10am 10 Dec 2018
Copy link to clipboard 
Print this post

  Quote  This is very useful for astronomical calculations!


I've checked the double precision implementation using cdeagle's Solar Eclipse routines and it gives an exactly identical answer. Interestingly, the MM+ software double precision routines have some slight differences.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6284
Posted: 08:05pm 10 Dec 2018
Copy link to clipboard 
Print this post

Most of the time double precision isn't needed.
Most of the time, speed is not really a major problem either.

The problems occur when you try a write code to run on multiple devices and the differences leap up and bite you.

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 07:38pm 11 Dec 2018
Copy link to clipboard 
Print this post

New functionality

2018-12-12_052634_ArmmiteL4.zip



This allows you to create any arbitrary waveform using the L4's inbuilt DACs

The syntax is:

DAC START frequency, DAC1array%() [,DAC2array%()]


DAC1array%() and optional DAC2array%() should contain numbers in the range 0-4095 to suit the 12-bit DACs. The software automatically and separately uses the number of items in each of the arrays to drive the DACs.
The frequency is the rate at which the DACs change value. So in the example code above there are 100 items in the array a%() which are displayed at a frequency of 100,000 Hz giving a sawtooth with a frequency of 100,000/100 = 1000Hz. There are 50 items in the array b%() which are displayed at a frequency of 100,000 Hz giving a reverse sawtooth with a frequency of 100,000/500 = 2000Hz.

The output runs in the background and is stopped using the command

DAC CLOSE


NB: for the moment I have settled on double precision floating point
Edited by matherp 2018-12-13
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6284
Posted: 07:47pm 11 Dec 2018
Copy link to clipboard 
Print this post

Arbitrary waveforms will be very useful.
Thanks for the continued work.

Jim

VK7JH
MMedit
 
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 07:07am 15 Dec 2018
Copy link to clipboard 
Print this post

Hi matherp

I'm trying "CPU SLEEP seconds [, abortpin] " on a some pins with Nucleo L4-32.
But without effect, is this functionality implemented?
Is there a dedicated wakeup pin?
Can You confirm A0 on 48/64 pins?

Edited:
Sorry !! I see now pin definition A0 on 32pin.. thanks

Thanks
AntonioEdited by sagt3k 2018-12-16
 
sagt3k

Guru

Joined: 01/02/2015
Location: Italy
Posts: 313
Posted: 06:24am 18 Dec 2018
Copy link to clipboard 
Print this post

Hi matherp

Apart from the possibility to dialogue with an external memory, the possibility of being able to access an SD/SPI remained or not on STM32L4xx?

Thanks
Antonio
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 08:04am 18 Dec 2018
Copy link to clipboard 
Print this post

  Quote  the possibility of being able to access an SD/SPI remained or not on STM32L4xx?


No, uses too much flash and anyway you can't have both flash drive and SD
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3379
Posted: 05:34pm 29 Jan 2019
Copy link to clipboard 
Print this post

I got the L4 NUCLEO-L452RE-P board--512MB ($15.96 from Digikey). I connected as a usb drive and pasted in the bin file--I think the latest one, dated 2019-01-28.

Connected with puTTY at 38400, hit enter, and got a ">" prompt. So far so good.

I started to type and it froze. I once got as far as PRINT MM.VER and a response of 5.05.06. Reconnecting repeatedly always quickly produced freezes.

Pressing the reset button gave me this:


Am I doing something wrong or is this board not (yet) compatible?

PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 10:30pm 29 Jan 2019
Copy link to clipboard 
Print this post

  Quote  Am I doing something wrong or is this board not (yet) compatible?


Certainly not compatible. The code reads the CHIP ID and uses it to configure RAM and FLASH usage. I don't know what the chip ID of the 452 is and haven't configured for it. Send me a PM with your email address and I'll send you a version of the code with a diagnostic to read the CHIP ID, then I can (hopefully) do some level of auto-configure.

This of course assumes the H/W is basically identical - pinout , clock configuration, memory layout etc.
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 71
Posted: 07:09pm 31 Jan 2019
Copy link to clipboard 
Print this post

any chance of enabling the other two i2c controllers ?
i frequently run out of addresses :)

i'm working on a board layout for the 64 pin versions that can piggyback in a standard breadboard
 
vincenthimpe
Regular Member

Joined: 14/10/2018
Location: United States
Posts: 71
Posted: 10:56pm 03 Feb 2019
Copy link to clipboard 
Print this post

Why no definition for pin 28 (PB2) ?
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10316
Posted: 09:12am 04 Feb 2019
Copy link to clipboard 
Print this post

  Quote  Why no definition for pin 28 (PB2) ?


I'd been using it as a test output - will enable in next release

  Quote  Why no definition for pin 28 (PB2) ?


Sorry not enough flash memory to support a duplicate I2C implementation
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025