And then, a closeup of the oscilloscope screen:
A blog about my spare time projects in the microcontroller electronics area. My recent projects include a simple PIC-based television remote control and an MP3 player, based on the PIC 18F25J10 and the VS1011 MP3 decoder. Currently I am learning more about the Cortex M3 CPU, developing a simple RTOS running on the STM32 microcontroller.
Saturday, February 13, 2010
Debugging serial device driver with the Jyetech oscilloscope
It's really fun to actually use the home-soldered oscilloscope for something real. In this case I watch the 9600 bps traffic from my STM32 dev board:

And then, a closeup of the oscilloscope screen:
And then, a closeup of the oscilloscope screen:
Friday, February 12, 2010
IPC considerations.
My kernel currently has one message inbox for each process. I am thinking of letting each process have as many inboxes as it desires (possibly limited to 32). That way, a process can have one inbox for high priority messages received from eg. an interrupt handler and another inbox for application IPC.
I ran into these thoughts when writing the USART device driver. I want to have one process in charge for the communication. Sending a message to it transmits the message contents over the wire. However, the process in charge needs to be aware of if the serial port data register is empty. The interrupt handler could, when it has sent the last byte of a message, send a message to the process in charge of communication, to it's "device driver" inbox.
This should be analog to a solution where reading from an inbox can be done, specifying what message types are wanted. The benefit of this solution is that the kernel always returns the first message in the queue, increasing performance. The drawback is that the number of selectable message types (when receiving) will be limited.
I ran into these thoughts when writing the USART device driver. I want to have one process in charge for the communication. Sending a message to it transmits the message contents over the wire. However, the process in charge needs to be aware of if the serial port data register is empty. The interrupt handler could, when it has sent the last byte of a message, send a message to the process in charge of communication, to it's "device driver" inbox.
This should be analog to a solution where reading from an inbox can be done, specifying what message types are wanted. The benefit of this solution is that the kernel always returns the first message in the queue, increasing performance. The drawback is that the number of selectable message types (when receiving) will be limited.
Subscribe to:
Comments (Atom)