Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 2 FirstFirst 1 2
Results 26 to 27 of 27

Thread: Freezing using Serial during a UART ISR on a Teensy LC

  1. #26
    Senior Member
    Join Date
    Mar 2017
    Oakland, CA, USA
    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 if there’s incoming valid signal, the peripheral is enabled, and C2_RE and C2_RIE are set. I’ll be testing all other relevant configuration flags I can think of. Maybe other parameters get set incorrectly during this race or something.

  2. #27
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    I believe it was a framing error, you can try doing a search on keywords and see if you find it.

    I still wonder the purpose of all of this exercise? As mentioned several times, it is not recommended to do this. Doing something like moving it to another structure to print later would probably not gain you any performance over simply using the SerialX object and having your main line code to read it out of the already existing FIFO queue. So again sometimes it helps to step back and ask the real question, and ask what it is you are trying to do.

    Also may help to get back to understand what has been tried and what we think we know, like:

    a) You are pretty sure it is not hung in the Serial ISR function. As you turn on the LED when you enter and off when you exit. And if it hung inside the ISR the LED would be left on
    b) likewise you are pretty sure that it is not endlessly calling the ISR as the LED is not flickering. I assume you verified by Scope or LA...
    c) The ISR stops being called... again no LED...

    Now what I don't know are things like, what is the state of other things, like is the main loop continuing to run? If so, I would tend to have a simple timeout or the like, in my main loop, that for example if it has been lets say 5 seconds since my last ISR had been processed, I would print out as much debug information as I can. Example the current values of all of the registers associated with the Serial port and anything else I can think of. ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts