mirror of https://gerrit.osmocom.org/simtrace2
firmware: remove usb pullup that dates back to simtrace1
All the parts are DNP and never existed on the simtrace2 with sam3; the sam3 has internal pullups that are part of the usb peripheral. Change-Id: I04a703a2eba6ff1dc64692c089213389d0c1066d
This commit is contained in:
parent
a7e306f745
commit
f83d42ce51
|
@ -342,16 +342,7 @@ extern int main(void)
|
||||||
TRACE_INFO("USB init...\n\r");
|
TRACE_INFO("USB init...\n\r");
|
||||||
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
||||||
USBD_Disconnect();
|
USBD_Disconnect();
|
||||||
#ifdef PIN_USB_PULLUP
|
|
||||||
const Pin usb_dp_pullup = PIN_USB_PULLUP;
|
|
||||||
PIO_Configure(&usb_dp_pullup, 1);
|
|
||||||
PIO_Set(&usb_dp_pullup);
|
|
||||||
#endif
|
|
||||||
mdelay(50);
|
mdelay(50);
|
||||||
#ifdef PIN_USB_PULLUP
|
|
||||||
PIO_Clear(&usb_dp_pullup);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
USBDFU_Initialize(&dfu_descriptors);
|
USBDFU_Initialize(&dfu_descriptors);
|
||||||
|
|
||||||
while (USBD_GetState() < USBD_STATE_CONFIGURED) {
|
while (USBD_GetState() < USBD_STATE_CONFIGURED) {
|
||||||
|
|
|
@ -87,11 +87,6 @@
|
||||||
/* SPI flash write protect pin (active low, pulled low) */
|
/* SPI flash write protect pin (active low, pulled low) */
|
||||||
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
||||||
|
|
||||||
/** Pin configuration to control USB pull-up on D+
|
|
||||||
* @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
|
|
||||||
*/
|
|
||||||
#define PIN_USB_PULLUP {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
|
||||||
|
|
||||||
/** USB definitions */
|
/** USB definitions */
|
||||||
/* OpenMoko SIMtrace 2 USB vendor ID */
|
/* OpenMoko SIMtrace 2 USB vendor ID */
|
||||||
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
||||||
|
|
|
@ -135,11 +135,6 @@
|
||||||
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Pin configuration to control USB pull-up on D+
|
|
||||||
* @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
|
|
||||||
*/
|
|
||||||
#define PIN_USB_PULLUP {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
|
||||||
|
|
||||||
/** USB definitions */
|
/** USB definitions */
|
||||||
/* OpenMoko SIMtrace 2 USB vendor ID */
|
/* OpenMoko SIMtrace 2 USB vendor ID */
|
||||||
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
||||||
|
|
|
@ -134,11 +134,6 @@
|
||||||
/* SPI flash write protect pin (active low, pulled low) */
|
/* SPI flash write protect pin (active low, pulled low) */
|
||||||
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
#define PIN_SPI_WP {PA15, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
||||||
|
|
||||||
/** Pin configuration to control USB pull-up on D+
|
|
||||||
* @details the USB pull-up on D+ is enable by default on the board but can be disabled by setting PA16 high
|
|
||||||
*/
|
|
||||||
#define PIN_USB_PULLUP {PIO_PA16, PIOA, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT}
|
|
||||||
|
|
||||||
/** USB definitions */
|
/** USB definitions */
|
||||||
/* OpenMoko SIMtrace 2 USB vendor ID */
|
/* OpenMoko SIMtrace 2 USB vendor ID */
|
||||||
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
#define BOARD_USB_VENDOR_ID USB_VENDOR_OPENMOKO
|
||||||
|
|
|
@ -689,16 +689,8 @@ void SIMtrace_USB_Initialize(void)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
/* Signal USB reset by disabling the pull-up on USB D+ for at least 10 ms */
|
||||||
#ifdef PIN_USB_PULLUP
|
|
||||||
const Pin usb_dp_pullup = PIN_USB_PULLUP;
|
|
||||||
PIO_Configure(&usb_dp_pullup, 1);
|
|
||||||
PIO_Set(&usb_dp_pullup);
|
|
||||||
#endif
|
|
||||||
USBD_HAL_Suspend();
|
USBD_HAL_Suspend();
|
||||||
mdelay(20);
|
mdelay(20);
|
||||||
#ifdef PIN_USB_PULLUP
|
|
||||||
PIO_Clear(&usb_dp_pullup);
|
|
||||||
#endif
|
|
||||||
USBD_HAL_Activate();
|
USBD_HAL_Activate();
|
||||||
|
|
||||||
// Get std USB driver
|
// Get std USB driver
|
||||||
|
|
Loading…
Reference in New Issue