pez-globo / pufferfish-software

All software for the Pufferfish ventilator.
Apache License 2.0
0 stars 1 forks source link

Test UART connection between Nucleo board and Raspberry Pi #26

Open ethanjli opened 4 years ago

ethanjli commented 4 years ago

So far, we have been testing the firmware and the backend software by using a USB cable to connect the Nucleo board's on-board ST-Link debugger/programmer to the USB port on a computer such as the Raspberry Pi 4. However, we will actually need to connect the Nucleo board with the Raspberry Pi 4 through the UART pins on the two boards. We should confirm that this is possible by connecting any pair of UART pins from the Nucleo board to any pair of UART pins from the Raspberry Pi 4, and running some sort of software/firmware test to confirm that data is being transmitted across this UART connection.

We might want to wait for #8 to be merged in so that we have a firmware sketch we can upload for this test (in which case we should connect the Nucleo board's pins corresponding to UART6), and we can install the Arduino IDE and use its Serial Monitor for the test. I'm not sure how much configuration will be needed on the Raspberry Pi for this test to be possible.

ethanjli commented 3 years ago

I have confirmed that we can make this work, in https://github.com/pez-globo/pufferfish-software/commit/a81324eb4b35ae8af7aacff3536d0035da904f7d

ethanjli commented 3 years ago

For reference: the backend's Serial port needs to be changed for this to work. Specifically, backend/ventserver/io/_serial.py needs to change the port from /dev/ttyACM0 to /dev/serial0.

ethanjli commented 3 years ago

This has been tested and confirmed to work. No further action needs to be taken, I'm just leaving the issue open as a placeholder for using the UART connection when we migrate to the fully-integrated PCB as the system's control board.

ethanjli commented 3 years ago

(TBD: do we need to add some deploy script configuration to enable the serial port interface in the RPi configuration, or is that already enabled out-of-the-box?)