ivogeorg / risc-v-mcu-design-challenge

https://www.hackster.io/contests/hackitriscv
0 stars 0 forks source link

Two dev board passing non-encrypted data back and forth #4

Open ivogeorg opened 2 years ago

ivogeorg commented 2 years ago

Preliminary notes

  1. Since the RF modules are UART connected HC-12, it makes sense to connect the boards via UART.
  2. There are multiple UART (byte transfer) and USART (block transfer) examples for the CH32V307. If not using a block cypher, it makes more sense to transmit over UART.

Resources

  1. The HC-12 UART wireless RF module.
  2. Search on Google.
  3. UART/USART examples for the CH32V307 Github.
  4. ETH examples for the CH32V307 Github.
  5. CH32V307 documentation.
ivogeorg commented 2 years ago

Notes

Interconnectivity device

In the documentation (Ch 1), the V307 is considered an interconnectivity device (and has the most Flash of the whole family 256KB) and has a large number of communication interfaces, including 8 USART/UART ports and Ethernet ports. In this sense, it is ideal for the purpose of creating a cryptobox.

UART/USART examples

Cover the following topics:

  1. DMA
  2. Half-duplex
  3. Hardware flow control
  4. Interrupts
  5. Multi-processor communication
  6. Polling
  7. Printf
  8. Synchronized mode

All examples have similar structure, mostly initialization and a main where the communication happens. Each one is slightly different, depending on the feature being shown. The dev board pins are indicated, but the short description notes for each application are in Chineses. _May have to translate them and pick up some technical vocabulary. For example._

ETH examples

The Ethernet examples are extensive and there is some protocol documentation in the same directory. With Ethernet becoming more and more interesting for communications within space systems, the cryptobox should be designed to connect to the local Ethernet, transmit over UART-->RF, ultimately completing the following data trajectory:

[Space system LAN]-->[Ethernet]-->[Encryption]-->[UART-RF]-->[Transmission]-->[UART-RF]-->[Decryption]-->[Ethernet]-->[Ground station LAN]-->[Internet] [Spacecraft]----------------------------------------------------->[Space]----------------------------------------------------->[Ground station]

Two of the examples even show combined ETH-UART functionality, namely 8_UART_SERVER and ETH_UART. To study.