No announcement yet.

Customizing UART Receive Interrupts

  • Filter
  • Time
  • Show
Clear All
new posts

  • Customizing UART Receive Interrupts

    A feature I would love to see in SNAP/Portal is the ability to completely write your own UART receive interrupt handler. Currently, the UART receives bytes into a string buffer in the interrupt handler behind the scenes and the data is passed to the stdinEvent handler as a string upon either of the buffer timeouts being reached, the string buffer being full, or the receipt of a LF/CR character.

    Since the data is being read and stored behind the scenes, this limits the level of "per-character" processing we can do in script, such as checking for a frame error upon each received byte (the frame error bit state becomes invalid once the received byte has been read from the buffer).

    It would be nice to be able to write a function which triggers upon every UART interrupt, in which I can store and read the frame bit state prior to reading the received byte from the UART receive buffer.

    Any chance on implementing this in a future release?

  • #2
    On a related topic, the ability to segregate data from different uarts would be INVALUABLE.

    Right now, it's pretty much impossible to sensibly receive data on both uarts simultaneously.