Particularly the VCC/RST/CLK changes can happen quite frequent, and
we were seeing quite a number of overflows of the usb_buf queue for EP06
(interrupt endpoint) in cardem.
I first tried increasing the maximum queue size to up to 10, but that
still didn't resolve those EP06 overflow error log messages.
Reducing the bInterval from 16 to 1 made them go away in all my
tests.
Change-Id: I5c272c31983de7201cfbd445c4484f6832d878ab
The previous value was way too low and led to reenumeration issues when
switching from app to bl because the hosts are fairly lenient and
feature long delays until they accept disappearing devices as gone for
good instead of ignoring a presuambly flaky usb cable or connection.
Related: SYS5061
Change-Id: I9b8c8bf794ad5b94fc7ea2a01d1ebf4e36862c36
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
previously the version string was in the iConfiguration field of a
dedicated USB configuration.
this configuration had no interface, but the USB specification
requires at least one interface.
an interface has been added to this configuration.
the version string is now in the iInterface field, and the
iConfiguration field contains "firmware version".
the USB specification does not require an end-point, and none are
present.
Change-Id: I99361e313979711f4f45ad424a52faa3ddd7c558
The most recent commits introduced 'C99' syntax by declaring variables
inside the 'for' statement itself, rather than before.
This resulted in compile failures in the Ubuntu 16.04 builds on
build.opensuse.org:
[ 105s] libcommon/source/usb.c: In function 'SIMtrace_USB_Initialize':
[ 105s] libcommon/source/usb.c:679:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(device_id_string) - 1; i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:679:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
[ 105s] libcommon/source/usb.c:686:15: error: redefinition of 'i'
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(git_version) - 1; i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:679:15: note: previous definition of 'i' was here
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(device_id_string) - 1; i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:686:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(git_version) - 1; i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:692:15: error: redefinition of 'i'
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(usb_strings) && i < ARRAY_SIZE(usb_strings_extended); i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:686:15: note: previous definition of 'i' was here
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(git_version) - 1; i++) {
[ 105s] ^
[ 105s] libcommon/source/usb.c:692:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
[ 105s] for (uint8_t i = 0; i < ARRAY_SIZE(usb_strings) && i < ARRAY_SIZE(usb_strings_extended); i++) {
[ 105s] ^
[ 105s] Makefile:227: recipe for target 'obj/simtrace/flash_usb.o' faile
Change-Id: Ibdb837ac105664484b10873c2c0d9561051b1c2a
the device ID (unique to the micro-controller) is now displayed in
the USB iSerial descriptor.
the git version is now also displayed in iConfiguration in an
additional (empty) configuration descriptor.
this allows the user to quickly get the device hardware serial and
firmware version just by using lsusb (no need for a custom USB
software).
Change-Id: If9fadecc097ca3e006990160936bf11b22eae4e0
USB reset can be signaled by pulling low USB D+ for at least 10 ms,
according to the USB specification. This force a re-enumeration.
This time is increased to 20 ms to work with more USB HUBs.
Some SAM3S based board have external D+ pull-up mechanism (such as
SIMtrace) which needs to be used to pull D+ low.
This is a legacy mechanism from SAM7S history.
This mechanism is not required anymore on the SAM3S, and the qmod
does not use it. When the USB HAL is suspended, the transceiver is
disabled, causing D+ and D- to be pulled low. Then the HAL is activated
again. This is particularly required when DFU is started (and
enumerated), and after flashing the SAM3S switched to the main
application (without reset), so it can properly re-enumerate.
This board difference is now defined on the board header.
Change-Id: I9b58d8101c2fcf5595026b675728826af26127a3
the */usb_strings.txt files always assumed that the first line is the
manufacturer string, followed by the product string in the second line.
However, the enum strDescNum had it the other way around. Let's fix it
by adjusting the enum to reality.
Fixes: SYS#3591
This way, host code can dynamically detect which interface supports
which functionality.
The related #defines should be moved to a header file that's shared with
the host application code.
Actually, at device level we want to specify 0, so we can select
individual Class/Subclass values at Interface values.
Table 9-8 of the USB2 Specification is quite clear about this.
* 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