2 Replies Latest reply on Sep 26, 2012 12:25 PM by mziwisky

    Do SoftUARTs interrupt cores?


      I'm working on a UART driver for my SCC OS.  I have a simple synchronous driver, but would like to make it asynchronous.  The driver on the SCC side interacts with minicom on the MCPC (minicom -d crbif0rb0c0ttyS0).  My question is, when characters are sent from MCPC to SCC via a crbif0rb0c[...] driver, is an interrupt sent to the receiving core?  If so, how can it be retrieved/handled?  I.e., what is the vector number?




        • 1. Re: Do SoftUARTs interrupt cores?

          Hi Mike,


          sorry, but the virtual UARTs do not send interrupts to the SCC cores. They can only be used in polling mode. The SCC Linux kernel contains a patch that sets the irq numbers for the well-known serial ports (i.e., "COM1" to "COM4") to zero, which causes the driver to register a timer callback and poll the port's status register.


          The reason I implemented it this way is that, back with sccKit 1.3.0, there was no global interrupt controller and also no means to assert a core interrupts with a single write packet. I would have needed to perform a read-modify-write cycle, but that can easily lead to locked-up interrupts if another core was modifying the register at the same time. A possible solution would have been to use the lock registers for both inter-core-interrupts and MCPC-to-core-interrupts, but at the expense of locking out RCCE (no pun intended). In the end, I went for the only stable solution I could think of: not using interrupts at all.


          Do you absolutely need the VUARTs to issue interrupts? We could most likely migrate the whole setup (including Linux' UART driver) to use the global interrupt controller... But given that it works quite well under Linux so far, I haven't given it much thought yet.




          • 2. Re: Do SoftUARTs interrupt cores?

            Hi Jane-Arne,


            OK, thanks for the explanation.  Polling has worked fine for me too.  I don't need the interrupts.  Making an asynchronous device would be a "bonus," but really an insignificant one for my purposes.