How does the application initialize the UART connection? What is the UART
speed and configuration? How is this different from earlier uses when you
output data using printf
?
Change the application such that it reacts immediate on key presses and
changing the output mode of the OLED accordingly. Instead of using a polled
character read function, you will have to use interrupts. Look at the UART
driver in drivers/mms_uart
to find out how to subscribe to
interrupt events, and how to configure the driver for interrupt driven
communication. In addition, you will have to change the switch
block for the new behavior. Instead of busy looping and delaying code
execution, you should check for a new display mode every now and then in order
to react to key presses. Note that you don't have to check for a change of
state after every operation. Human reaction time is around 100 ms. Thus, if you
react to a key press within that time, we can't really differentiate if it was
immediate or not.
Identify the peripheral to which each signal belongs.
Signal Name | Pin Number | Breakout Name | Peripheral Name |
---|---|---|---|
MISO | E3 | F0 | |
MOSI | F3 | F1 | |
SCK | G4 | F2 | |
CS | H5 | F3 | |
RX | H6 | F4 | |
TX | J6 | F5 | |
SDA | B22 | F6 | |
SCL | C22 | F7 |
Using the different logic analyzer capabilities answer the following questions for the different serial protocols. Make sure you measure average transfer rates over a significant amount of time, not just over one transfer (e.g. 100ms to 1 second).
The UART uses 8 bit data. Answer the following questions using the logic analyzer.
Give at least two potential improvements in order to speed up transfer on all the serial protocols.
You may work with a partner for this assignment.
During the next lab, show that your radio transmits messages. We will have a
receiver station connected to one of the stations which will log all the
source addresses. In order to not have the same source address as another
group, choose a random uint16_t
number and set it in your
main.c
as the SRC_ADDRESS
define. This will allow
you to identify and differentiate your messages from other groups.
Submit a compressed file for each of your SoftConsole workbenches for the
Interrupt Driven UART Communication (name it
oledSoftware_uniquename1_uniquename2.{rar,zip,7z,bz}
) and the
CoreSPI driver for the radio (name it
cc2520_uniquename1_uniquename2.{rar,zip,7z,bz}
). The workbenches
should be fully configured with build targets and your code should compile.
Send both compressed files to eecs373@gmail.com with the subject
f10-lab6:uniquename1,uniquename2. Hand in your answers from the
questions asked during the lab. You can use the following Answer Sheet. Before handing your solution in,
show your application to a lab staff and get a signature on your title page.