Shop OBEX P1 Docs P2 Docs Learn Events
DE0-Nano and DE2-115 add-on boards for Prop2 emulation are ready! - Page 5 — Parallax Forums

DE0-Nano and DE2-115 add-on boards for Prop2 emulation are ready!

1235

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-12 20:23
    COM 9 is the highest port Pnut.exe will use. You can set this in the properties for the connection. I've got instructions in my monitor document here:

    http://forums.parallax.com/attachment.php?attachmentid=98587&d=1357887830

    You should be able to power up the emulation, configure the prop plug, connect a terminal to it, hit a space and see the monitor respond. If that happens Pnut.exe will do it's thing.
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 06:08
    Ok, I think I'm almost there now... Got the jumper on. Programmed the DE0 with the code specific to Chip's board.

    The Prop Tool now identifies as Version 32 over the Prop Plug connection.
    I can use PNut to load the DE0_Nano_Example.spin program and then use an oscope to see the pins toggling.

    So, that all works. What I can't figure out yet is how to get the "Monitor" program working...
    Isn't this supposed to be in ROM and there by default?
    I'm not getting any prompt when I hit enter in a terminal program...
    Tried loading "ROM_Monitor.spin" with PNut and still don't get any response in Chip's or Ariba's terminal.

    I also tried uploading Ariba's Cordic example using has terminal and don't get any response...

    What am I doing wrong?
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 06:17
    I've got some simple questions about this testing with Chip's DE0 board:

    Do any of the examples so far program the SPI flash chip on the board?
    Will the emulator boot from the SPI flash chip?

    Are the 32MB SDRAM, A/D converter, accelerometer and eeprom accessable by the emulator?
  • SapiehaSapieha Posts: 2,964
    edited 2013-03-13 06:26
    Hi Rayman.

    If You still have problems with Monitor --- First Flach need be removed --- Second It is space that start up Monitor by adjusting baud-rate of serial port

    I know that that is enabled on my version of Emulator -- So I think will be on Chip's to.



    Rayman wrote: »
    I've got some simple questions about this testing with Chip's DE0 board:

    Do any of the examples so far program the SPI flash chip on the board?
    Will the emulator boot from the SPI flash chip?

    Are the 32MB SDRAM, A/D converter, accelerometer and eeprom accessable by the emulator?
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-13 07:26
    Yes! That's it. I gotta update the document for the add on boards. Maybe as an addendum, so that it mostly works and requires few edits on the real chip arrival.

    Boot order is serial, SPI, then monitor, assuming security fuse bits are not set.
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 09:25
    How do I remove "Flach"?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-13 09:28
    Rayman wrote: »
    How do I remove "Flach"?
    Flash? It's the only DIP8 on the add-on board.
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 09:46
    Oh... That did it. Removed the flash chip and now I get a response and a prompt with Parallax Serial Terminal.

    I was thinking that we could program the Monitor with PNut and that code, but I guess that code is just the ROM code for reference, not
    meant to be programmed via the PropPlug.

    Now, I'll see if I can get Ariba's cordic code to work...


    BTW: Do we have a way of programming that flash chip? Can it really boot off flash this way?
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 10:00
    I can report on Chip's VGA modes now using a 17" Triview touchscreen VGA monitor (TS17R):
    I think only the 1280x1024 version is working right... The others look very wrong:
    640
    640x480a.jpg
    800
    800x600a.jpg
    1280
    1280x1024a.jpg
    1024 x 768 - 69K
    1024 x 768 - 69K
    1024 x 768 - 57K
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-13 10:18
    Rayman wrote: »
    BTW: Do we have a way of programming that flash chip? Can it really boot of flash this way?
    I assume Chip had a way to program the flash chips since the boards came with a program in flash. That's why you had to pull the chip. I'm not sure if this is a new feature of PNut.exe or if he used some other program to write to the flash chip. I'm going to add flash booting to propeller-load when I get a chance to do more P2 work, probably over the weekend.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-13 10:20
    Chip: If I write a COG image to SPI flash and want it to boot automatically at reset does it have to be signed? If so, how do I accomplish that? Can you post the algorithm needed to sign an image?
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 10:45
    Tried the TV modes on a monster, 15" Coby HDTV (LEDTV1526):

    NTSC seems to work, but there is a lot of space around the edges.
    720p seems to work.
    1080p has some wierd bending at the top of the screen...

    ntsc
    NTSCa.jpg
    720
    720a.jpg
    1080
    1080a.jpg
    1024 x 768 - 73K
    1024 x 768 - 66K
    1024 x 768 - 64K
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-13 11:25
    The space around the edges is perfectly normal. That's the old NTSC "safe area" You can decrease this by changing the cycle count in the border waitvids and adding to the active scan area.
  • RaymanRayman Posts: 14,633
    edited 2013-03-13 11:55
    BTW: I wasn't so sure about how to hook up the component video... Here's what I used:
    DAC3=Y
    DAC2=Pb
    DAC1=Pr
  • cgraceycgracey Posts: 14,151
    edited 2013-03-13 13:22
    Rayman wrote: »
    BTW: I wasn't so sure about how to hook up the component video... Here's what I used:
    DAC3=Y
    DAC2=Pb
    DAC1=Pr

    That's correct.

    Any video anomaly that is being experienced can be fixed with adjusted signal timing. I followed the spec's I found when I made each demo, but I might have made a mistake in implementation or had an incorrect spec. Whatever the case, the signalling can be coded to work universally for each mode.
  • cgraceycgracey Posts: 14,151
    edited 2013-03-13 14:06
    David Betz wrote: »
    Chip: If I write a COG image to SPI flash and want it to boot automatically at reset does it have to be signed? If so, how do I accomplish that? Can you post the algorithm needed to sign an image?

    For the DE0/DE2 Prop2 emulator configurations, you just need to sign the binary with 8 x $00000001, and not the actual HMAC/SHA-256 signature that the silicon will require. This is to make life simpler for now.

    Here is the "programmer" program I've been running to program the flash chip:

    programmer.spin

    It writes a little program to the flash that toggles P1 and P2.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-13 14:31
    cgracey wrote: »
    For the DE0/DE2 Prop2 emulator configurations, you just need to sign the binary with 8 x $00000001, and not the actual HMAC/SHA-256 signature that the silicon will require. This is to make life simpler for now.

    Here is the "programmer" program I've been running to program the flash chip:

    programmer.spin

    It writes a little program to the flash that toggles P1 and P2.
    Thanks Chip!
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-13 16:46
    Nice clear code Chip, thanks for posting it.
    cgracey wrote: »
    For the DE0/DE2 Prop2 emulator configurations, you just need to sign the binary with 8 x $00000001, and not the actual HMAC/SHA-256 signature that the silicon will require. This is to make life simpler for now.

    Here is the "programmer" program I've been running to program the flash chip:

    programmer.spin

    It writes a little program to the flash that toggles P1 and P2.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-03-13 18:22
    potatohead wrote: »
    Yes! That's it. I gotta update the document for the add on boards. Maybe as an addendum, so that it mostly works and requires few edits on the real chip arrival.

    Boot order is serial, SPI, then monitor, assuming security fuse bits are not set.
    If you add a post to the thread with full info, I will provide a link from the first post to it, and brief info. Otherwise, once I have my addon running I will post my instructions.

    BTW My DE0 arrived last night - thanks Chip and tubular. Looks great, fully assembled. Unfortunately out today so cannot try it out yet :(
  • potatoheadpotatohead Posts: 10,261
    edited 2013-03-13 20:19
    Sure!

    It lives here: http://forums.parallax.com/entry.php/1446-Using-The-P2-Monitor-Document-Complete-(for-now)

    I won't get to editing it to deal with the add-on boards until the weekend most likely. If you have anything to share, please do particularly for the NANO as I don't currently have one. I'll put it all in there and post up another revision. What is there is current, minus add on boards, where using the monitor is concerned.
  • RaymanRayman Posts: 14,633
    edited 2013-03-14 12:37
    Can we get at the 32MB SDRAM with Chip's DE0 board?
    Rayman wrote: »
    Are the 32MB SDRAM, A/D converter, accelerometer and eeprom accessable by the emulator?

    BTW: It appears that Chip has 4 pins going to the flash chip, so perhaps that could be an SQI chip.
    If so, that might allow displaying an 8-bit bitmapped image off the flash chip, right?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-14 12:49
    Aren't those four pins just MISO, MOSI, CLK, and CS? There aren't four data lines going to the flash chip are there?
  • RaymanRayman Posts: 14,633
    edited 2013-03-14 13:53
    oh yeah, you're right... :(
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-14 16:50
    cgracey wrote: »
    For the DE0/DE2 Prop2 emulator configurations, you just need to sign the binary with 8 x $00000001, and not the actual HMAC/SHA-256 signature that the silicon will require. This is to make life simpler for now.

    Here is the "programmer" program I've been running to program the flash chip:

    programmer.spin

    It writes a little program to the flash that toggles P1 and P2.
    Hi Chip,

    I've been reading over your programmer code and I don't understand why you have to convert between big-endian and little-endian. Is the COG image assumed to be written to SPI flash in big-endian mode?
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-14 17:17
    David Betz wrote: »
    Hi Chip,

    I've been reading over your programmer code and I don't understand why you have to convert between big-endian and little-endian. Is the COG image assumed to be written to SPI flash in big-endian mode?

    I just noticed that the page at a time programming code won't work on SST25VF080B SPI flash chips. They seem to only be able to program one byte at a time with each 0x02 command. I guess there is no standard for the interface to SPI flash chips. Ugh.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-03-14 17:37
    http://ww1.microchip.com/downloads/en/DeviceDoc/S71296_05.pdf

    Look at the AAI Word programming mode, p.13 ... you can use that command to program a sequence of bytes.
    David Betz wrote: »
    I just noticed that the page at a time programming code won't work on SST25VF080B SPI flash chips. They seem to only be able to program one byte at a time with each 0x02 command. I guess there is no standard for the interface to SPI flash chips. Ugh.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-14 17:49
    http://ww1.microchip.com/downloads/en/DeviceDoc/S71296_05.pdf

    Look at the AAI Word programming mode, p.13 ... you can use that command to program a sequence of bytes.
    Thanks but I was kind of hoping the same code could be used to program both SST and WinBond chips. It looks like that won't be possible. I wonder how many other protocols there are? Who else makes SPI flash chips? I guess we're lucky the read commands seem to work on both chips.
  • cgraceycgracey Posts: 14,151
    edited 2013-03-14 22:43
    Flash chips have somewhat different programming protocols by vendor, but they all read the same with the standard 'read' command.

    The data is stored big-endian because the booter shifts in 32 bits at a time, MSB first, when it loads the boot image.
  • David BetzDavid Betz Posts: 14,516
    edited 2013-03-15 09:42
    BEEP wrote: »
    Thanks! I'll look over that code to see how it compares with what I'm already doing for the P1 when programming SST flash chips.
Sign In or Register to comment.