Remember that there is a timeout in Chip's booter which puts the p2 to sleep after a minute or so. Reset it and type the three keys for greater than, space, escape.
You'll have to substitute your serial port device. I found it interesting that the port identifier begins with "P2". Is that intentional or just a coincidence?
So if I want some other frequency I would just adjust _XMUL proportionately, correct? So if I want 80MHz I would use a value of 72*80/180 = 32. Are the the hubset instructions necessary, or could I just do "hubset ##_ENAFREQ", and skip the other two hubsets?
The crystal frequency is 20MHz. Divide it by the value you set in _XDIV, then multiply up using _XMUL. Chip recommends this be >=50MHz. I don't recall the max but presume it's something like 360MHz. Then you divide this by _XDIVP so I just divide by 2 but for overclocking we will likely only be able to use 1.
Originally I started with the P2D2 at 12MHz and divided by 24 to give 0.5MHz then multiplied by 297 to give 148.5 MHz and final divide by 1. This gave jitter so Chip recommended 12 / 4 = 3MHz * 99 = 297MHz / 2 = 148.5MHz and this was rock solid.
Yes, the setup requires the 3 hubset and the delays. That PASM routine doesn't require changing for changes in clock frequency - just change the constants.
Note the setup is for an oscillator not a crystal.
Postedit: Since the P2-ES uses a crystal, I edited the above setup to use a 15pF crystal which is as close to the 9pF crystal as we can get
This is the above program compiled with pnut to P2ES-EVAL-Demo-002.obj and renamed "_BOOT_P2.BIX" (case sensitive) and copied to a formatted FAT32 microSD card. The card is then inserted into the P2-EVAL board and plugged in to USB/Power and PST run on the PC. No switches require changing on the hardware. The program will automatically boot/run from the SD card
Note: You will need to remove the .txt from the filename as the forum will not allow uploads with .BIX
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
dbl check... do you have the dipswitch set right for SD boot? Switch settings table in both the docs and schematic files.
Dipswitch set for SD only. I get the splash screen, (not displayed on normal bootup). And then it's just zzzzz's.
Can't enter TAQOZ with the proper keys.
It's Christmas! Nobody take time to evaluate this today. Enjoy it with your families.
Seems Oscillator is generic, with P2 Eval having oscillator, of type Crystal.
Will ask the editor if that can be rephrased to remove any doubt.
Yes, the MCU semantics are usually Oscillator means external powered unit, even tho a Crystal is strictly creating an oscillator using the internal Amplifier on P2
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
dbl check... do you have the dipswitch set right for SD boot? Switch settings table in both the docs and schematic files.
The SD card provides the pullup. There is no switch setting necessary (and there isn't one for SD anyway). Once a file has been loaded, that's it. The new file has taken over the P2!
Here are the monitor.debug commands that you can enter interactively
ROM_Booter_v32i.spin2
=====================
''-----------------------------------------------------------------------------------------------
'' MONITOR LMM DEBUGGER - SUPPORTED COMMANDS
''-----------------------------------------------------------------------------------------------
'' xxxxxx : xx xx xx xx ... <cr> DOWNLOAD: to cog/lut/hub {addr1} following {byte(s)}
'' xxxxxx - [xxxxxx] [L] <cr> MEM LIST: from cog/lut/hub {addr1} to < {addr2} L=longs
'' xxxxxx G <cr> GOTO: to cog/lut/hub {addr1}
'' FC000 G <cr> will perform a reboot
'' Q <cr> QUIT: Quit Rom Monitor and return to the User Program
'' {addr} is on the stack
'' Lfilename.xxx<cr> LOAD: Load file from SD (8.3 filename)
'' returns "=" on success, "!" on failure
'' Rfilename.xxx<cr> RUN: Run file from SD (8.3 filename)
'' returns "!" on failure
'' <esc><cr> TAQOZ: goto TAQOZ
'' <cr> will repeat last MEM LIST command
''-----------------------------------------------------------------------------------------------
So, for example
0-<cr>
will dump from cog $0 (one line)
0-ff<cr>
will dump cog $0 to cog $FF
while
0000-<cr>
will dump from hub $0000 (one line) Note: the use of more than 3 char addresses, or >3FF determines hub instead of cog/lut
You'll have to substitute your serial port device. I found it interesting that the port identifier begins with "P2". Is that intentional or just a coincidence?
David,
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
You'll have to substitute your serial port device. I found it interesting that the port identifier begins with "P2". Is that intentional or just a coincidence?
David,
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
Tom
You will probably need to change the com port allocated to a lower port between 0-7 to get it to work on W7.
IIRC you need to open control panel, go to devices, go to COM ports, and r-click a=on COM9 and change it. Google is your friend.
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
dbl check... do you have the dipswitch set right for SD boot? Switch settings table in both the docs and schematic files.
Dipswitch set for SD only. I get the splash screen, (not displayed on normal bootup). And then it's just zzzzz's.
Can't enter TAQOZ with the proper keys.
It's Christmas! Nobody take time to evaluate this today. Enjoy it with your families.
Yes. You will need to reboot your board.
The code has loaded from SD and is now running. No way to stop it w/o reset or download. You'll need to remove the SD card if you don't want the same result. Just like a P1 when loading code from EEPROM
You'll have to substitute your serial port device. I found it interesting that the port identifier begins with "P2". Is that intentional or just a coincidence?
David,
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
Tom
That's odd. I wonder why it worked for me? I'm using a Mac and it sounds like you're using Windows but I'm not sure why that would make a difference. I built fastspin and loadp2 myself by downloading the code from GitHub. Did you do that or did you use a precompiled version? If so, maybe your version is old?
You'll have to substitute your serial port device. I found it interesting that the port identifier begins with "P2". Is that intentional or just a coincidence?
David,
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
Tom
That's odd. I wonder why it worked for me? I'm using a Mac and it sounds like you're using Windows but I'm not sure why that would make a difference. I built fastspin and loadp2 myself by downloading the code from GitHub. Did you do that or did you use a precompiled version? If so, maybe your version is old?
David, I used the precompiled versions in the latest spin2gui bin folder.
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
This is the above program compiled with pnut to P2ES-EVAL-Demo-002.obj and renamed "_BOOT_P2.BIX" (case sensitive) and copied to a formatted FAT32 microSD card. The card is then inserted into the P2-EVAL board and plugged in to USB/Power and PST run on the PC. No switches require changing on the hardware. The program will automatically boot/run from the SD card
Note: You will need to remove the .txt from the filename as the forum will not allow uploads with .BIX
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
Boot SD is supposed to do what it says, load a compiled P2 program and execute it. The demo program just displays a text string, and then loops sending z every second. Nothing more, nothing less
Now you can put your own program (renamed) on the SD and it will load and run from power up.
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
I had the same experience on Win10.
I think a board is on the way to Eric. I'm sure he'll have these issues sorted out shortly after it arrives.
I've been using FastSpin with loadp2.exe
Just tried with eval board and it still works.
@Rayman,
It seems strange that they work for some people and not for others. I guess that trying to establish a base line might be a good start. So:
1. What OS are you using?
3. What COM port was the P2ES?
2. What version of FastSpin and loadp2 are you using?
3. Where did you get them (links please)?
4. What is the source language of your code (spin2/p2asm, basic, c)?
5. Are you using command line or spin2gui?
6. If command line, what was the command string?
7. If spin2gui, what was the configuration?
If there's anything else you think is important, please add it.
I appreciate your help,
Tom
Comments
Maybe this will work for TAQOZ (haven't checked it)
Just type SCAN and hopefully it will work. You can even put a delay after loop to hold it at the end of each scan.
Peter,
I have been working with the P2 for about an hour. I still haven't figured out how to boot TAQOZ -- looking forward to playing with it.
Merry Christmas from Hollywood!
Jon
Please list the steps that you used to compile & load. I'm pretty inexperienced with using command line programs.
Thanks
Tom
As coincidental as P2 Eval, Engineering Sample
Originally I started with the P2D2 at 12MHz and divided by 24 to give 0.5MHz then multiplied by 297 to give 148.5 MHz and final divide by 1. This gave jitter so Chip recommended 12 / 4 = 3MHz * 99 = 297MHz / 2 = 148.5MHz and this was rock solid.
Yes, the setup requires the 3 hubset and the delays. That PASM routine doesn't require changing for changes in clock frequency - just change the constants.
Note the setup is for an oscillator not a crystal.
Postedit: Since the P2-ES uses a crystal, I edited the above setup to use a 15pF crystal which is as close to the 9pF crystal as we can get
This is the exact part used on P2-EVAL:
Epson : TSX-3225 20.0000MF20G-AC3
https://en.m.wikipedia.org/wiki/Crystal_oscillator
Seems Oscillator is generic, with P2 Eval having oscillator, of type Crystal.
Will ask the editor if that can be rephrased to remove any doubt.
Like zappman, I get zzzzz.. in PST. What to do after that? I can enter TAQOS fine without the SD inserted. What is the Boot SD supposed to do?
dbl check... do you have the dipswitch set right for SD boot? Switch settings table in both the docs and schematic files.
Dipswitch set for SD only. I get the splash screen, (not displayed on normal bootup). And then it's just zzzzz's.
Can't enter TAQOZ with the proper keys.
It's Christmas! Nobody take time to evaluate this today. Enjoy it with your families.
The SD card provides the pullup. There is no switch setting necessary (and there isn't one for SD anyway). Once a file has been loaded, that's it. The new file has taken over the P2!
Now, if you go to this post you will see the call options for the monitor/debugger which performs a similar function to FDX serial
forums.parallax.com/discussion/comment/1447021/#Comment_1447021
Here are the monitor.debug commands that you can enter interactively
So, for example
0-<cr>
will dump from cog $0 (one line)
0-ff<cr>
will dump cog $0 to cog $FF
while
0000-<cr>
will dump from hub $0000 (one line)
Note: the use of more than 3 char addresses, or >3FF determines hub instead of cog/lut
David,
Thanks for the information. Unfortunately I was not able to get it to work from either spin2gui or using the fastspin and loadp2 from the command line. Spin2GUI appeared to load ok (blue lights flashed, but then nothing happened. From the command line, fastspin compiled, but when I tried loadp2 -pCOM9 the same thing happened.
I was able to get the program to load & run using pnut.
By the way I am using Windows 7 OS
Tom
You will probably need to change the com port allocated to a lower port between 0-7 to get it to work on W7.
IIRC you need to open control panel, go to devices, go to COM ports, and r-click a=on COM9 and change it. Google is your friend.
Yes. You will need to reboot your board.
The code has loaded from SD and is now running. No way to stop it w/o reset or download. You'll need to remove the SD card if you don't want the same result. Just like a P1 when loading code from EEPROM
Tom
Boot SD is supposed to do what it says, load a compiled P2 program and execute it. The demo program just displays a text string, and then loops sending z every second. Nothing more, nothing less
Now you can put your own program (renamed) on the SD and it will load and run from power up.
Just tried with eval board and it still works.
@Rayman,
It seems strange that they work for some people and not for others. I guess that trying to establish a base line might be a good start. So:
1. What OS are you using?
3. What COM port was the P2ES?
2. What version of FastSpin and loadp2 are you using?
3. Where did you get them (links please)?
4. What is the source language of your code (spin2/p2asm, basic, c)?
5. Are you using command line or spin2gui?
6. If command line, what was the command string?
7. If spin2gui, what was the configuration?
If there's anything else you think is important, please add it.
I appreciate your help,
Tom
Win10
COM7
fastSpin version 3.9.12 https://github.com/totalspectrum/spin2cpp/releases/download/v3.9.12/fastspin.zip
loadp2 version 0.005 http://forums.parallax.com/discussion/download/122835/p2gcc004.zip
It's basically command line, called from my SpinEdit program
Compile command line: somehow my source file has a .spin2.spin2 extension
Load command line: