Commit Graph

9 Commits

Author SHA1 Message Date
Harald Welte
83207e0cad Add 'mdelay()' function to busy-wait for given number of milli-seconds 2017-02-03 22:22:17 +01:00
Harald Welte
fb3f308f2f board_lowlevel: Clean up PLLA configuration
The PLL setting doesn't depend on the 'qmod' board type but on the
combination of the BOARD_MAINOSC and BOARD_MCK #defines.  So let's
remove the '#ifdef qmod' from the equation.

The only 'qmod' specific part is whether or not to use the internal xtal
oscillator or not.
2017-01-12 18:16:23 +01:00
Harald Welte
7861132fad qmod: Don't violate PLL minimum output frequency
Table 42-31 ofd DOC6500 states that the minimum output frequency of the
PLL is 60 MHz.   The existing qmod code violated this by configuring the
PLL multiplier output to 12*4 = 48 MHz.  Let's use 12*8 = 96 and then
divide that by two to get to the desired 48 MHz.

This might help to resolve the non-working USB on the qmod so far.
2017-01-12 11:07:04 +01:00
Harald Welte
a02b641650 Add support for 'qmod' (quad-modem) board
You can compile the firmware for this new target using 'make
BOARD=qmod'.

The QMOD differs from simtrace+owhw in terms of low-level
initialization, as it has an external 12MHz clock at XIN, thus bypasses
the main oscillator and needs different PLL configuration.
2016-08-21 18:32:12 +02:00
Harald Welte
372f4cc7ba board_lowlevel: Use LED definitions from board.h
... this is more portable.
2016-03-16 22:22:57 +01:00
Harald Welte
7abdb51f8f ringbuffer: Make ring buffer access irq-save
We have to temporarily disable nterrupts when performing rinbuffer
operations, as the ring buffer is used both from IRQ as well as process
context.
2016-03-16 22:22:54 +01:00
Harald Welte
5e00400a05 board_lowlevel.c: Improve main oscillator initialization
* ensure the PB8/PB9 pins are actually not in GPIO mode, which they
  apparently are on boot-up
* ensure that neither pull-up nor pull-down are enabled on PB8/PB9
* ensure we first start the oscillator, before selecting it

The sum of the above changes seems to make oscillator start-up much more
reliable than before.  The time needed for initialization is now pretty
stable, and the occasional 15-20second clock stabiliziation has not been
observed with this change.
2016-03-16 20:45:09 +01:00
Harald Welte
4678388c3c board_lowlevel: More comments about clock initialization 2016-02-29 19:45:59 +01:00
Christina Quast
b0bbb1b52e Removed sym links, replaced them with actual folders 2015-04-07 20:04:19 +02:00