Page 1 of 1

Controlling RP with SCPI commands over the UART RX Port

Posted: Wed Oct 28, 2020 2:12 pm
by asw
Hello,

I am a newbie to RedPitaya and to Linux systems.

My project:
I want to connect and controll the RedPitaya with my uP over the UART port or over SPI. (I cannot use the Ethernet connection for my application.)
The idea is to change the defined incoming client (default: port 5000 of the Ethernet connection) of the SCPI-server to the UART RX port (or the SPI connection, but I think UART should be easier and fast enough for my application).
Once the SCPI server receives its commands over UART RX, I want to adapt the example "On trigger signal acquisition at RF inputs" (https://redpitaya.readthedocs.io/en/lat ... -exm1.html) so that I transmit the aquired data to my uP over UART TX. The transmition can be done slower and blockwise (I need the sampling rate of 125MHz but the uP can receive the data at a lower speed.)

What I have done:
1. I have generated a UART Output over the Ethernet connection using Linux and checked it with an oscilloscop.
In linux it is the /dev/ttyPS1 device and its rx and tx signals can be found on extension connector E2 (UART_TX, UART_RX).
2. I connected the UART RX and TX ports and checked that the RX reads correctly what the TX sends. (using Linux)

Next steps...
3. Now I have to adapt the scpi-server.c so that it listens to the UART RX line instead of to the Ethernet port. Probably in line 39. (#define LISTEN_PORT 5000)
4. I think I must also somehow start the Uart in the Initialisation after power up.

My problem is that I don't have a clue where to start and how to execute step 3&4.

I'd love some input and am greatful for any help I can get.
Thank you in advance!

ASW