Shop OBEX P1 Docs P2 Docs Learn Events
What Wired Programming Connection Will the P2 Use on Bootup? — Parallax Forums

What Wired Programming Connection Will the P2 Use on Bootup?

Apologies for the basic question, but how will the P2 be programmed from a PC? Will it look for a serial connection on booting (before resorting to the SPI flash), I mean after a reset or cold boot? I'm sure the answer is "Of course!" and I've no doubt read that on the forum but forgotten the details. I do vaguely recall seeing a pin-out for the proposed chip, but a lot of water has gone over the dam.

I'm updating a P1 project with two PCB's, wherein a first PCB (call it 'A') has a four-pin, 0.1" pitch header for a Prop Plug and passes the signaling and ground (rx/tx/res/vss) to a second PCB (call it 'B') that has a P1 (Prop). In this project, for a wired programming connection, it's not convenient to place the header on the 'B' board (due to physical access being limited). So the Prop Plug header is on the 'A' board. But if I someday update the 'B' board to use a P2 instead of the P1, I'm wondering if I'll have to go back and update the 'A' board again.

Will the P2's ROM allow programming (and flashing) via the current Prop Plug? I realize that there may be wireless SPP options, too. So, I might be able to move programming to the 'B' board (e.g., using a header and WiFi board) if and when I do update it for the P2. But right now, I'm just thinking about a wired connection. So, will a Prop Plug still work with the final P2 silicon? If so, I can probably use the same 'A' board that I'm reworking now.

Also, is there any potential to program the P2 directly from a USB connection without a Prop Plug (or similar USB-to-serial solution) on bootup? I don't believe there are any dedicated USB programming pins for booting on the P2. Will any of the 64 I/O pins have special USB functionality on bootup like P30 & P31 have now for serial? I don't recall reading that, so probably not (though I believe such special bootup functionality does exist for serial loading of/on the P2). I guess one could utilize 2 of the 64 I/O pins for USB programming *after* bootup (presuming a USB driver got loaded into a cog), in which case a Prop Plug or similar wouldn't be needed. So, it might be good for me to add a USB socket and some wiring to my 'A' board whatever the case may be.

Comments

  • RaymanRayman Posts: 13,900
    Direct USB programming seems like a real possibility.
    Somebody would need to buy a vendor ID and product ID though, I think.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2016-05-10 18:34
    Ah, interesting. Yeah, I recall wading through the discussion about vendor/product ID's. And I recall some inquires from Chip. Now with the P2 design nearly completed, perhaps Parallax will try to nail down the particulars about USB (or perhaps they've done so already). But from a code (not licensing) perspective, I wonder if any (potential) USB communications code would be put in the ROM (which isn't that large and can't be changed) or need to be pulled from the SPI flash. Thanks for your reply. And best of luck with all the USB experimentation you've been doing.

    Now if direct USB booting isn't in the cards or not desired for whatever reason, I wonder if the current Prop Plug will work to send a program into the P2 (that could also optionally be flashed, as on the P1). I guess so, but I'm not totally sure. Serial comms being much more straightforward than USB is a given on bootup, I presume, and I guess many serial comm devices/approaches should work, including the Prop Plug (hopefully). I suppose that's obvious to most folks here, but in the microcontroller space I've only programmed the Propeller and a PIC or two.
  • jmgjmg Posts: 15,148
    Apologies for the basic question, but how will the P2 be programmed from a PC? Will it look for a serial connection on booting (before resorting to the SPI flash), I mean after a reset or cold boot? I'm sure the answer is "Of course!"

    I believe it is like this ?
    Serial is supported, with a quick-exit (RxD=L?) if the designer wants faster SPI boot.
    Boot is now fractional, so you can change gears, and get a faster overall load, after the first RC osc ROM code loads the user stub.

    There is likely to be room for USB loader, and if one can be written, it could be included.
    SiLabs have a USB boot loader in appx 1.5k bytes.
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2016-05-11 04:35
    Thanks for those details, jmg. Sounds pretty flexible. About the SiLabs example, that's pretty small, and I recall Chip mentioning that the ROM could be as much as 16K if needed (if not more so). That SiLabs code would be tested code, too, if it were available. But even if it were available, it would need to be reworked quite a bit for the P2 (especially for using the smart pins). However, it certainly suggests that USB is doable with minimal resources. Anyway, the USB functionality of the pins was a late addition that happened while a lot of other stuff was (and still is) going on, so there hasn't been much time to further develop it.
Sign In or Register to comment.