Commit Graph

30 Commits

Author SHA1 Message Date
Harald Welte
31f817c3ac Add support for controlling PERST of WWAN modems (on qmod) 2017-02-03 22:22:20 +01:00
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
2819e9c131 wwan_led: Read + report status changes of WWAN LED inputs 2017-02-03 07:49:28 +01:00
Harald Welte
e974fbb9e5 Issue ST12_PRTPWR_OVERRIDE before putting hub in reset
When we reset the hub, the hub will actively drvie the PRTPWR signal of
the SITMRACE12 low, resulting in the SAM3 being shut off.  If we want to
"survive" this, we need to set the OVERRIDE before we go into reset.

Right now, we never release the signal again, keeping ST12 enabled
permanently, which is of course not what we want in general.
2016-10-19 19:36:07 +02:00
Harald Welte
15e026ec34 qmod: Set PIN_PRTPWR_OVERRIDE to output/low 2016-10-11 17:46:09 +02:00
Harald Welte
67415e3385 HACK: Add EEPROM writing at boot of SAM3 on qmod
This is not for production use, but just for hardware verification
2016-09-01 20:57:56 +02: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
07872b6cdd VCC/ADC: finish implementing VCC detection via ADC
... however, keep it disabled due to ADCVREF not being connected on
OWHWv1/v2.
2016-03-20 11:45:36 +01:00
Harald Welte
6dcacf3efe OWHW: fix operation with second modem/UART
We can now enable CARDEMU_SECOND_UART in owhw/board.h, as it no
longer interferes with operation of the first port (USIM1).  Whether
the second port actuall works still remains to be tested at this point.
2016-03-20 10:06:05 +01:00
Harald Welte
0eaa992682 cardem: Add support for USB host based set/clear of card_insert
This way the application on the USB host can control whether the
emulator should emulate that the card be inserted or not.  We change the
reset-default back to 'not inserted' (GPIO output 0) and wait for the
application to explicitly request this by issuing
CEMU_USB_MSGT_DT_CARDINSERT.
2016-03-16 22:22:57 +01:00
Harald Welte
1605564489 ensure USB config numbers always start from 1
Depending on which features (and thus USB configurations) are included
in the firmware, we need to re-define the ordering of the configuration
numbers, as the Atmel USBD driver simply assumes that configurations are
numbered 1..N without any gaps in the sequence.
2016-03-16 20:45:10 +01:00
Harald Welte
715bc05f55 Increase serial console sped to 230400 bps
This makes debug printf's twice as fast (half as slow) and thus
has less of an impact on execution speed than the previous 115200
2016-03-02 10:31:59 +01:00
Harald Welte
b086ab0242 owhw: Fix GPIO for USIM1_RST (24, not 23!) and enable SET_USIM1_PRES 2016-02-29 10:05:53 +01:00
Harald Welte
2fb5996d30 owhw: fix GPIO definitions (output low level by default) 2016-02-28 12:34:26 +01:00
Harald Welte
390760a006 add board/owhw.c 2016-02-27 16:23:46 +01:00
Harald Welte
849269f4cc add OWHW board.h file 2015-11-30 12:16:53 +01:00
Harald Welte
2d3371ed65 split board.h into generic part and simtrace-specific part 2015-11-30 11:59:03 +01:00
Harald Welte
844db577f2 change to own USB vendor/device ID
we shouldn't re-use the vendor/device ID usd by simtrace1, as the
protocol is incompatible and applications for simtrace 1 don't work with
simtrace2.   Also, there's a different processor architecutre in the
hardware.
2015-11-07 18:38:04 +01:00
Christina Quast
3b544a1217 cciddriverdesc: Atmel bug fix of slot status register
Atmel library mixes up the value for two different messages.
Explanation can be found here:
http://permalink.gmane.org/gmane.comp.mobile.osmocom.simtrace/29

Actually, a better fix for this problem would be to go through the
Atmel code and replace ICC_INSERTED_EVENT with ICC_BS_PRESENT_NOTACTIVATED
where appropriate and in accordance with the Smart Card CCID standard
(and libccid, for this matter).
2015-05-08 16:59:47 +02:00
Christina Quast
3735039b59 firmware, host: Changed vendor and product id
The code used a vendor and product id taken from Atmel example code.
Now it is changed to the vendor and product id, which was also previously
used in the original SIMtrace code.
2015-05-08 16:47:29 +02:00
Christina Quast
dea1f55fb7 board.h: RST pin low per default on startup 2015-04-17 17:16:42 +02:00
Christina Quast
f3211e6424 board.h: init more phone pins (as input) 2015-04-16 10:41:12 +02:00
Christina Quast
b595e7cb53 Merge branch 'new_iso_init' (sniffer not working)
Conflicts:
	firmware/src_simtrace/phone.c
	firmware/src_simtrace/simtrace.h
2015-04-12 13:31:01 +02:00
Christina Quast
5c6a299c71 phone.c: Sniffer bus config make switch 2015-04-11 20:03:14 +02:00
Christina Quast
2ee3ec73f4 tc_etu.c: Fixed PIN initialisation compiler waring 2015-04-11 12:27:46 +02:00
Christina Quast
e24b9ace89 ISO7816_Init: Initialized with USART
* ISO7816_Init: Takes Usart_info and CLK_SLAVE/CLK_MASTER as param
* ISO7816_SendChar, ISO7816_GetChar: Usart_info is passed
* ISO7816_Set_Reset_Pin function for CCID part
* iso7816_4.c: BOARD_ISO7816_BASE_USART replaced by USART_SIM
* Redundant _ISO7816_Init, _ISO7816_SendChar, _ISO7816_GetChar
    functions removed
* All simtrace modes use iso7816_4.c functions instead of redefined
    _ISO7816_xxx functions
2015-04-10 17:44:49 +02:00
Christina Quast
3eab56e079 ISO7816_Init with more parameters, slave/master clock 2015-04-10 15:38:49 +02:00
Christina Quast
bf464ae566 Moved ccid related files to bord related folders 2015-04-09 19:47:45 +02:00
Christina Quast
b0bbb1b52e Removed sym links, replaced them with actual folders 2015-04-07 20:04:19 +02:00
Christina Quast
5a67c0fef3 Renamed main folder to firmware 2015-04-07 18:24:06 +02:00