Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 15:02 29 Apr 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 Alpha Firmware

     Page 2 of 17    
Author Message
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 02:28pm 31 May 2021
Copy link to clipboard 
Print this post

  Mixtel90 said  FLASH CHAIN n just retains all variables automatically, apparently. No need to peek & poke.

Cool.
> flash run 1
1  0  1
1  0  2
1  0  3
1  1  1
1  1  2
1  1  3
1  2  1
1  2  2
1  2  3
1  3  1
1  3  2
1  3  3
1  4  1
1  4  2
1  4  3
2  0  1
2  0  2
2  0  3
2  1  1
2  1  2
2  1  3
2  2  1
2  2  2
2  2  3
2  3  1
2  3  2
2  3  3
2  4  1
2  4  2
2  4  3
> flash load 1
> list
' test1.bas
k=k+1
j=0
If k>2 Then End
label:
For i=1 To 3: subb : Next i: Inc j: If j>4 Then Flash chain 2 ' End
GoTo label
Sub subb: Print k;" ";j;" ";i: End Sub
> flash load 2
> list
Flash chain 1
>

k gets incremented with each iteration of the flash 1 code when chained with flash 2.

~
Edited 2021-06-01 00:39 by lizby
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 03:00pm 31 May 2021
Copy link to clipboard 
Print this post

@lizby: I tend to remember that both of us had one F4 that would enumerate (in my case earlier F4 code would, but newer code would not). While others had no problems. And both of us had one F4 that would not work after reflashing. Are we the only 2 that have pi pico's that will not enumerate ?

Maybe there is something on our PC's that (BIOS version ?) that relates to this same issue. Am I making sense, or is this nonsense ?

Volhout
PicomiteVGA PETSCII ROBOTS
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 03:20pm 31 May 2021
Copy link to clipboard 
Print this post

  Volhout said  @lizby: I tend to remember that both of us had one F4 that would enumerate

Yes, I did early on have an F4 which wouldn't enumerate, but subsequently it did and I haven't had problems with F4s since (except the one I maybe just killed somehow). It will be interesting to see if anyone else has the problem with the picoMite.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5729
Posted: 03:37pm 31 May 2021
Copy link to clipboard 
Print this post

A fun way to test FLASH CHAIN n :)


n=2
j=i
do
inc i
print i,
loop until i=j+100
flash chain n


copy into flash 1, 2 & 3 (and more if you feel ike it)
edit each as follows:
n=2 in flash 1
n=3 in flash 2
n=1 in flash 3

and just run whichever you are in at the time. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 04:35pm 31 May 2021
Copy link to clipboard 
Print this post

a5


PicomiteV5.07.00a5.zip


Fixes timer. I'm slowly replacing hack versions of commands with the full versions and cut and paste this one from the wrong source

  Quote  The LED does not blink when I power the board from a charger. Is it related to USB communication ?


This is an important on as it is critical that the device works when not plugged into a computer. It works when I power from a USB Power bank or at least the heartbeat flashes. I would suspect D+ and D- must be in some sort of state so that the USB doesn't block but we can test this properly once we can do something with I/O and autorun to see a program is running when powered without a computer

Jim: can you have a look at XMODEM S. In a5 it works for 9 blocks and then the receiver disconnects. Could be some sort of buffer overrun or automatically inserting LF or ....
Many thanks
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3015
Posted: 04:44pm 31 May 2021
Copy link to clipboard 
Print this post

On a laptop by a different manufacturer, my picomite still doesn't provide a com port unless it is flashed each time it is plugged in.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5729
Posted: 06:38pm 31 May 2021
Copy link to clipboard 
Print this post

Have you tried a different micro usb lead? No idea if this would make a difference, but you never know. lol
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 501
Posted: 09:00pm 31 May 2021
Copy link to clipboard 
Print this post

version A5 on pc works (win 10)  

on an standalone apple phone charger model A1300 led is blinking (works).

blinks also on my powerbank
hope this help
Edited 2021-06-01 07:05 by Plasmamac
Plasma
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 02:40am 01 Jun 2021
Copy link to clipboard 
Print this post

  Quote  Jim: can you have a look at XMODEM S. In a5 it works for 9 blocks and then the receiver disconnects. Could be some sort of buffer overrun or automatically inserting LF or ..

I know I should have tested this direction with a big file!

I can see 2 problems with sending from the pico.
It looks like chr$(0) is getting dropped.
CHR$(10) is getting converted to CHR$(13);chr$(10)

Packet 10 is failing because the receiver is seeing packet number 13 instead of 10 (plus the extra character and checksum mismatch etc)

Transfers will also fail if the checksum happens to be zero.
The first character of the next packet gets seen instead and that will always be  CHR$(1)

Jim
VK7JH
MMedit   MMBasic Help
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 02:50am 01 Jun 2021
Copy link to clipboard 
Print this post

  lizby said  On a laptop by a different manufacturer, my picomite still doesn't provide a com port unless it is flashed each time it is plugged in.


Possibly related.
When I first plugged my pico in with bootloader button pressed, I found that some ports on my USB 7 port hub didn't bring up the new drive. Other ports did work reliably. A 7 port hub will usually have cascaded 4 port hubs and I thing the bad ports were on the cascaded hub. I expect that the pico is going to be rather fussy about USB. I would try different ports if available, especially USB2 in preference to USB3.

At some stage, my USB hub started behaving for all ports.

Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 05:28am 01 Jun 2021
Copy link to clipboard 
Print this post

About crunching the program, I am not sure how we can keep the original program available using the build in editor. In a cmm2 the sd card is the second storage medium. With a pi pico there is only one storage medium. If we can only keep the original program by using an external IDE, like Mmedit, I suggest not to crunch the code.
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 05:33am 01 Jun 2021
Copy link to clipboard 
Print this post

  TassyJim said  
  lizby said  On a laptop by a different manufacturer, my picomite still doesn't provide a com port unless it is flashed each time it is plugged in.


Possibly related.
When I first plugged my pico in with bootloader button pressed, I found that some ports on my USB 7 port hub didn't bring up the new drive. Other ports did work reliably. A 7 port hub will usually have cascaded 4 port hubs and I thing the bad ports were on the cascaded hub. I expect that the pico is going to be rather fussy about USB. I would try different ports if available, especially USB2 in preference to USB3.

At some stage, my USB hub started behaving for all ports.

Jim


That is scary, when things start behaving....it's alive....
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 07:13am 01 Jun 2021
Copy link to clipboard 
Print this post

SD card... it just fits...



PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5729
Posted: 07:48am 01 Jun 2021
Copy link to clipboard 
Print this post

Wow....
We are not worthy!  lol
Nice bit of wiring there. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 5905
Posted: 07:58am 01 Jun 2021
Copy link to clipboard 
Print this post

  TassyJim said  
  lizby said  On a laptop by a different manufacturer, my picomite still doesn't provide a com port unless it is flashed each time it is plugged in.


Possibly related.
When I first plugged my pico in with bootloader button pressed, I found that some ports on my USB 7 port hub didn't bring up the new drive. Other ports did work reliably. A 7 port hub will usually have cascaded 4 port hubs and I thing the bad ports were on the cascaded hub. I expect that the pico is going to be rather fussy about USB. I would try different ports if available, especially USB2 in preference to USB3.

At some stage, my USB hub started behaving for all ports.

Jim


This could be the explanation (taken from the errata in the datasheet).
  Quote  The USB bus RESET state is triggered by the host sending SE0 for 10ms to the device. The USB device
controller requires 800us of idle (J-state) after a bus reset before moving to the CONNECTED state. Without this
idle time, the USB device does not connect and will not receive any packets from the host, and so does not
enumerate.
A device reset happens just after the device is plugged in. Although a host will wait before talking to a reset
device, other devices attached to the same USB hub may also be communicating with the host.
USB 2.0 and USB 3.0 hubs have one or more transaction translators, which facilitate low speed and full
speed transactions on a higher speed bus. It depends on the hub design, but a transaction translator is
usually shared between a few ports.
As the RP2040 USB device is full speed, its traffic when connected to a hub will come via a transaction
translator. This means that if you have another device plugged in next to an RP2040, the RP2040 is likely to
see some messages from the host addressed to the other device. If the device is not very active, for
example, a mouse that is polled every 8ms, this is not a problem. However some devices, such as a USB
serial port, are polled every 30-50us. In this case the bus is very active, and will cause the RP2040 to never
exit RESET state and not connect.
There is a software workaround for this issue (see workaround section). A user can also work around this
by closing the USB serial port or any other offending devices while connecting their RP2040 and then re
opening their USB serial port.
On a larger hub, the problem may be fixed by moving the RP2040 far away (onto a different transaction
translator) from the offending device. For example, connecting the RP2040 to port 1 of a 7 port hub, and
connecting the USB serial console to port 7, may solve the issue. Connecting the RP2040 to a separate USB
hub to any busy devices will also fix the problem.


Jim
VK7JH
MMedit   MMBasic Help
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3532
Posted: 08:02am 01 Jun 2021
Copy link to clipboard 
Print this post

@peter @lizby

I ordered 2 pi pico's. Tested both for the coldboot problem.

Board #1
enumerates correct on version a0 and a1 (29/30 times.. I tested 30 times)
does not enumerate at all on version a2,a3,a4,a5 (*)

Board #2
enumerates well with all versions a0...a5

I tried putting the board in conductive foam to ensure all IO pins are discharged when doing the test: no difference.

The problem:
a/ It is definitely board related
b/ it is definitely software related (version a0 and a1 work)

This makes me believe it is a timing issue, and the first area I would look for is the settling time of the PLL's. Probably on Board #1 the crystal oscillator starts different, the PLL's settle slower, and there is a timeout.

Another thing to look at is the LED. Note, version a2 (that shows the problem) is the first version that has a blinking LED. Maybe in the control of GP25 (LED) has a side effect on GP23 (that controls the power supply).

Peter: Not sure if you can look at the differences between a1 and a2, because there is where the degradation happens.

And maybe it is just that enabling a peripheral in the chip increases ripple on the power supply, slowing down the settling of the PLL.

As I understand the LED should also blink with a charger power supply. There is a direct relation (versions a2,a3,a4,a5) between blinking of the LED, and enumerating on USB. Therefore I think that the CPU does not run at all. Maybe the PLL is not given enough time to settle, the CPU starts to run at 500MHz, it can't, so it stops.

I hope this helps....

Volhout

(*) I tested on a PC where the pi is connected to the root hub.
Edited 2021-06-01 18:06 by Volhout
PicomiteVGA PETSCII ROBOTS
 
matherp
Guru

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

Jim

Thanks for the diagnostic - I've fixed xmodem s

On the difference between a0 to a2, I have changed the way the clock starts up in preparation for UART support. I'll put an extra wait loop in after the clock set up and see if that fixes it. The code is in bits at the moment so I'll post another alpha later today
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5729
Posted: 08:34am 01 Jun 2021
Copy link to clipboard 
Print this post

I've been having a look at what info is available on the web and I can't see anything about pcb revisions for the Pico. The circuit looks pretty straightforward. If there are differences between boards then I can only think of two possible causes - the clock and the buck-boost converter. It might be instructive to see how quickly the 3v3 and 1v1 rails come up.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 1985
Posted: 09:41am 01 Jun 2021
Copy link to clipboard 
Print this post

  Volhout said  SD card... it just fits...


very neat!  

Before acquiring my laser I used to backwire most projects where I was doing one-offs/small runs. I find it quite therapeutic. The netlist from Eagle makes it really easy not to miss anything.
Edited 2021-06-01 19:43 by CaptainBoing
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8583
Posted: 09:54am 01 Jun 2021
Copy link to clipboard 
Print this post

a6


PicomiteV5.07.00a6.zip


Delay on start up. XMODEM S should work
 
     Page 2 of 17    
Print this page
© JAQ Software 2024