Commit Graph

645 Commits

Author SHA1 Message Date
Harald Welte 3e7861e937 Add and use gsmtime scheduler to L1S 2010-03-01 23:48:44 +01:00
Harald Welte ea718cc991 Add new one-shot gsmtime scheduler
Using sched_gsmtime, we can schedule a couple of one-shot items at
GSM frame numbers in the future.  This is useful for e.g. scheduling
RACH bursts.
2010-03-01 23:48:44 +01:00
Harald Welte 023289de74 Layer1 Sync support for TX of Normal Burst and RACH burst
Using the new rach_sched_set_ul and nb_sched_set_ul TDMA scheduler
sets it is possible to transmit RACH bursts as well as sets of four
normal bursts, i.e. everything needed to get a SDCCH established
on a combined CCCH (with SDCCH/4).

Known Limitations:
* Uses constant transmit power (2 dBm)
* Only works on SDCCH/4 so far
* SACCH is received but cannot be transmitted yet
* TSC (traning sequence code) is hard-coded to '7'
2010-03-01 23:48:44 +01:00
Harald Welte 59b128a679 layer1/sync: Add msgb queues for transmit/uplink to l1s data structure 2010-03-01 23:48:44 +01:00
Harald Welte 330fe01d80 Uplink: Use TPU window driven model
This means we can even send and receive in the same TDMA frame,
provided we keep the usual 3 timeslot distance between DL and UL.
2010-03-01 23:48:44 +01:00
Harald Welte 5f446da36d TRF6151: Add new trf6151_tx_window() function
This function takes care of starting a Tx (Uplink) window
2010-03-01 23:48:44 +01:00
Harald Welte 9b7afc615e twl3025: fix typo 2010-03-01 23:48:44 +01:00
Harald Welte cc02fa61b5 TWL3025: add default APC ramp 2010-03-01 23:48:44 +01:00
Harald Welte 81cd75e38c move macros to where they belong 2010-03-01 23:48:44 +01:00
Harald Welte d520c7e4cf layer1/tpu_window.c support for Uplink/Tx
* introduce l1s_tx_win_ctrl() function

This only controls the ABB window, and not the TRF and RFFE window yet
2010-03-01 23:48:44 +01:00
Harald Welte 59265bcae1 Prepare DSP functions needed for Uplink (Tx)
* Tell DSP to properly initialize ABB(TWL3025) registers at first DSP interrupt
* Initialize the entire API RAM to zero on dsp_power_on()
* Tell DSP to initialize the APCRAM to all-zero to preven accidential Tx
* Set number of GUARD bits to 8
* Add function to configure TCH parameters: dsp_load_tch_param()
2010-03-01 23:48:43 +01:00
Harald Welte dea01c5393 Compal RFFE suport for Upplink (PA enable) 2010-03-01 23:48:43 +01:00
Harald Welte 1327bbd6fd TRF6151: add Uplink support 2010-03-01 23:48:43 +01:00
Harald Welte 32da71ef5c TWL3025: Add uplink enable/disable function 2010-03-01 23:48:43 +01:00
Harald Welte 649793bf04 add msgb_l1() and msgb_l1len() inline functions 2010-03-01 23:44:23 +01:00
Harald Welte e03b8de3d4 ensure osmocom-bb builds with older gcc-3.x based toolchains 2010-02-28 20:01:47 +01:00
Harald Welte 60298c9141 ensure we always have 256bytes net data size, excluding 4 bytes headroom 2010-02-28 17:53:43 +01:00
Harald Welte ca9f6eea61 Use new multiframe scheduler for scheduling of normal bursts 2010-02-28 10:15:35 +01:00
Harald Welte b909a3b8a6 Add multiframe-level scheduler (mframe_sched.[ch])
This scheduler enables us to schedule repeating events that occur
every multiframe.  It e.g. includes definitions for BCCH and CCCH
reading.

The mframe_sched is layered on top of the tdma_sched.
2010-02-28 10:12:14 +01:00
Harald Welte 89e05fd346 tdma_sched: Explicitly advance the bucket at end of l1_sync() 2010-02-28 10:06:19 +01:00
Harald Welte c468741500 explicitly terminate the TDMA scheduler set with SCHED_END_SET()
This has the advantage that any caller or other reference does not
need to know the size of the set, which makes it simpler to use the
sched_set as a constant initializer in some other const/static data
structure.
2010-02-27 21:20:42 +01:00
Sylvain Munaut f6c0bba6dd calypso: Add experimental driver for uWire
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:03:05 +01:00
Sylvain Munaut 6292304120 cfi_flash: Make the init message a debug output
Most likely console isn't even up so it doesn't print correctly
anyway.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:57 +01:00
Sylvain Munaut eb5248fffe calypso/dsp: Fix printf format string in dump
In commit 9a18ba40d940c9bf173504b941e10f9638032823 (old git), this
was changed to 'fix compiler warnings'.

But %ux is not a valid format specifier at all so that produces
wrong output !

%lx is the correct format AFAICT because uint32_t is typedef'd from
unsigned long in my toolchain (ARM GCC 4.3.3 - newlib 1.17.0). This
doesn't produce any warning here.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:49 +01:00
Sylvain Munaut 16aeb95d00 comm/msgb.c: Style cleanup in initialization
Don't assign the same var twice & init all from the same source.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:41 +01:00
Sylvain Munaut 2dba741e05 apps/compal_dsp_dump: Move board_init as first call
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-02-23 15:02:03 +01:00
Harald Welte 1d271dea3f Calypso TPU: Introduce TPU debug mode
Using #define TPU_DEBUG, we can now send the full TPU RAM contents
to the host PC (using a sercomm DLCI) at the time of tpu_enable()
which is very helpful for TPU debugging.
2010-02-23 01:44:46 +01:00
Harald Welte 3f3a84d516 Calypso TPU: initialize TPU RAM to zero at tpu_init() time 2010-02-23 01:44:37 +01:00
Harald Welte c7224b79bd Calyspo TPU: make add_mod5000() accept signed values
Sometimes we want to 'add' a negative value but still want the
result to be correct!
2010-02-23 01:44:28 +01:00
Harald Welte 6f14e4e969 Calypso TPU: fix address of TSP TX 3 register 2010-02-23 01:44:22 +01:00
Harald Welte 9fe66fdb0c TRF6151: move PLL and AGC configuration to right sequence in time 2010-02-23 01:44:14 +01:00
Harald Welte 68817f6508 fix typo in comment 2010-02-23 01:44:09 +01:00
Harald Welte bb263dcc70 TRF6151: close the Rx (Downlink) window after ABB is closed
There is no point in keeping the receiver running after we have
told the ABB to no longer receive anything.
2010-02-23 01:44:03 +01:00
Harald Welte 2dff711bc7 TWL3025: Ensure we don't perform downlink calibration too early
If we perform the downlink calibration too early, the TRF6151 might
not yet provide a stable signal and we'll not be able to receive
anything.

From the desired "BDLENA" time, we subtract all the delays and
latencies to determine the point in time at which the calibration
process should start.
2010-02-23 01:43:52 +01:00
Harald Welte 7b2f013566 use <gsm.h> instead of "gsm.h" 2010-02-23 01:43:31 +01:00
Harald Welte c917fd4379 sercomm: busy-wait in case we cannot allocate a msgb right now 2010-02-21 18:36:22 +01:00
Harald Welte 30ed24b0a4 sercomm_cons: allocate 252 bytes net data size plus 4 bytes headroom 2010-02-21 18:33:56 +01:00
Harald Welte 8570a2ccd8 fix msgb_talroom() calculation 2010-02-21 18:33:14 +01:00
Harald Welte e943638a92 sercomm_cons: Utilize msgb's better, don't always end at \n
In the sercomm_cons layer, ee used to enqueue a msgb for sending
every time there is an end-of-line.  However, if we send a number
of very short lines, we easily run out of msgbs.

Now we check how much msgb backlog there is in the transmit queue,
and decide to skip the end-of-line flushing if needed.

This still doesn't solve all our problems, but its still a useful
mechanism.
2010-02-21 15:16:40 +01:00
Harald Welte 2afd5aa843 build of osmocon using libosmocore 2010-02-20 22:16:21 +01:00
Harald Welte 89b1c361e3 Use ARFCN as specified from Layer2
with this commit, Layer2 can tell Layer1 to sync to a new CCCH on
a specified ARFCN.
2010-02-20 00:57:16 +01:00
Harald Welte 2df0b01363 frequency error is actually twice of what we thought.
The cause is really not clear.  The formual using 2*Pi to convert
from radians to frequency is perfectly correct.

However, measurements with various test equipment (including Racal 6103)
have shown our frequency error estimate is always off by a power of two...
2010-02-18 19:32:07 +01:00
Harald Welte 15594a7c0e add COPYING files to osmocon, firmware and layer2 2010-02-18 19:23:46 +01:00
Harald Welte 45a65c6fdd add *.map files to .gitignore 2010-02-18 17:01:25 +01:00
Harald Welte fbe7b94c9c Initial import of OsmocomBB into git repository 2010-02-18 16:46:36 +01:00