Project

General

Profile

L1A L23 Interface » History » Version 9

fixeria, 01/21/2019 04:13 AM

1 8 fixeria
h1. Minimalistic L1CTL interface
2 6 zecke
3 7 fixeria
{{>toc}}
4 1 laforge
5 8 fixeria
This is the description of the minimal interface between L1 and higher layers.
6
Please see 'include/l1ctl_proto.h' for more details.
7 3 laforge
8
h2. Implementation over RS232
9 6 zecke
10 8 fixeria
When we transport the messages of this interface over RS232, we have to consider:
11 6 zecke
12
* multiplexing of L1A<->L23 messages with console/debug messages
13
* bandwidth management
14 3 laforge
15 6 zecke
h3. Multiplexing with console messages
16
17 8 fixeria
Instead of a protocol with a fixed header (including length of payload), we chose a minimalistic subset of HDLC.  This has the advantage that it provides multiplexing between up to 255 different channels, and it is auto-synchronizing, i.e. when data is lost, the next frame start will still be recognized by the other side.
18 3 laforge
19
The minimal subset of HLDC consists of UI frames only, with no CRC.
20 6 zecke
21
h3. Bandwidth management
22
23 9 fixeria
The UART in the Calypso DBB can only run up to 115200bps with standards-compliant baud rates. Higher baud rates are possible (up to 812500bps), but only as non-standard rates. While there are serial chips like FTDI's chip that can support this, regular serial ports and popular PL2303 based cables don't support it. The CP210X based adapters need some additional configuration, see [[HardwareCP210xTutorial]].
24 3 laforge
25 8 fixeria
Therefore, we have to assume that the RS232 link runs at 115200bps:
26 1 laforge
27
* 115200bps means roughly 11,520 characters per second
28
* at a TDMA frame interval of 4.615ms, this means 53 characters per TDMA frame
29
* however, since four TDMA frames are merged into one L1 payload, we have about 212
30
   bytes of RS232 bandwidth for each L1 payload that we receive (260 bits == 32.5 bytes)
31
32 8 fixeria
This means that regular L1A operation on a single dedicated timeslot is very well possible even with lots of overhead for protocol layers, anciliary data as well as a bit of debug output. But it also means that we can not print much debug info from L1 during every TDMA IRQ.
33 1 laforge
34 8 fixeria
Also, actual L1A messaging should have a higher priority than serial console messages. It would be great to have a strict priority between those two in the serial driver layer of the phone software.
Add picture from clipboard (Maximum size: 48.8 MB)