Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Feature/usb ulpi
See merge request thirdpin_team/libopencm3!1
|
|
|
|
|
|
Signed-off-by: Ilya Stolyarov <i.stolyarov@thirdpin.ru>
|
|
Signed-off-by: Ilya Stolyarov <i.stolyarov@thirdpin.ru>
|
|
|
|
|
|
|
|
# Conflicts:
# Makefile
# include/libopencm3/stm32/common/timer_common_all.h
# include/libopencm3/stm32/sdio.h
# include/libopencm3/usb/usbstd.h
# lib/stm32/f1/Makefile
# lib/stm32/f2/Makefile
# lib/stm32/f4/Makefile
# lib/usb/usb_f107.c
# lib/usb/usb_msc.c
|
|
The reset and low power definitions for USART7/USART8 were correct, but
not the primary enable registers.
Fixes: https://github.com/libopencm3/libopencm3/issues/969
|
|
It's always stream on the "new" dma controller (unless it's channel....)
Fix a couple of inconsistent prototypes that had carried over from f1
originally. Reported by vampi on irc.
|
|
the 2014q3 or later toolchains are now readily available, and we should
now just consider this a user problem. This gets us out of trying to
parse compiler help output and chasing our own tail.
Fixes https://github.com/libopencm3/libopencm3/issues/965
|
|
|
|
Lots of registers were already documented extensively. Turn it all in
doxygen with groups and the right syntax.
|
|
Just get them all included as they are. Gets them grouped up and
visible so we can start clarifying the rest of their docs.
|
|
Much as we had to pull in the individual target's include files
manually, because they're useful without necessarily having .c files
using them, the cortex core headers also need to be included. This also
pulls in the doc-cm3.h file that setup nice groupings.
|
|
|
|
F3 rcc configs were overhauled and we can now use standard init code
instead of specifying our own custom clock config.
|
|
|
|
This includes adding documentation to the status flags.
Originally tracked at: https://github.com/libopencm3/libopencm3/pull/833
Modified to drop whitespace changes, and simply boolean return.
|
|
Original discussion at: https://github.com/libopencm3/libopencm3/pull/702
|
|
Add the timers to the memory map and the basic registers at least.
|
|
They were originally used to make sure that the doxygen was generated
correctly, but that style is no longer necessary.
There may be more peripherals that can be "cleaned" like this, but let's
do them one step at a time, as we work on that area.
|
|
|
|
|
|
Not full test coverage, obviously, but at least let it compile until the
delay methods have been implemented.
|
|
|
|
This has failing tests, and doesn't implement (yet) the delay routines,
so it won't even compile without disabling that functionality in the
core gadget0 code. However, it passes most tests, and it demonstrates
that the changes made to the setup handling earlier haven't broken USB
on this platform.
|
|
We provided references for all the others, provide it for the lm4f
driver too.
|
|
See https://github.com/libopencm3/libopencm3/issues/873
Commentary describing this patch originally by zyp:
```
After looking further into it, I've concluded that my preliminary
analysis looks correct. The problem is that setting CNAK before
the SETUP complete event is received causes a race condition. The
SETUP callback is called when the SETUP packet event is received,
which means that setting CNAK from the callback is too early.
Originally the problem was that CNAK was set by ep_read() which is
called by the callback. #672 solved this by moving CNAK out of
ep_read() and calling it after the SETUP complete event is received
instead.
The regression by #785 is caused by the introduction of flow control
calls into the SETUP callback. They also set CNAK.
To solve this properly, I propose changing the event handling code
to only call the SETUP callback after the SETUP complete event is
received. Unfortunately, this implies that the callback can't call
ep_read() itself anymore, because the packet has to be read out of
the FIFO before the SETUP complete event arrives. This implies a
change of the API between the hardware drivers and _usbd_control_setup().
```
L1 (st_usbfs) works and passes tests as before change
F4 (dwc_otg_fs) works and now passes tests. (yay)
LM4f still compiles, and has had the same style of implementation as
st_usbfs, however has not been tested on any hardware.
|
|
This is based on linux's gadget0 intel loopback tests, and also github
pr: https://github.com/libopencm3/libopencm3/pull/592
Note that this captures the currently broken control loopback issues on
dwc_otg devices.
See https://github.com/libopencm3/libopencm3/issues/873 and all linked
issues.
Current status is passing on f3, f0, and failing on f4.
|
|
usb_disconnect() is board/platform specific for chips that don't have
built-in handling for this. Allow the application to provide its own
version of usb_disconnect() to handle this.
See https://github.com/libopencm3/libopencm3/pull/924
|
|
This allows the pointer table to be in Flash, by using
"static const char * const strings[] = { ... };"
See https://github.com/libopencm3/libopencm3/pull/924
|
|
Proper closing tags, an outer grouping, and don't refer to missing
groups.
|
|
Just hooks up the target, no changes to the submitted documentation.
|
|
Basic memory map and system control.
Originally tracked via: https://github.com/libopencm3/libopencm3/pull/946
|
|
These are superseded by cm3/systick.h and the functions there.
Reported originally under: https://github.com/libopencm3/libopencm3/issues/125
|
|
They are all superseded by dwt.h, and the function dwt_enable_cycle_counter
Fixes https://github.com/libopencm3/libopencm3/issues/125
(But only for the cycle count enabling)
|
|
#defines are free.
Fixes https://github.com/libopencm3/libopencm3/issues/515
|
|
Original discussion at: https://github.com/libopencm3/libopencm3/pull/770
|
|
|
|
Originally suggested via https://github.com/libopencm3/libopencm3/pull/628
|
|
Fixes https://github.com/libopencm3/libopencm3/issues/476
Sets USB_COUNTn_RX reg fields : bits <14:10> are NUM_BLOCK; bit 15 is BL_SIZE.
- When (size <= 62), BL_SIZE must be 0 and NUM_BLOCK set to (size / 2).
- When (size > 62), BL_SIZE must be 1 and NUM_BLOCK=((size / 32) - 1).
Previous code improperly set NUM_BLOCK and assumed the requested size was set.
Now, we use the next largest legal buffer size. Examples:
size BL_SIZE NUM_BLOCK => Actual bufsize
0 0 0 ??? (illegal !)
1 0 1 2
63 1 1 64
Algo is valid for F102, F103 and F0 devices (USB_FS peripheral).
In addition, the new usb_set_ep_rx_bufsize() function returns the actual
size set.
Tested-by: Karl Palsson <karlp@tweak.net.au>
|
|
The loopback functionality was never implemented, not for regular bulk
endpoints. By adding it, and adding pairs of endpoints, we can easily
catch buffer management problems. These tests currently fail on
st_usbfs devices.
This did require renumbering the endpoints, as dwc_otg_fs only offers
three endpoints in each direction, and they can't be arbitrary numbers,
unlike on st_usbfs.
See https://github.com/libopencm3/libopencm3/pull/880 and related tickets.
|
|
I2C3 is on many parts, but wasn't properly supported with the register
definitions. Declare them centrally, just depending on the memorymap
defining them. On some parts, the rcc bits were defined, but not the
base registers.
Fixes: https://github.com/libopencm3/libopencm3/issues/820
|
|
Originally filed as https://github.com/libopencm3/libopencm3/pull/627
|
|
Could actually move to flash_common_f, but they have different names for
the same bit at present.
|