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

Search:

Type: Posts; User: shawn

Page 1 of 4 1 2 3 4

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,078

    Ok, I think I understand what's going on, now....

    Ok, I think I understand what's going on, now. @luni that link helped, thanks.
    [Update 2 text fix: The "println" should be "printf" in here: "(It can also come after the `println`"]


    Fact: The...
  2. Replies
    6
    Views
    1,078

    I'll add another interesting detail: The code...

    I'll add another interesting detail: The code compiles and operates fine for Teensy 3 with the Teensyduino IDE but not with PlatformIO. With PlatformIO, it complains of the missing `_write`. Maybe...
  3. Replies
    6
    Views
    1,078

    I should add: This works for Teensy 4 compilation...

    I should add: This works for Teensy 4 compilation but not for earlier versions, as the original poster stated about the unresolved reference to `_write`.
  4. Replies
    6
    Views
    1,078

    I wanted this same behaviour and found that this...

    I wanted this same behaviour and found that this works for me, to replace `stdout`:


    stdout = fwopen(&Serial, [](void *cookie, const char *buf, int count) {
    return reinterpret_cast<Print...
  5. Replies
    0
    Views
    93

    How to: FastLED with TeensyDMX

    [Thanks, Mr. Spolsky for the inspiration here: https://forum.pjrc.com/threads/63231-FastLED-with-Teensy-4-1-fast-parallel-DMA-output-on-any-pin]

    Maybe some will find this useful. I've attached a...
  6. Thanks, @PaulS. I just released TeensyDMX v4.1.0...

    Thanks, @PaulS. I just released TeensyDMX v4.1.0 and it works fine on the Teensy 4. I tested send, receive, and RDM. It should also be able to retransmit as you wish, per your question above.
    ...
  7. Replies
    17
    Views
    1,254

    I just released TeensyDMX v4.1.0:...

    I just released TeensyDMX v4.1.0: https://github.com/ssilverman/TeensyDMX/releases/tag/v4.1.0

    Changes since v4.1.0-beta.2:

    7- and 9-bit format support when using serial parameters to...
  8. Replies
    3
    Views
    202

    Check out some of the examples with TeensyDMX....

    Check out some of the examples with TeensyDMX. It’s accessible through the Arduino IDE (or Teensyduino); just search for “TeensyDMX” in the Library Manager (v4.1.0-beta.2 is the current, but v4.1.0...
  9. Replies
    17
    Views
    1,254

    Released TeensyDMX v4.1.0-beta.2 with a few...

    Released TeensyDMX v4.1.0-beta.2 with a few fixes: https://github.com/ssilverman/TeensyDMX/releases/tag/v4.1.0-beta.2

    The changes:

    Fixed NativeEthernet interoperability by changing from a...
  10. Replies
    17
    Views
    1,254

    I’m also about to release a new version that’s...

    I’m also about to release a new version that’s more interoperable with those libraries that use IntervalTimer.
  11. Replies
    17
    Views
    1,254

    The answer to the challenge is that STAT is a...

    The answer to the challenge is that STAT is a 32-bit register. Changing to uint32_t fixed the problem.
  12. Replies
    17
    Views
    1,254

    I believe I've found the problem. @Chendy, would...

    I believe I've found the problem. @Chendy, would you mind trying out the new 4.1.0-beta.1 release?

    The changes in this release:

    Detection for packets that are too long
    This fix
    Some README...
  13. Replies
    17
    Views
    1,254

    I'm still working at it. I'm having some trouble...

    I'm still working at it. I'm having some trouble figuring out what's different between v4.0.0 and v4.1.0-beta in terms of what gets executed in the serial IRQ. The only thing that I can see thus far...
  14. Replies
    17
    Views
    1,254

    Hi, Chendy. Thanks for using the software. I was...

    Hi, Chendy. Thanks for using the software. I was testing with a Teensy 4 today and it looks like receive is broken (well, at least for Serial3). I thought my latest change that altered the structure...
  15. Replies
    17
    Views
    1,254

    I just drafted a new release, v4.1.0-beta...

    I just drafted a new release, v4.1.0-beta. It contains some major code changes where much of the #define-based code was replaced with code that's much more maintainable. If those that use the library...
  16. Replies
    17
    Views
    1,254

    I added Serial8 support for Teensy 4.1 in this...

    I added Serial8 support for Teensy 4.1 in this branch: https://github.com/ssilverman/TeensyDMX/tree/teensy41-serial8

    I'm going to let it marinate before committing to the main branch.
  17. Replies
    2
    Views
    426

    TeensyDMX works on Teensy 4.0 too. Are you...

    TeensyDMX works on Teensy 4.0 too. Are you referring to this one? https://github.com/ssilverman/TeensyDMX
  18. Replies
    4
    Views
    907

    I’ve tested...

    I’ve tested https://github.com/ssilverman/TeensyDMX on a Teensy 4.0. Let me know if that library works for you instead.

    Have you modified the BasicReceive example to fit what you need?
  19. Thanks, @luni, for trying this out. I had to step...

    Thanks, @luni, for trying this out. I had to step away for a little while because it was frustrating. You're right that the program doesn't restart, but it does restart after it restarts with the...
  20. Replies
    14
    Views
    865

    According to https://www.pjrc.com/teensy/ the...

    According to https://www.pjrc.com/teensy/ the Teensy 2 pins are 5 volt.
  21. Replies
    14
    Views
    865

    All you said was that the "USB port is in use"...

    All you said was that the "USB port is in use" and not "connected to the game". Don't forget you're asking questions of overly-detailed (well, I can only speak for myself here) engineers. I didn't...
  22. Replies
    14
    Views
    865

    Ah, I understand now. You’re using the USB port...

    Ah, I understand now. You’re using the USB port as the game controller connection. That wasn’t immediately clear to me because there’s several other ways it could have been physically connected. Many...
  23. Replies
    14
    Views
    865

    Yep. I misunderstood your question. Thanks for...

    Yep. I misunderstood your question. Thanks for clarifying. Curious, what is the Teensy connected to via USB? Is it a situation where you could use a USB hub?
  24. Replies
    27
    Views
    10,092

    I’m happy to have a look. Can you provide a...

    I’m happy to have a look. Can you provide a sketch that will reproduce this issue? Also, which Teensy and which version of TeensyDMX are you using?
  25. Replies
    14
    Views
    865

    The Teensy behaves as a proper USB serial device...

    The Teensy behaves as a proper USB serial device and doesn't need an adapter or converter. See this: https://www.pjrc.com/teensy/td_serial.html

    Your computer should just see it connected as a comm...
  26. Replies
    5
    Views
    653

    It’s possible to have the Teensy emulate any of...

    It’s possible to have the Teensy emulate any of the DMX USB serial devices (eg. DMX USB Pro). As long as the software can find or be told the correct comm port (or device on OSX or Linux), then it...
  27. Okay, I've found a much smaller program that...

    Okay, I've found a much smaller program that reproduces the issue. There's no DMX, no external libraries, no buffers to overflow, and no dynamic memory allocation.

    Run the program, notice the LED...
  28. So here's what I've found so far. When I read or...

    So here's what I've found so far. When I read or check availability from `Serial`, the program crashes/restarts. When I use an `elapsedMillis` timer to change the mode instead, it does not crash. A...
  29. Well, this issue exists all the way back to...

    Well, this issue exists all the way back to v2.0.0 of the library. Humbug. At least the code base is simpler for trying to debug this or find a cause. :)

    Note that I've tried on Teensyduino v1.48...
  30. My process today is going to be bisecting through...

    My process today is going to be bisecting through all the git commits to see where it fails. Thank heavens for git. You’re probably right that it’s not Serial, but I’d like to think it’s a clue....
  31. Update: I adjusted the program so that it only...

    Update: I adjusted the program so that it only does Serial input. There’s no Serial output calls. I still see the spontaneous crash/restart.
  32. Thanks for having a look. I see the same crash...

    Thanks for having a look.

    I see the same crash even if I don't use `unique_ptr`. Also, when it crashes, `Serial` output can no longer be trusted without a power cycle or program button reset (and...
  33. Replies
    2
    Views
    381

    Here’s some code I’ve been playing with to be a...

    Here’s some code I’ve been playing with to be a nice API for accessing bit-band regions, but also compile down to minimal instructions:...
  34. Weird program restart, and then Serial doesn't output until button or power cycle

    I'd love some help diagnosing this weird issue. It's one of those cases where commenting out code that should have nothing to do with the error makes the code work, but uncommenting it makes the...
  35. Replies
    15
    Views
    939

    "bit mode" not "but mode" :/

    "bit mode" not "but mode" :/
  36. Replies
    17
    Views
    1,254

    I've released a beta version. Any questions,...

    I've released a beta version. Any questions, suggestions, and feedback welcome.

    The link: https://github.com/ssilverman/TeensyDMX
  37. In the interests of adding further explanation,...

    In the interests of adding further explanation, here's why I was getting so-called RDRF notifications "after one character time". I wasn't. It was simply the IDLE condition firing too. RDRF doesn't...
  38. Experimenting with inlined bit-band access functions

    Inspired by `digitalReadFast` and `digitalWriteFast` and how they can compile to just one instruction, I wanted to see if it was possible to access and change the bit-band memory regions using code...
  39. Interesting. Do you have a link to the thread? ...

    Interesting. Do you have a link to the thread?

    I’m also looking into EventResponder.

    I’m pretty familiar with lots of the MCU UART spec, but I haven’t yet found why RDRF interrupts are halted...
  40. Thanks for the reminders about interrupt priority...

    Thanks for the reminders about interrupt priority divisions.

    Experimentation aside, I'd still like to understand what must happen for an ISR to stop getting called just because there's a race...
  41. Ah, I see. Do you think priority levels are the...

    Ah, I see. Do you think priority levels are the main issue causing any races? Maybe I can pursue changing the UART priority (or change the USB priority, whichever is lower to whichever is higher). Is...
  42. Thank you for the suggestion. Here's the...

    Thank you for the suggestion. Here's the optimization results:

    Smallest: ISR stops, Serial output stops
    Debug: ISR stops, Serial output stops
    Fastest: Serial output stops, ISR does not stop...
  43. Some more information: In `loop()`, I toggle a...

    Some more information:
    In `loop()`, I toggle a monitor pin depending on the state of the UART's RDRF flag. I see pulses in normal operation, but when the ISR is no longer getting called, I don't see...
  44. This is exactly my question. I have no idea what...

    This is exactly my question. I have no idea what is stalling the UART. I know when it stalls, but not why. So: What is stalling the UART? Your statement that I "check for the error condition or...
  45. Experimentation update: I've tried other ways...

    Experimentation update:

    I've tried other ways to atomically check and reset `latch`; ISR still stops receiving: __disable_irq()/__enable_irq(), ATOMIC_BLOCK, and nothing (non-atomic). This tells...
  46. I'm verifying that the ISR no longer gets called...

    I'm verifying that the ISR no longer gets called when the freeze happens by toggling the LED in that function instead of in `loop()`:


    const bool isUART0 = (&hwSerial == &Serial1);

    // The UART...
  47. Experimenting with `Serial.availableForWrite()`,...

    Experimenting with `Serial.availableForWrite()`, the program can run much longer and the output looks like it appears much faster. The program still freezes, but after many more bytes (most of the...
  48. I was thinking that something like priority...

    I was thinking that something like priority inversion might be happening. Good point about what `serial_putchar` does. I'll go explore that...
    Also great point about checking...
  49. First, I'm not using `loop()` in my main program....

    First, I'm not using `loop()` in my main program. It's not relevant here and unrelated to 250kbaud, or any baud rate, for that matter. loop()/second isn't related to my question. In addition, loop()...
  50. I’m still unclear what’s causing it to freeze on...

    I’m still unclear what’s causing it to freeze on an LC but not on a 3.2. Your points do make sense, but they don’t address the main question.

    The "real program" doesn’t actually Serial print this...
Results 1 to 50 of 190
Page 1 of 4 1 2 3 4