Shop OBEX P1 Docs P2 Docs Learn Events
streamer / wrfast / rdfast / fastspin issue — Parallax Forums

streamer / wrfast / rdfast / fastspin issue

msrobotsmsrobots Posts: 3,709
edited 2019-06-22 08:23 in Propeller 2
Hey @ersmith, here comes another one.

The 'wrapping' version of wrfast / rdfast requires 64 byte boundaries / alignment, or fails.

So we need some 'align64' in addition to 'alignl' aligning to a long dividable by 16 even.

Enjoy!

Mike

Comments

  • cgraceycgracey Posts: 14,153
    msrobots wrote: »
    Hey @ersmith, here comes another one.

    The 'wrapping' version of wrfast / rdfast requires 64 byte boundaries / alignment, or fails.

    So we need some 'align64' in addition to 'alignl' aligning to a long dividable by 16 even.

    Enjoy!

    Mike

    All that is needed is ALIGNL. It can wrap on any long boundary which is the start address of 16n longs.
  • Only the length has to be a multiple of 64, the start address just has to be on a longword boundary. (which is what Chip said above :) ).
  • And it does not have to stream all 64 bytes either.

    (Just checking in)
  • potatohead wrote: »
    And it does not have to stream all 64 bytes either.

    (Just checking in)

    Seems to be not true when using the wrapping feature of wrfast/rdfast.

    Enjoy!

    Mike
  • I have not tried those. Just a reset to intial address, which works mid frame.
  • cgraceycgracey Posts: 14,153
    msrobots wrote: »
    potatohead wrote: »
    And it does not have to stream all 64 bytes either.

    (Just checking in)

    Seems to be not true when using the wrapping feature of wrfast/rdfast.

    Enjoy!

    Mike

    64 bytes is the wrapping granularity.
  • Yes @cgracey , but I had some hard time to changes the base address after first rdfast/wrfast, either I am doing something complete wrong or you can NOT change the rdfast/wrfast while the streamer is still streaming out its current address.

    In fact I had a hard time to change it at all, once set.

    Reverting to ##0 instead of wrapping did not help either, once I set the streamer with either rdfast or wrfast it seems to be locked there.

    My try was to stream out HUB to pins (with a buffer dividable by 64 byte) then switch to another HUB location and stream out the rest, while the receiver COG is continuously reading.

    Did not work at all.

    This is to simulate communication between two P2's running on one P2 with different COG's one streaming out, one streaming in over the same Pins.

    Using the same HUB buffer for both COG's did not work at all, using two HUB buffers, did work but changing rdfast/wrfast failed miserable.

    confused,

    Mike
  • evanhevanh Posts: 15,916
    Mike,
    I like to embed small crafted diag reporting points inline with the critical code to dig out important diagnostic telemetry. There is always useful places to add such data copying snippets that don't/shouldn't upset the real-time behaviour. And if they do upset things then that's some to be investigated in its own right.

    It might involve building a dedicated logging buffer or just a simple use-a-smartpin-as-a-mailbox.
Sign In or Register to comment.