Prop2 Flash loader
ozpropdev
Posts: 2,792
in Propeller 2
Hi All
Here's a program to load your code from flash on your P2_ES eval boards.
Simply include your .obj file at the end of the program and it will be stored into the flash along with a loader.
Make sure the "FLASH" switch is on.
Here's a program to load your code from flash on your P2_ES eval boards.
Simply include your .obj file at the end of the program and it will be stored into the flash along with a loader.
Make sure the "FLASH" switch is on.
Comments
This is good. I don't think I've heard anyone officially using flash yet.
Can you tell us how fast it is to boot from flash if you already know or can test it easily, e.g. time from the rising edge of reset to start of small app booting from flash to toggle a pin? I am still waiting to hear if it is slow or fast, and if fast, just how fast.
Roger.
The ROM booter detects the flash and loads 1024 bytes (my loader) into hub.
If the checksum = 'Prop' then the code starts.
My loader then loads the code from flash to hub and then starts it.
It is a little endian format value.
From the docs
I think he was referring to the typo in the comment: 'Proo' instead of 'Prop'
Code is good to go!
I'm way to focused on the PASM I didn't even notice the typo in the comment.
Apologies @pmrobert
Leave off the code that determines "size" and the size long and the objs and then compile.
Then, you append this binary with one long of the obj size and then the obj binary.
Right?
Chip
I ran some test code and here's the results of 8 power cycles reading GETRND. and here's the result og 8 resets.
Looks Ok.
Leave the terminal running, move the WAIT to after send so tx finishes, and add a HUBSET reset to make it repeat indefinitely ...
And data dump attached
It looks okay, doesn't it?
First glance looks great. Probably should do some binning or something ... that's actual work.
I can't test this. First, I set the "Flash" and P95DN switches. Then I load the program using Spin 2 GUI. However, if any of those switches is set, I get a message that it can't find a P2. That, plus the inability to boot from the SD, makes me think that my board is not working correctly.
Kind regards, Samuel Lourenço
No, I don't think that would mean anything. The PRNG is running, being what it is, and we just need to know that it started up with a unique value.
I don't know about the timing of Spin2 GUI, but if you set the flash switch on with the others off, you should be able to download from PNut.
Samuel, it's possible there could be something wrong with your board. We tested every pin on the chip, but we didn't test the flash or the SD socket. If there is anything wrong, it ought to be apparent by visual inspection. Look at the flash and SD card SMT components through a magnifier and see if everything looks okay.
Personally, I had many problems with solder bridges that stay hidden under capacitors and resistors (0805s), when soldering with solder paste and hot air. I'll do an inspection tomorrow and some measurements as well, to see if the switches are having an effect. A simple test I could do is to measure P59 with both of its switches on. If the switches are OK, I should measure around 1.65V there.
By the way, I should mention that I can read the contents of the SD card under TAQOZ (although, I only tried the DIR command). On another note, where can I get PNut?
Kind regards, Samuel Lourenço
The FLASH switch is needed on for all flash ops. Try turning on P59 Up. I can make it program with both P59 Up and Down on together.
I program the flash with both P59 switches off and 'FLASH' on.
After programming I set P69 pulldown on for fast SPI boot.
For all my testing I use Pnut.
Thanks for the tip. I may be able to use it in the ROM Monitor for the next silicon
evan
Here is your code (untested) using...
1. Hopefully a standard method to set the xtal frequency. (note I didn't decode your divide/multiply/divide to get 180MHz)
2. Using the Serial ROM Monitor to display your results.
There are a couple of other tricks that I will put up on the Tricks and Traps thread...
The AND after the GETNIB is not required.
Also the #";" should be #":"
[/quote]
As for the AND, it’s an either GETNIB or AND, not both.
I've tested the switches, and they appear to work correctly. The measured voltages make sense.
Thanks evanh! That worked while programming with Spin 2 GUI. I get the program loaded up and apparently running. P56 blinks, although it doesn't show anything on the terminal yet.
Thanks! That worked well with PNut.
Kind regards, Samuel Lourenço
What could be the issue here?
Kind regards, Samuel Lourenço