aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-03-03DFU: String descriptors for DFU alt-interfaces0.2Harald Welte1-0/+26
they are only shown in DFU mode for now, until we find a way to export them over to the runtime.
2017-03-03DFU: Set 10ms bwPollTimeout (lowest possible as per spec)Harald Welte2-2/+4
2017-03-03DFU: make sure to properly initialize g_dfu pointer before using itHarald Welte2-0/+5
2017-03-03DFU Runtime: Add missing return after handling USB standard requestsHarald Welte1-0/+1
the same as 479e97e3382f72da1959276d8ec3a9defc5b75f5 but this time for the runtime, not for DFU.
2017-03-03dfu: fix cosmetic issue in debug messageHarald Welte1-1/+1
2017-03-03DFU: fix transitions between runtime and DFU modeHarald Welte5-13/+27
we now always go through a processor reset to avoid any state that might be persistent/left-over during the switch.
2017-03-02cstartup: (re-)enable interrupts before calling main()Harald Welte1-3/+3
2017-03-02dfu/main.c: Initialize FLASHD driver before using itHarald Welte1-0/+1
2017-03-02cstartup / USBD: Use correct Makefile conditionals for DFUHarald Welte2-3/+4
2017-03-02Makefile: Define APPLICATION_foo BOARD_bar and ENVIRONMENT_baz #definesHarald Welte1-3/+5
This can help us with conditional code
2017-03-02dfu: print Chip ID during bootHarald Welte1-0/+1
2017-03-02flashd: Set 6 Wait states as per Errata requiremens for Revision AHarald Welte3-2/+10
It is utterly unacceptable that Atmel is shipping example code in 2011, which doesn't support parts that are shipped still in 2016. They would have had five years to fix their code to implement the chip errata :(
2017-03-02DFU: Add missing 'return' after handling generic USB control requestHarald Welte1-0/+1
2017-03-02dfu_desc: Add some string descriptors and fix configuration desc tableHarald Welte1-7/+75
2017-03-02stdio: Increase max string size to 512 and don't endless-loop!!Harald Welte1-2/+1
2017-03-01dfu_des.c: Cosmetic changes, use named initializersHarald Welte1-11/+7
2017-02-28move PLLB (for USB) initialization to board_lowlevel.cHarald Welte2-23/+24
This way it is present both inside the DFU loader and in the main app.
2017-02-28have local stdio.h file to avoid newlib issuesHarald Welte3-3/+37
... we should move to -nostdinc at some point :/
2017-02-28fix g_dfu access from both DFU and runtime accessHarald Welte6-63/+67
We need to refer to g_dfu as a pointer from all code. In DFU mode, it gets assigned to the address of _g_dfu, which is placed by the linker script at the start of RAM. In runtime mode, the pointer is statically defined to point at the start of RAM. The linker script for the runtime (dfu environment) is adjusted to save the first 32 bytes for the _g_dfu structure.
2017-02-28ensure g_dfu is linked to start of RAM when building DFU loaderHarald Welte4-1/+7
2017-02-28remove obsolete old linker scriptHarald Welte1-143/+0
2017-02-28DFU: towards a more complete implementationHarald Welte5-13/+108
* we now actually route the EP0 control requests in DFU mode to the correct handler (weak linker symbols are tricky) * we now actually call code to read/write data from/to RAM/FLASH
2017-02-27Makefile: Optimize for sizeHarald Welte1-1/+1
This gets the dfu image down from 19 to 11 kBytes, with is well within the 16kbyte limit for the DFU partition.
2017-02-27move last few files from src_board / include_boardHarald Welte6-2/+1
2017-02-27remove pio_capture, we don't use itHarald Welte2-286/+3
As it registers a non-weak exception handler, it consumes memory in every build
2017-02-27stdio.c: fix compiler warningHarald Welte1-1/+1
2017-02-27timer.h: Fix compiler warnings about redefinitionHarald Welte1-0/+19
2017-02-27Remove newlib dependency, include own stdio/string/assertHarald Welte8-198/+948
2017-02-27fix some compiler warningsHarald Welte2-2/+2
2017-02-27Structure build system to build for multiple boards/apps/environmentsHarald Welte33-28/+552
2017-02-27fix compilation of card_emu_testsHarald Welte2-4/+8
2017-02-27Change directory structure to align with Atmel softpackHarald Welte81-12/+1218
This way we can easily check with 'diff' for differences in our code and Atmel softpack. Also, this layout is more suitable for building various different firmware images (e.g. factory-test, dfu-loader, main application) for a variety of different boards (simtrace, owhw, qmod).
2017-02-27WIP: Introduce USB DFU code from my at91lib DFU portHarald Welte11-11/+1104
2017-02-26WIP: split main from board-speciic partsHarald Welte4-188/+210
2017-02-26build efc.o and flashd.o as part of build processHarald Welte4-1/+6
2017-02-26import efc.[ch] and flashd.[ch] from SAM3S softpack 2.1Harald Welte4-0/+993
2017-02-10qmod: Inver initial state of PERST signalsHarald Welte1-2/+2
The signals are driving an external NPN transistor, so the default state must be low at reset to en sure that !PERST on the modem input is de-asserted by default.
2017-02-10qmod: invert WWAN_PERST logic (we use transistors now)Harald Welte1-2/+2
2017-02-10Add support for board version reading via ADCHarald Welte5-1/+93
2017-02-04Extend WWAN modem PERST to 300msHarald Welte1-1/+1
It seems like a lot of modems have rather long (100ms!) minimum reset durations. Makes me wonder if it's an actual reset line or rather juts some GPIO that they poll/sample every so often. Then there are other modems that state the reset *must not* be longer than 1s. So let's choose 300ms as a value in-between.
2017-02-04Import libosmocore timer infrastructure and use it for PERSTHarald Welte7-5/+960
The PERST is thus no longer busy-waiting but starting a timer to release the PERST after 1ms.
2017-02-04Introudce an include_libosmocore directory and move (updated) linuxlist thereHarald Welte8-116/+121
2017-02-03Add debug commands '1' and '2' to generate 1ms reset pulses to modemsHarald Welte1-0/+12
2017-02-03Add support for controlling PERST of WWAN modems (on qmod)Harald Welte4-1/+67
2017-02-03Add 'mdelay()' function to busy-wait for given number of milli-secondsHarald Welte3-2/+23
2017-02-03wwan_led: Read + report status changes of WWAN LED inputsHarald Welte5-1/+93
2017-01-12qmod: Remove 'U' debug command and directly initialize USBHarald Welte1-10/+1
The hack to manually delay the USB initialization is no longer needed as finally the USB enumerates.
2017-01-12board_lowlevel: Clean up PLLA configurationHarald Welte1-15/+23
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-12usb: Cofnigure PLLB according to board.h BOARD_MAINOSCHarald Welte1-3/+9
Actually we don't even need to use PLLB for USB and could simply use PLLA, but then we don't c are about the extra 2.5mA
2017-01-12qmod: Don't violate PLL minimum output frequencyHarald Welte1-3/+3
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.