summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/layer1/prim_fbsb.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-23[WIP] HO: Add SCH read of neighbor cells to TCH channelsAndreas Eversberg1-0/+159
The task will try to sync to neighbor cell during search (idle) frame. Change-Id: I7f2c6b5438676a816c546cb9dce404762ee5d5b5
2018-10-03l1ctl_proto.h: extend ccch_mode enum with CBCHVadim Yanitskiy1-0/+4
According to GSM TS 05.02, there are two ways to enable CBCH: a) replace sub-slot number 2 of CCCH+SDCCH/4 (comb. V), b) replace sub-slot number 2 of SDCCH/8 (comb. VII). Unlike SDCCH/8 (case b), CCCH+SDCCH/4 can be allocated on TS0 only, and shall not use frequency hopping. This means that implementing CBCH support on SDCCH/8 would require much more efforts than on combined CCCH+SDCCH/4, as in last case CBCH messages can be received without the need to switch from idle to dedicated mode. This change introduces a new ccch_mode item, which should be used by the higher layers to indicate presence of CBCH channel on C0/TS0, so the PHY would enable decoding of CBCH messages on CCCH+SDCCH/4 (case a) in idle mode. Regarding to CBCH on SDCCH/8 (case b), it makes sense to extend the 'l1ctl_dm_est_req', so it would be handled in dedicated mode on request from the higher layers. Change-Id: Ia94ebf22a2ec439dfe1f31d703b832ae57b48ef2
2015-12-31cleanup some compile warningsMax1-11/+8
2012-11-20Tell L1CTL_FBSB_REQ the expected received signal levelHarald Welte1-1/+2
As Dieter points out, this drastically improves the resiliance to high receive levels on the C155. We cannot blindly assume a received signal level of -85 dBm if the BTS is 2m away and we actually receive -40 dBm. This patch extends the L1CTL_FBSB_REQ data structure in layer 1 with the respective field, as well as the l1ctl_tx_fbsb_req() API function called from the various layer23 apps. "mobile" and "bcch_scan" already did a PM request and thus know the expected signal power. "ccch_scan" and "cbch_sniff" apparently don't do, so the -85 dBm constant is now hardcoded into the host-side source code there, and should probably be fixed in a follow-up patch.
2012-02-12firmware: add missing includesSteve Markgraf1-0/+2
This fixes all 'implicit-function-declaration'-warnings. Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-08-31fw/layer1/fbsb: fix newline in a printf()-callSteve Markgraf1-1/+1
Found by clang: warning: unknown escape sequence '\m' Signed-off-by: Steve Markgraf <steve@steve-m.de>
2011-07-17[rf] Adding rffe_set_gain() and rffe_get_gain() to get/set computed gainAndreas Eversberg1-1/+1
rffe_compute_gain() is the new name for rffe_set_gain(). I needed to change this, to solve the name collision with the rffe_set_gain() function, which actually sets the absolute gain. rffe_get_gain() will now read the absolute gain which has been computed by rffe_compute_gain() or set by rffe_set_gain().
2011-04-26src: use new libosmogsm and include/osmocom/[gsm|core] path to headersPablo Neira Ayuso1-2/+2
This patch changes include paths to get osmocom-bb working with the current libosmocore tree. Among all these renames, you can notice several tweaks that I added on purpose, and that require some explanation, they are: * hexdump() in osmocon.c and osmoload.c has been renamed to avoid clashing with hexdump() defined in libosmocore. * gsmmap now depends on libosmogsm. Actually I had to cleanup Makefile.am because I was experiencing weird linking problems, probably due to a bug in the autotools. With the change included in this patch, I got it compiled and linked here correctly. This patch has been tested with the phone Motorola C123 and the following images files: * firmware/board/compal_e88/hello_world.compalram.bin * firmware/board/compal_e88/layer1.compalram.bin Using the osmocon, bcch_scan and mobile tools. Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-20fw/layer1: Adding TAO loop to correct TPU window offsetAndreas Eversberg1-0/+4
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-10-25target/fw/layer1: correctly initialize afc_retriesSteve Markgraf1-0/+1
Otherwise, when it reached AFC_RETRY_COUNT, no new FB0 tasks were scheduled, and you needed to restart the phone in order to successfully sync to a cell Signed-off-by: Steve Markgraf <steve@steve-m.de>
2010-09-17fw/layer1: Convert primitives to use common DSP/TPU scenario endingSylvain Munaut1-7/+3
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-09-17fw/layer1: Add a priority field for sched_itemSylvain Munaut1-17/+17
Each item has a priority associated to it. The standard is : -4 -> Responses processing -3 -> L1S parameters changes -2 -> [Reserved for TPU window setup] -1 -> (anything) 0..7 -> Commands relative to time slot n (relative to current l1s main timeslot) 8 -> (anything) 9 -> [Reserved for TPU window cleanup] 10 -> (anthing) Note that with this modification, an item scheduled for the current frame from within a call back won't have its priority respected ! Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-27include: Rename l1a_l23_interface.h to l1ctl_proto.hSylvain Munaut1-1/+1
The interface between l1 and upper layer is called by several name. IMHO l1ctl is shorted and sounds good so try to unify using that. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-28layer1/tpu_window: Add experimental support for TS != 0Sylvain Munaut1-2/+2
This is flawed, but allows testing ... Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-25[layer1] Activate AGC implementationHarald Welte1-0/+3
The target input level at the ABB ADC / DSP baseband downlink path is just an estimate and might have to change
2010-06-24[layer1] use __attribute__ ((constructor)) for completion initializersHarald Welte1-0/+4
2010-06-22fw/layer1: Add support CCCH combined/non-combinedSylvain Munaut1-1/+4
We introduce the concept of CCCH mode. It can be either - NONE: receive BCCCH only - COMBINED: CCCH on a BCCH/CCCH+SDDCH/4 - NON_COMBINED: CCCH on a BCCH/CCCH There is also a new command to change the mode without having to do the resync. Currently, we keep the previous default behavior of requesting a combined CCCH by default Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-06-20[L1CTL] rename primitives to comply with official naming s/_REQ/_CONF/Harald Welte1-4/+4
When L23 issues a REQ, we should respond with CONF, rather than _RESP
2010-06-20[layer1] FBSB: abort FB0 acquisition after 30 failing attemptsHarald Welte1-4/+13
This should remove the 'endless FB0 loop' when the DSP detects a FB where there really is none, and we drive the AFC DAC to its maximum without ever getting the frequency offset below our threshold.
2010-06-20[layer1] FBSB: re-try FB0/FB1 request up to 3 timesHarald Welte1-3/+12
So far, we have aborted our FB acquisition if we didn't detect a Frequency Burst in the first period of 12 TDMA timeslots. However, this turns out to be giving up a bit too quickly. We now re-try this three times before giving up, which hopefully gives better results.
2010-05-29layer1: disable FB0/FB1 SNR thresholds for nowHarald Welte1-0/+5
they have caused more problems than they solve (i.e. we didn't properly find many cells anymore)
2010-05-20Make new L1CTL_FBSB_REQ work reliablyHarald Welte1-77/+92
* port 'mobile' application to new l1ctl_tx_fbsb_req() * make sure we have a proper downlinke header in front of l1ctl_fbsb_resp * remove duplicate band_arfcn member of struct l1ctl_fbsb_resp * reset the AFC to its default value when starting new FBSB task * remove bogus l1s.sb.{synced.count} variables * allocate msg and send l1ctl_fbsb_resp() only from process context, not FIQ * properly report SNR and BSIC in fbsb_resp * introduce arbitrary SNR thresholds for FB0->FB1 and FB1->SB switching
2010-05-19layer1/l1ctl: Split L1CTL_NEW_CCCH_REQ in FBSB_REQ nad SYNC_REQHarald Welte1-202/+265
We really want to have those two as distinct operations - and we want proper state machines in L1 to quickly return if they've managed to acquire a FB or SB or not. Otherwise scanning will take ages... This code now introduces a new l1ctl_fbsb_req that is sent via L1CTL to ask for a bitmask of FB0/FB1/SB operations. The actual FB0/FB1 detection now no longer runs for 500 TDMA interrupts but completes as soon as we either know there is no FCCH, or that our frequency error is smaller than a caller-specified threshold. FB0/FB1 are already working, SB is not yet, sorry.
2010-04-28fw/layer1: Encapsulate mframe scheduler function betterSylvain Munaut1-2/+2
There was some code meddling with mf_tasks directly. This is fine if it's just setting/clearing a bit but since we're gonna need some 'cleverness' into when to activate what to prevent conflict, it's better to abstract that logic. Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-04-09layer1: move FB and SB detection into prim_fbsb.cHarald Welte1-0/+461