Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: pramilo

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Hi Kurt That makes sense. Wasn't aware of that...

    Hi Kurt

    That makes sense. Wasn't aware of that and thank you for clarifying it!
  2. Hi Just a quick update on the instructions...

    Hi

    Just a quick update on the instructions above:

    The instructions UARTx_MODEM |= should always be placed AFTER the Serialx.begin().

    If you place them before Serialx.begin, Teensy appears...
  3. Teensy 3.x UART configured with the PORT_PCR_PFE may limit RX / UART Speed

    Hi

    Upon looking over the Serialx.c code due to a recent issue (posted on this forum), I noticed that at Serial_being, we have RX pin set up as:


    PORT_PCR_PE | PORT_PCR_PS | PORT_PCR_PFE |...
  4. @Kurt, I'm getting off topic here, but I'll be...

    @Kurt, I'm getting off topic here, but I'll be brief:

    From my experience, the loss of ID occurs when you have a brownout (even though ATMEL, the processor in AX-12, claim they have brownout...
  5. @KurtE As a side note, my usage is in Dynamixel...

    @KurtE As a side note, my usage is in Dynamixel compatible devices as well.

    We had never seen this before because we mostly build our communications packet into an array and then use...
  6. 17570 I'm not sure if the above case can be...

    17570

    I'm not sure if the above case can be resolved.
    In the image:

    Channel 0=Output of TX on teensy
    Channel 1=Output of the buffer (trucanted)
    Channel 2=TX Enable from the teensyduino...
  7. Replies
    3
    Views
    218

    Glad to know it's resolved. I made a post on...

    Glad to know it's resolved.

    I made a post on the forum explaining how to get the TxEnable pin to be managed by hardware (by the processor).

    This seems to have resolved a LOT of the problems.
    ...
  8. Using processor-managed transmitterEnable pin for RS485, on Teensy 3.2

    Hi,

    Teensyduino supports the transmitterEnable(pin) on all UARTs for use in applications where you need to signal that Transmission is ongoing. A typical case are RS485 chips but also applies to...
  9. Hi Kurt, Using the global variable is the...

    Hi Kurt,

    Using the global variable is the approach I took.

    It's mostly as you wrote it, plus some corner cases that need dealing with.

    The main issue though is in the ISR. In your code, when...
  10. Hi Kurt There is an upside to calling...

    Hi Kurt

    There is an upside to calling transmit_Assert early on, which is to give the chip enough time to switch to transmission mode.
    Modern chips are almost instant but still...

    I will give...
  11. Interim update: There seem to be 2 separate...

    Interim update:

    There seem to be 2 separate issues, which I coincidentally documented above. (my post #16...
  12. NEXT TEST RESULTS: Test consisted in the same...

    NEXT TEST RESULTS:

    Test consisted in the same approach as before, but now we add the TxEnable pin via Hardware, by means on the TXRTSE flag.

    I added the following code after Serial2.begin(..),...
  13. Kurt, thanks for the proposed solutions. I am...

    Kurt, thanks for the proposed solutions.

    I am taking a step by step incremental approach to go through everything I tried and everything you suggested.

    I have now been able to confirm that TX...
  14. Hi Kurt, What I found so far is that the...

    Hi Kurt,

    What I found so far is that the problem does not seem to be solved by simply hacking serial_putchar or serial_write.

    What I've tried to far was far more comprehensive, because I...
  15. Tomorrow I will be conducting tests using both...

    Tomorrow I will be conducting tests using both the software TransmitEnable and the hardware implemented TransmitEnable that I mentioned, and compare results using a Logic Analyser

    I will also...
  16. Hi Kurt I tried those changes and I also tried...

    Hi Kurt

    I tried those changes and I also tried some other, more aggressive ways to make the operation atomic.

    None of them resolved the issue.

    Hence my post from earlier today.
    ...
  17. Replies
    3
    Views
    218

    Hi I'm not sure if you ever got around to...

    Hi

    I'm not sure if you ever got around to resolving this.

    I myself also encountered problems with the timing of the TX Enable pin. There's a long thread here...
  18. Quick update: Haven't had much luck getting this...

    Quick update: Haven't had much luck getting this to work.

    It appears someone else has reported similar issues before https://forum.pjrc.com/threads/56281-Troubles-with-RS485-between-2-teensy
    ...
  19. Hi I never really got back to this thread as I...

    Hi

    I never really got back to this thread as I was under a significant time constraint during my original posts. I apologize for nor having been able to test the code as requested.
    In this...
  20. Hi Kurt, Good point spotting the place in Red....

    Hi Kurt,

    Good point spotting the place in Red. Hadn't nailed that one down.

    I've been RTFM'ing quite a bit about this; not only the Teensy processor datasheet but especially alternative...
  21. Your take on lines #10-24 makes sense. Thank you...

    Your take on lines #10-24 makes sense. Thank you for clarifying. I'm not enterily familiar with the NVIC in Arm. (I come from Atmel)

    I'm still at a loss regarding the TxEnable pin. The bugfixes I...
  22. Here is sample code that will provoke the...

    Here is sample code that will provoke the malfunction described, on a Teensy 3.2:


    1. #define USB_SERIAL (&Serial)
    2. #define RS485_SERIAL (&Serial1)
    3. #define TTL_SERIAL (&Serial2)
    4.
    5....
  23. Upon thinking about this for a while, this is...

    Upon thinking about this for a while, this is definetely a potential race condition between the TCIE interrupt firing and de-asserting TXEnable while we add a new character to be transmitted:

    Here...
  24. Possible race Condition on Teensy 3.2 Serial when using Transmit Enable pin

    Hi,

    We are using a Dual Tristate buffer to pull the Teensy Serial Output to 5V and to simultaneously create a one Wire communication line (Nexperie 74HC2G125).
    This relies on the Tx Enable pin,...
  25. Hi all, I have now built the code and have...

    Hi all,

    I have now built the code and have been benchmark'ing it:

    --> I left all the constants and the whole Teensy library in its original form. I use send_now() when I wish to send...
  26. Hi Kurt, Thanks for all the advice. Can you...

    Hi Kurt,

    Thanks for all the advice.

    Can you clarify 2 points for me:


    What I've seen, from further experiments is that if you call send_now() (or flush()) and host happens to start...
  27. The source code for the Benchmark is attached. ...

    The source code for the Benchmark is attached.
    FYI: It's written in C#. I tested compiling with VS2015; in theory it should also compile with Mono under Linux but I haven't gotten around to testing...
  28. I did try to use that with a timer. Code below: ...

    I did try to use that with a timer. Code below:

    #define USB_FLUSH_TIMEOUT_MICROS 500 // tested with 1000 as well

    uint32_t last_usb_flush;
    void setup()
    {
    Serial.begin(10000);...
  29. Hi all Once again than you all for your...

    Hi all

    Once again than you all for your advice.

    I have built a benchmark suite and have actual values and findings to share.

    The setup: as I explained earlier, this is a master-slave setup,...
  30. Thank you all for the advice. I will try to...

    Thank you all for the advice.

    I will try to gather data in a presentable way and hopefully post back with some performance measurements using the Teensy LC, for future reference.
  31. Thanks for pointing that out. I've looked at...

    Thanks for pointing that out.

    I've looked at the actual implementation of Serial.flush() - function usb_serial_flush_output(void) in file usb_serial.c and it seems to rely on usb_tx()

    Glancing...
  32. I understand that. That's why we're looking to...

    I understand that. That's why we're looking to use a Teensy as a USB to Serial device in our setup (to replace the FTDI).
    Hence the questions about improving code efficiency.



    Is there a...
  33. Well.... I'll try to answer the best I can bc the...

    Well.... I'll try to answer the best I can bc the issue is not just plain latency. So more details:

    We are running a master-slave setup at 1Mbps baud, where the master (in this case the PC, via...
  34. Using Teensy Libraries without Arduino/Maximum USB performance

    Hi all,

    I am starting work on a project where I will be using a Teensy LC to act as a USB to Serial converter with a twist: the Teensy LC will need to intercept and tweak communication for the...
  35. I have now been able to get a more clear...

    I have now been able to get a more clear undersatding of what is gong on in my case.

    Before I continue I have determined my versions: Arduino 1.0.6 and Teensyduino 1.25. I know these date far back...
  36. Thank you for the advice. I will look into your...

    Thank you for the advice.
    I will look into your advice and post more information.
  37. Hi Paul, I missed your other posts after this...

    Hi Paul,

    I missed your other posts after this one as I was not in the office Friday and basing myself on your timing.

    In any case, I have the screenshot now.

    Feel free to address this as you...
  38. A Google Search (as I don't have equipment with...

    A Google Search (as I don't have equipment with me) has shown a few related posts:

    https://freescale.jiveon.com/thread/388930
    https://community.nxp.com/thread/312294
    (I'm a bit at a loss if this...
  39. Hi Paul, Thank you very much for taking the...

    Hi Paul,

    Thank you very much for taking the time to look into this.
    I would gladly send you a screenshot of the Logic Analyser as a picture's worth a thousand words but I'm not at the Office...
  40. Let me add that the code above still doesn't...

    Let me add that the code above still doesn't fully resolve the issue;

    I've now added the interrupts for ORIE and FEIE (interrupts for both exceptions) but the UART still halts after a FE, despite...
  41. Teensy 3.2 UART halts (locks up) if a Framing Error or Buffer Ovr Occurs

    Hi

    I'm using Teensy 3.2 and we're doing a long term project with teensy.

    We've recently come across a situation that's not handled by the Teensiduino library we use and causes de UART to stop...
  42. Hi Kurt, I ended up going the road of writing...

    Hi Kurt,

    I ended up going the road of writing my own bit banged Serial Library to just cope with this. ATMEL AVR305 and 304 (bot mostly 305) application notes have a very good explanation and...
  43. 100microsecs hard delay on first transmit of USB character (Teensy 3.2, USBSERIAL)

    Hi

    We've been working on a time sensitive application where we need to react every 25 microsecs (should be easy enough for T3.2 @96Mhz).

    We were having occasions where we the processor would...
  44. Good point. I'll give it a try and let you know....

    Good point. I'll give it a try and let you know.
    ( I don't have high hopes though, bc teensy is actually timing correctly; I think this is more of an issue of the other device, but it's definetly...
  45. Hi Kurt, Thank you for your reply. I have...

    Hi Kurt,

    Thank you for your reply.

    I have been using Teensy's half duplex uart capability for quite a while, using the LOOPS mode as well. In my case I have modified the serial1.c and serial2.c...
  46. UART: coping with hosts not honoring start bit timings

    Hi all,

    We're using teensy 3.2 to work as a bridge to upgrade a slave device connected to it over serial (one wire/half duplex uart). The slave device has a one wire bootloader (tinysafeboot) and...
  47. Replies
    1
    Views
    1,386

    Using Interrupts on Teensy 3.1

    Hi all

    (Preliminary note: there is an answer to a similar topic on the main PJRC site but it only applies to ATMEL processors I believe (https://www.pjrc.com/teensy/interrupts.html), so I have...
  48. Replies
    12
    Views
    6,797

    Hi all Although it may seem I'm reviving this...

    Hi all

    Although it may seem I'm reviving this old thread, the question at hand is actually quite pertinent.

    We are building our boards using Teensy 3.2 and using our own programmed interface to...
  49. eeprom_read_* functions: address parameter of different sizes ??? (byte/word/dword)

    Hi

    I've been using the direct implementation of the eeprom_read_* and eeprom_write_* functions.

    However, the functions have a strange design/declaration that seems to limit the addresses on...
  50. I see. It makes a lot of sense :) thank you for...

    I see. It makes a lot of sense :) thank you for clarifying this.

    You probably know your customer base a lot better than me but I get the feeling a lot of "pro" developers tend to move to teensy...
Results 1 to 50 of 60
Page 1 of 2 1 2