Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:27 10 May 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 H7: Full release & documentation

     Page 3 of 13    
Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9483
Posted: 06:00am 25 Sep 2018
Copy link to clipboard 
Print this post

5000ms pause generates the same error.
Smoke makes things work. When the smoke gets out, it stops!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6219
Posted: 06:07am 25 Sep 2018
Copy link to clipboard 
Print this post

Try this modified program:
  Quote  
OPTION DEFAULT NONE
OPTION EXPLICIT

OPTION AUTORUN ON
SETPIN 7,DIN ' user button
SETPIN 137,DOUT ' Blue LED
SETPIN 75,DOUT ' Red LED
SETPIN 46,DOUT ' Green LED

DO
PIN(46) = 1
PAUSE 200
PIN(137) = 1
PAUSE 200
PIN(75) = 1
PAUSE 200

PIN(46)= 0
PAUSE 200
PIN(137) = 0
PAUSE 200
PIN(75) = 0
IF PIN(7) = 1 THEN EXIT DO
LOOP

PIN(46)= 0
PIN(137) = 0
PIN(75) = 0
END

It uses DIN instead of INTH.
You have to hold your paw on the button long enough because I only test once per cycle.

It does mean you can use pin 7 as an input when using autorun but not as an interrupt.

Jim
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 06:19am 25 Sep 2018
Copy link to clipboard 
Print this post

I tried it like that initially, BTW "option autorun on" should not be in the listing, that was a mistake by me when posting.

Changing from pin 7 to another pin makes no difference. Exactly the same error.

I also just had a total lock-up, MM.edit was transferring the small file when it lost the connection, after that it would fail to do any transfer of a program and totally loose the connection, managed to catch an error about failing to erase. After that nothing I could do would allow MM.Edit to connect - full reboot of the PC and all.

So I tried typing NEW in Tera Term and it bought up an error "failed to erase flash memory"

Had to reprogram the dam chip to get it to work again - something strange going on here?


NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 06:27am 25 Sep 2018
Copy link to clipboard 
Print this post

Could someone load ST-LINK and do a target file compare with memory, there is a block in red that is different, all 0 instead of F, BTW I did a full chip erase before re loading the Hex file. Perhaps it's normal but I would like to be sure.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6219
Posted: 06:42am 25 Sep 2018
Copy link to clipboard 
Print this post

  Quote  16:38:41 : [Armmite1.3.hex] opened successfully.
Address Ranges [0x08000000 0x08000298] [0x080002A0 0x080A60C4]
16:38:41 : [Armmite1.3.hex] checksum : 0x026008FE
16:39:18 : 1st difference found @: 0x08020000
All the different data blocks are red colored.

There is the one block as you describe so I wouldn't worry about that.

How are you powering it? I have external power.

Jim
VK7JH
MMedit
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9483
Posted: 06:47am 25 Sep 2018
Copy link to clipboard 
Print this post

Jim - your code works.

Only problem is, that now CTRL-C won't stop it, and reset just autoruns the code again, and now there is no way to stop the running code.

I had to hold the USER button and press RESET to get the ARM-mite back again.

With a simple do/loop code and AUTORUN ON, I get the same problem - you can't CTRL-C break the running program, and the only option is a full reset via the USER and RESET buttons - which completely wipes the program in memory, so this is a bit of a problem.

...unless CTRL-C does not work in the ARM-mite?

Smoke makes things work. When the smoke gets out, it stops!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 06:56am 25 Sep 2018
Copy link to clipboard 
Print this post

Thanks Jim, that is the same as mine, Grogster, that was the initial problem.

BTW just powering it via USB at the moment, heavy duty USB cable and the ports on the PC are high current, above normal spec. I'm going to do more tomorrow, very tired and sore at the moment so just on the laptop in the house for the evening.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9483
Posted: 07:00am 25 Sep 2018
Copy link to clipboard 
Print this post

Yes, you are right - you did mention that at the top of this page. Sorry, my eyes must have skipped over that bit. However, we are both seeing the same problems, so that is a good thing, as it means it is not your board or computer etc.
Smoke makes things work. When the smoke gets out, it stops!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 07:16am 25 Sep 2018
Copy link to clipboard 
Print this post

Yes, nice to have others willing to test so quickly. Fortunately I have two boards but I'm leaving one in it's virgin state until I get everything running, very handy to compare.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6219
Posted: 07:29am 25 Sep 2018
Copy link to clipboard 
Print this post

Grogster,
You could have stopped my code by holding down the user button long enough.
I agree that not being able to ctrl-C to stop is not good.
One for Peter who is going to be pleased that there are now a lot more testers!

Jim
VK7JH
MMedit
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 08:13am 25 Sep 2018
Copy link to clipboard 
Print this post

Thanks for the testing and feedback.

I'll make a change so that OPTION AUTORUN give an error if included in a program. It does a write to 128kBytes of flash whenever you change an option which takes time and could cause all sorts of issues so it is better if I block it.

Ctrl-C works perfectly when autorun is on - the program aborts as requested.

BUT it then runs from the beginning again

This may be tricky to fix as the code appears to be correct so there is something different about the STM32 that I haven't understood. I'll fix this once I understand it. In the meantime testing a pin and then exiting is a good workround.Edited by matherp 2018-09-26
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 08:29am 25 Sep 2018
Copy link to clipboard 
Print this post

It's a shame there is no way to make Ctrl-C turn Autorun off, I've had issues in the past with the MM-100 in some cases.

Thanks for the great work you are doing - I'm not worried about spending lots of time testing before I get to put it to some real use, it will be worth it in the end and nothing compared to your work time and knowledge needed in coding and porting this.

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 09:17am 25 Sep 2018
Copy link to clipboard 
Print this post

OK found it - try this

2018-09-25_191711_Armmite1.3.zip
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 10:08am 25 Sep 2018
Copy link to clipboard 
Print this post


SetPin 7,inth,aa1
SetPin 137,dout

Do
Pause 1000
Pin(137) = 0
Pause 1000
Pin(137) = 1
Loop

Sub aa1
Print "end"
End
End Sub


why does autorun cause an error on restart but the program runs fine when run is typed at the prompt.

error is label not found.

Mike
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 10:29am 25 Sep 2018
Copy link to clipboard 
Print this post

  Quote  why does autorun cause an error on restart but the program runs fine when run is typed at the prompt.


In technical jargon it is called:

a bug

Try this:

2018-09-25_202858_Armmite1.3.zip

 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1828
Posted: 10:36am 25 Sep 2018
Copy link to clipboard 
Print this post

Thanks, I'll download the new version in the morning.


NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9483
Posted: 11:59am 25 Sep 2018
Copy link to clipboard 
Print this post

While playing around with the ARMmite tonight, I find that the editor does odd things quite often. As you are typing, it will suddenly move to the next line and you typing continues. If you try to backspace, the cursor does not move, but typing another character moves the cursor along. Pressing F1 to save works, but then the code is corrupted if you go back into the editor.

I am using Rob's GFXterm. It might be the problem. I will try with TeraTerm tomorrow, and also update to the latest you posted here.

Has anyone else with an ARMmite seen that kind of odd behaviour in the editor?

I am treating the ARMmite as an Alpha release at this stage, so I know there will be bugs to chase.

But you have created a very powerful MM, Pete!
Smoke makes things work. When the smoke gets out, it stops!
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 12:35pm 25 Sep 2018
Copy link to clipboard 
Print this post

Hello Peter, hope you are well.
2018-09-25_223439_code.zip
I have been playing with the ARMmite for a day and I left a bit of code running just to exercise it and it throws an "out of memory" error on a Function define line, as shown below:


> RUN
946685842 01-01-2000 00:17:22
946685843 01-01-2000 00:17:23
946685844 01-01-2000 00:17:24
946685845 01-01-2000 00:17:25
...
946685962 01-01-2000 00:19:22
946685963 01-01-2000 00:19:23
946685964 01-01-2000 00:19:24
[218] Function Now(opt As Integer) As string ' d$ is a dummy string to make the function syntax work nicely
Error: Not enough memory
>


seems to run for around two minutes each time.

Code is attached

anything you need me to do please say.

regards

h

 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10066
Posted: 01:46pm 25 Sep 2018
Copy link to clipboard 
Print this post

  Quote  it throws an "out of memory" error on a Function define line, as shown below:


Oops: One optimisation too far

Please find attached V5.04.31 which rolls up the various bugs found since 5.04.30

2018-09-25_234603_Armmite1.3.zip

STILL NOT CORRECT, MORE WORK REQUIRED - COMPILER BUG!!!Edited by matherp 2018-09-27
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2139
Posted: 02:55pm 25 Sep 2018
Copy link to clipboard 
Print this post

Hi Peter.

same error at the same spot - sorry.

always on the 1020th attempt if that helps, odd because it isn't doing anything spectacular.



The below is simply a tight loop to print the Now() return value, no delay


...
01-01-2000 00:19:44
01-01-2000 00:19:44
01-01-2000 00:19:44
01-01-2000 00:19:44
[219] Function Now(opt As Integer) As string
Error: Not enough memory

>


I have pared the code right back to just the following:



do
Print now()
loop

Function Now(opt As Integer) As string
If opt=0 Then
Now=Date$+" "+Time$
Else
Now=Right$(Date$,4)+Mid$(Date$,3,4)+Left$(Date$,2)+" "+Time$
EndIf
End Function

 
     Page 3 of 13    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025