Shop OBEX P1 Docs P2 Docs Learn Events
Updated jm_fullduplexserial.spin2 For PNut v37, FlexProp, Propeller Tool — Parallax Forums

Updated jm_fullduplexserial.spin2 For PNut v37, FlexProp, Propeller Tool

JonnyMacJonnyMac Posts: 8,957
edited 2022-11-28 21:21 in PASM2/Spin2 (P2)

The latest version of PNut, v37, has a new keyword that collides with a symbol inside jm_fulldupexserial.spin2 (yes, we've been down this road before). I believe that Eric has already made FlexProp compatible with v37, so it may raise its head there, too.

The attached version of jm_fullduplexserial.spin2 changes the conflicting symbol name.

I tested in PNut (v37) and FlexProp (5.9.20). Propeller Tool hasn't folded in the new compiler yet, but you should update your library with this version.

Comments

  • Wondered why Prop Tool had an error today in one program and not another earlier this week. Saved by the forum and Jon again. Now to find all copies to replace.

  • Theoretically, you should only have one copy of jm_fullduplexserial.spin2, and that should be in the Propeller Tool Library folder.

  • Larry MartinLarry Martin Posts: 88
    edited 2023-09-22 16:42

    Hi Jonny, I hope this isn't a dumb question, but the RET statements and _RET_ conditions in your PASM2 are confusing me. Nothing in SPIN2 is calling uart_mgr or uart_main. In this context, is "return" a jump back to org, making an infinite loop? Thank you for all you have contributed.

    Never mind, I see it now. I'll delete this post if I can.

  • JonnyMacJonnyMac Posts: 8,957
    edited 2023-09-22 23:40

    Hi Jonny, I hope this isn't a dumb question, but the RET statements and RET conditions in your PASM2 are confusing me.

    Please don't call me Jonny (I genuinely dislike it -- see my sig line) :)

    Once the PASM is loaded, the top section (uart_main) is a a very small loop. It ping-pongs between the possible RX and TX pins; if active (positive pin #), the handler for the pin will be called. Here's a screencap of the receive section. If nothing is waiting in the RX pin, we jump right back. If there is a byte, we grab it (allows the pin to capture another byte), do clean-up, and write it to recieve buffer. Since there is no conditional requirement for the wrlong (used to update new head index), we can use __ret__ on that line to save an instruction.

    Thank you for all you have contributed.

    You're welcome. I'm happy when others find my bits of code useful.

  • Jon, thank you for answering. I'll try to remember your name preference.

Sign In or Register to comment.