Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 03:43 29 Mar 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 : PicoMite/PicoMiteVGA V5.07.05 betas

     Page 11 of 11    
Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 02:36pm 03 Sep 2022
Copy link to clipboard 
Print this post

Hi Peter,

I connected a 50Hz square wave to gp8 (source impedance is 10k)

> ?mm.ver
5.070517
> option list
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION DISPLAY 40, 100
OPTION LCDPANEL ILI9341, LANDSCAPE,GP20,GP21,GP22
OPTION SDCARD GP17
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
OPTION RTC AUTO ENABLE
> setpin gp8,fin
> ?pin(gp8)
142
> ?pin(gp8)
96
> ?pin(gp8)
98
> ?pin(gp8)
110
> ?pin(gp8)
100

option audio disable

........causes reboot

> option list
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP14,GP15
OPTION COLOURCODE ON
OPTION DISPLAY 40, 100
OPTION LCDPANEL ILI9341, LANDSCAPE,GP20,GP21,GP22
OPTION SDCARD GP17
OPTION RTC AUTO ENABLE
> setpin gp8,fin
> ?pin(gp8)
50
> ?pin(gp8)
50
> ?pin(gp8)
50
> ?pin(gp8)
50
> ?pin(gp8)
50
> ?pin(gp8)
50



EDIT:

Hi Peter,

Bad wire on the breadboard. One side had nice 50Hz, the other side intermittend (pico side).]

Sorry,

Volhout
Edited 2022-09-04 00:43 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1721
Posted: 07:30am 15 Sep 2022
Copy link to clipboard 
Print this post

A tiny PicoMite incosistency.
Last pin in OPTION COUNT doesn't accept GP number. Works fine otherwise.

> update firmware
PicoMiteVGA MMBasic Version 5.07.05b18
Copyright 2011-2022 Geoff Graham
Copyright 2016-2022 Peter Mather

> option list
OPTION KEYBOARD US
> OPTION SDCARD GP13, GP10, GP11, GP12
> OPTION CPUSPEED 378000
>
> OPTION COUNT gp6, gp7, gp14, gp15
Error : Pin 15 is in use
> OPTION COUNT gp6, gp7, gp14, 20
>
>  option list
OPTION KEYBOARD US
OPTION CPUSPEED (KHz) 378000
OPTION SDCARD GP13, GP10, GP11, GP12
OPTION COUNT GP6,GP7,GP14,GP15
>
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 09:18am 15 Sep 2022
Copy link to clipboard 
Print this post

Thanks - cut-and-paste typo
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5867
Posted: 09:05pm 16 Sep 2022
Copy link to clipboard 
Print this post

A strange tale but true...
I regularly leave picomites running overnight when connected to my powered hub which in turn is connected to my PC.
So far all my picomites have been flashed with the non-VGA versions.

A few days ago, I flashed one with the VGA edition. Next morning, the program that was running had disappeared. Not stopped, but gone.
I repeated the exercise with a new picomite. Same result.

Load a bas program, reboot the PC with the pico plugged in and running and the bas program has gone. Any program saved to a flash slot appears to be safe, but not the one running.
I can see the heartbeat missing a few beats during the PC startup.

This is all with beta18 and a picomiteVGA with no options set and no other devices attached. Windows 11 on the PC.

The non-VGA editions are OK with the same setup.

Jim
VK7JH
MMedit   MMBasic Help
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 08:50am 17 Sep 2022
Copy link to clipboard 
Print this post

Jim

It appears that the USB disconnect is disrupting the DMA on the second processor leading to an invalid address which cause a reset. The firmware automatically wipes the current program in this case to stop the PicoMite getting into a reset loop with no way of breaking out. I'm not sure of what I could do to fix this as it seems to be caused by the USB driver interacting with the DMA
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 03:03pm 17 Sep 2022
Copy link to clipboard 
Print this post

Peter,

Is there anyway to detect that this has happened/is happening ? If you can detect it, you could reload the current program from SD or flash after the wipe.

Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 04:55pm 17 Sep 2022
Copy link to clipboard 
Print this post

  Quote  Is there anyway to detect that this has happened/is happening ?


Not that I can see. It just throws a processor exception that my trap routine picks up. No way to distinguish it from a user "POKEing" something silly
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5867
Posted: 08:42pm 17 Sep 2022
Copy link to clipboard 
Print this post

That darn USB stack has been a pain...
As long as it doesn't happen with the non-VGA version, I am safe.

I will have to test to see how it survives a RPi reboot.

It does survive unplugging the USB, you just have to remember.
Users will soon learn to do backups!

Jim
VK7JH
MMedit   MMBasic Help
 
cosmic frog
Senior Member

Joined: 09/02/2012
Location: United Kingdom
Posts: 277
Posted: 07:16am 18 Sep 2022
Copy link to clipboard 
Print this post

Just having my Picomite connected to my PC as it boots up causes this memory wipe thing to happen. I thought it was just a thing with my PC. I'm using Win 8.1.

Dave.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 06:03pm 19 Sep 2022
Copy link to clipboard 
Print this post

  Quote  Just having my Picomite connected to my PC as it boots up causes this memory wipe thing to happen.


This seems to be some sort of bug in TinyUSB. A workaround is to use a serial console and an external USB/UART (e.g. OPTION SERIAL CONSOLE 1,2)

When the PicoMiteVGA is already powered with the VGA output running (remember this runs on core 1) and the USB CDC connects then it causes a processor hardfault exception on core 0. Originally I assumed the hardfault was on the VGA core but this isn't the case. This only occurs in the VGA version. With a standard Picomite externally powered (not via the USB) you can plug and unplug the USB and there is no effect - a running program keeps running. I'll post a question on the Pico forum but don't expect any joy.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9029
Posted: 04:43am 20 Sep 2022
Copy link to clipboard 
Print this post

I'm currently working on a PM-VGA design, and I have not seen this issue.
Watching this thread with interest.
In my case, I use the SD card to transfer new codes, and the built-in editor to find and squish bugs as I develop the code, so perhaps cos I never plug in a USB cable to the PM module when it is already powered...
I would try that, but I think we all know what would happen, so it is probably pointless.
Smoke makes things work. When the smoke gets out, it stops!
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 06:53am 20 Sep 2022
Copy link to clipboard 
Print this post

I think I may have found a way to circumvent the issue - will post an update when happy
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3422
Posted: 12:17pm 20 Sep 2022
Copy link to clipboard 
Print this post

Peter,

You must be growing grey hair by now on this tinyUSB stack...
And .... you keep finding workarounds around it's flaws...
Super....

Thank you for being here

Harm(Volhout)
PicomiteVGA PETSCII ROBOTS
 
shellberight
Newbie

Joined: 21/05/2022
Location: United States
Posts: 5
Posted: 04:58pm 20 Sep 2022
Copy link to clipboard 
Print this post

I am new to this project, but I was wondering if the new Pico with wifi interface would be supported in some manner?  I was thinking that passing data from a web box to a serial input would be useful.  Thanks
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 05:05pm 20 Sep 2022
Copy link to clipboard 
Print this post

  Quote  I am new to this project, but I was wondering if the new Pico with wifi interface would be supported in some manner?


No: supporting it uses too much memory (RAM and flash) and it is much easier to use a ESP8266 connected to a serial port to achieve the same

Note to all. Please use the release candidate thread for any further comments/bugs
Edited 2022-09-21 03:07 by matherp
 
     Page 11 of 11    
Print this page


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

© JAQ Software 2024