Shop OBEX P1 Docs P2 Docs Learn Events
Need more longs! (aka - Can I page SPIN from high EEPROM?) — Parallax Forums

Need more longs! (aka - Can I page SPIN from high EEPROM?)

__red____red__ Posts: 470
edited 2013-10-29 18:27 in Propeller 1
I have a sneaking suspicion that it's not possible but I have to ask.

Let's say I have three SPIN programs which each take up 12k each. I just need to run each of them in their own cog.

Is it possible to page them from eeprom into hub memory and then execute?

I'm pretty sure the answer is "No" but I needed to ask.

Are there other things you can page in and out of hub memory other than I guess strings and maybe PASM.

Thanks,



Red

Comments

  • localrogerlocalroger Posts: 3,451
    edited 2013-10-29 18:27
    This is actually possible. You can launch a self-contained PASM cog which COGSTOPs all the other cogs, including the one that launched it, loads the new Hub RAM image from high EE, and then cognews an image from that hub image before cogstopping itself. In the obex femtobasic provides an example of doing this. But you lose anything that previously existed in Hub RAM, and there isn't really an easy way to carry data over past the switchover.

    On edit: I see you do want to keep Spin image 1 programs running. That won't work, because when you load image 2 the Spin program from image 1 will be overwritten. You can hold over PASM images that keep running but Spin lives in the Hub and if you reload, you lose the old version.
Sign In or Register to comment.