tygamvrelis / oil_lamp

Gimballed oil lantern motion recording & playback
1 stars 0 forks source link

RPi UART #56

Closed tygamvrelis closed 4 years ago

tygamvrelis commented 4 years ago

Is your feature request related to a problem? Please describe. Using USB necessitates cables with rigid connectors. These cause an undesirable form factor for the lamp.

Describe the solution you'd like Would be ideal to directly connect the MCU and RPi via UART.

Timeline Ideally before March 4

Additional information Documented some of the steps for setting up UART on the RPi here. Also, we did extensive testing today to no avail. However, we made important progress. Namely, we were able to transmit UART info out of the RPi successfully (measured on my logic analyzer). The signalling was 3.3 V, as desired. The problem is that we weren't able to get the MCU to receive these transmissions. We tried connecting the TX of the RPi into the RX (and TX) lines of the ST-Link programmer, since this is where we can normally see the USB-to-serial activity.

One guess I have is that the ST-Link programmer is causing a bus conflict with the RPi's UART TX. Unfortunately, we cannot connect the RPi's UART TX into PA3/D0 unless we modify some solder bridges on the bottom of the MCU dev board.

I propose modifying the MCU code to perform PC interfacing over a different UART, e.g. USART6. Unlike USART2, the other UARTs have nothing to do with the ST-Link.

tygamvrelis commented 4 years ago

Tried talking to MCU from the RPi's UART with the MCU using UART6 and it worked!

tygamvrelis commented 4 years ago

Fixed in #57