Shop OBEX P1 Docs P2 Docs Learn Events
Spin Tools IDE - Page 23 — Parallax Forums

Spin Tools IDE

1171819202123»

Comments

  • @wummi said:
    Hi maca,
    The upload with MacOS 15 is still not running:
    I look at the sources at GitHub and found the problem.
    in "spin-tools/spin-tools/src/com/maccasoft/propeller/devices/SerialComPort.java"
    in function "public void hwreset(Control control, int delay)"
    at line " serialPort.purgePort(SerialPort.PURGE_TXCLEAR | SerialPort.PURGE_RXCLEAR);" is the problem.
    The function "SerialPort.PURGE_TXCLEAR" need 500ms to execute on MacOS 15
    The function "SerialPort.PURGE_RXCLEAR" need not mutch time to execute
    "SerialPort.PURGE_TXCLEAR" is not necessary at this time, you can delete it.

    Uwe

    Is this something that varies for different OS versions ?

    I'm wondering if an "advanced setting" is required, to allow a user to override the TXCLEAR and RXCLEAR settings; hopefully that would allow all current (and future) MacOS variants to operate, without stomping on the settings for other OS users ?

    I remember going through a similar thing when adding the P2 WiFi programming code to the Parallax WiFi module. I can't recall the details, but do remember we had to settle on a compromise delay to suit the masses-which didn't seem obvious from a Windows standpoint, and was tricky for me as I didn't have a Mac at that time!

  • The 500ms Delay is on macOS 15 only.
    I think the TXCLEAR is not necessary at this Place.
    Or we can also change the order, first executive TXCLEAR / RXCLEAR and then toggle DTR to reset the Propeller.
    I think this will run on all Platforms and all macOS Versions.

  • maccamacca Posts: 870

    @wummi said:
    The function "SerialPort.PURGE_TXCLEAR" need 500ms to execute on MacOS 15
    The function "SerialPort.PURGE_RXCLEAR" need not mutch time to execute
    "SerialPort.PURGE_TXCLEAR" is not necessary at this time, you can delete it.

    Ahhhh... can't believe it was that... thanks for looking at it.

    @VonSzarvas said:
    Is this something that varies for different OS versions ?

    I'm wondering if an "advanced setting" is required, to allow a user to override the TXCLEAR and RXCLEAR settings; hopefully that would allow all current (and future) MacOS variants to operate, without stomping on the settings for other OS users ?

    I'll do some tests but I don't think it needs any special setting. The TXCLEAR was added just to be safe but at that point the tx buffer is clear anyway.

    @wummi said:
    Or we can also change the order, first executive TXCLEAR / RXCLEAR and then toggle DTR to reset the Propeller.

    RXCLEAR is needed AFTER the reset toggle because when the Propeller is in the reset state the TX pin may float and the PC side may receive garbage preventing the upload to work correctly. This is mostly necessary for P1 that has a bit "weird" upload protocol, the P2 is bit more immune (if I'm not wrong, recent Edge boards have a pull-up on the RX/TX pins) but still better clear the input buffer anyway.

    The TXCLEAR may be issued before the reset toggle, but I don't think it is necessary.

    I'll do a new release tomorrow so I can fix an issue with the Raspberry Pi OS that I forgot to fix (actually I tought I have fixed sometime ago...).

  • I do some more Tests:
    1. DTR=ON --> DTR=OFF --> RXCLEAR --> TXCLEAR : do not work
    2. RXCLEAR --> TXCLEAR -> DTR=ON --> DTR=OFF : do work. First Reset Pulse is 1000ms long after open the Port, all next are short.
    3. DTR=ON --> RXCLEAR --> TXCLEAR --> DTR=OFF : do work. First Reset Pulse is 1000ms long after open the Port, all next are 500ms long.
    4. DTR=ON --> DTR=OFF --> RXCLEAR : do work. First Reset Pulse is 500ms long after open the Port, all next are short.
    5. DTR=ON --> RXCLEAR --> DTR=OFF : do work. First Reset Pulse is 500ms long after open the Port, all next are short.

    You can use #2 to #5, and I think this will also work on Windows and Linux.

    Uwe

Sign In or Register to comment.