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
    2
    Views
    223

    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
  2. Replies
    4
    Views
    718

    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?
  3. 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...
  4. Replies
    14
    Views
    489

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

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

    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...
  6. Replies
    14
    Views
    489

    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...
  7. Replies
    14
    Views
    489

    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?
  8. Replies
    27
    Views
    8,955

    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?
  9. Replies
    14
    Views
    489

    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...
  10. Replies
    5
    Views
    338

    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...
  11. 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...
  12. 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...
  13. 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...
  14. 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....
  15. 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.
  16. 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...
  17. Replies
    2
    Views
    211

    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:...
  18. 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...
  19. Replies
    15
    Views
    509

    "bit mode" not "but mode" :/

    "bit mode" not "but mode" :/
  20. Replies
    2
    Views
    359

    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
  21. 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...
  22. 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...
  23. 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...
  24. 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...
  25. 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...
  26. 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...
  27. 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...
  28. 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...
  29. 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...
  30. 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...
  31. 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...
  32. 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...
  33. 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()...
  34. 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...
  35. Thank you for the response. However, I'm not...

    Thank you for the response. However, I'm not following why you think the Teensy LC would freeze with this program?

    To address the points in your response:

    I don't believe `count` needs to be...
  36. Here's a program that will output the correct...

    Here's a program that will output the correct data onto TX1. It's a good idea to use a different Teensy than the Teensy LC under test because that better tests the real-world conditions.



    //...
  37. Freezing using Serial during a UART ISR on a Teensy LC

    I'm doing my own UART processing and noticed that when doing Serial output during the ISR, the Teensy LC freezes. I'm trying to figure out why this is happening. I've created a contrived example. To...
  38. Replies
    26
    Views
    1,673

    I believe it's `__attribute__((weak))`, like so:...

    I believe it's `__attribute__((weak))`, like so:


    // This is defined so that calling a std::function<void()> can compile when
    // size optimization is enabled. Teensy LC has "Smallest Code" set...
  39. Replies
    26
    Views
    1,673

    Thanks for the explanation. This leads me to...

    Thanks for the explanation.

    This leads me to the next question: if I’m defining it in a library, is it best to mark it with "attribute weak" to avoid potential conflicts with user code? On one...
  40. Replies
    26
    Views
    1,673

    For posterity, here's what I settled on: //...

    For posterity, here's what I settled on:


    // This is defined so that calling a std::function<void()> can compile when
    // size optimization is enabled. Teensy LC has "Smallest Code" set by...
  41. Replies
    26
    Views
    1,673

    Yep, that did it. I changed the optimization...

    Yep, that did it. I changed the optimization option to "faster" and now it compiles. Thanks!

    Side question: Those `__throw_XXX` functions are called even when -fno-exceptions is enabled, is that...
  42. Replies
    26
    Views
    1,673

    I haven't distilled a simple example yet, but...

    I haven't distilled a simple example yet, but I've found a case where Teensy LC is the only one in the family that complains with the following, even with a `nullptr` check:

    ...
  43. Thread: DMXSimple Issues

    by shawn
    Replies
    10
    Views
    2,158

    What does the DMX output look like on a digital...

    What does the DMX output look like on a digital scope? How do the lights behave with one of the other DMX libraries? I wrote TeensyDMX (works on Teensy 4) and I know people have projects with...
  44. Replies
    7
    Views
    1,886

    I have an open source project, TeensyDMX...

    I have an open source project, TeensyDMX, that should do what you need. For simultaneous transmit and receive, you currently need to use two serial ports.
  45. Replies
    26
    Views
    1,673

    Another, std::function-based, example program...

    Another, std::function-based, example program that shows this error.



    #include <functional>

    //namespace std {
    // void __throw_bad_function_call() {
    // // Serial.println("Bad function...
  46. Replies
    7
    Views
    1,523

    TeensyDMX...

    TeensyDMX should be able to handle multiple concurrent universes. If youd like to try it, Im curious how it works for you, if I have to solve any multi-universe problems, etc.
  47. All good points. I'd like to add, for those...

    All good points.

    I'd like to add, for those finding this thread, that it is possible to get a Teensy to behave as an Enttec controller. There are additions and other devices you can emulate, but...
  48. I'm curious, how are you getting MIDI from the...

    I'm curious, how are you getting MIDI from the Teensy into Max/MSP? Do you have a piece of hardware or are you using the USB-as-MIDI feature?

    It's also sounding like you're doing sound processing...
  49. Replies
    1
    Views
    250

    If you wish to try an alternative library, see...

    If you wish to try an alternative library, see https://github.com/ssilverman/TeensyDMX. There are loads of examples and, as long as you choose a TX pin that's attached to one of the serial ports, it...
  50. Replies
    2
    Views
    359

    There's a good chance that the latest release,...

    There's a good chance that the latest release, v4.0.0-alpha.6, is the last alpha release before I merge in the Teensy 4 support ("squashed", of course). I'm pretty happy with the new features and...
Results 1 to 50 of 172
Page 1 of 4 1 2 3 4