- sample input just after the falling clock edge, since the target
output changes with the rising clock edge
- bump retry max from 32 to 8192, since stm32f4 targets are observed
to issue WAITs for 1500+ txns at 4MHz if CPU is not halted
- (disabled) option to report retries back to m4
If the host receives the IN response packet but the ACK from the host
is lost, we'd be stuck until the next IN, which wouldn't come because
the host does a simple send-request / read-response thing. Instead,
don't wait for IN txns to complete unless there's already one outstanding.
This allows us to read the next request, at which point the host will
start an IN txn for the response, which will cause the previous IN txn
to complete.
Have printf always pass the correct string length to its output callback
(which is easy because it's already got this information at hand), and
save downstream code from having to defensively strlen() the string
passed in the callback.
Some code uses dprintf(), but nothing uses dputc(), dputs(), dwrite()
which provide a conditionalized alternative stdio path. Remove these
as groundwork for further tidying up, organization, and/or unification
of debug printing in lk.
- compatible with m3dev lpcboot tool
- supports lpc43xx with external spi flash right now
- suitable for acting as a second stage flash agent after rom dfu download
The big bit of unfinished work is supporting multiple queue'd requests
and queueing a request against an endpoint where requests are in progress
(neither work yet, both will result in things getting messed up).
This borrows liberally from the old LK MSM72xx UDC driver that existed
back in 2008. Turns out the MSM72xx and LPC43xx use the same UDC IP
block.
Code has been tidied up a bit, uses a hw header I threw together
before finding the old driver, and some udc common code has been
broken out into a separate file, but not yet a library.
Still needs some locking code and other cleanup, but enumeration
and bulk transfers are working.
Use the reserved cortex-m vectors 8 and 9 for a magic cookie and
pointer to a debugger info structure. This structure contains
pointers to the threadlist, the current thread pointer, and
offsets to important members of the thread structure. With
this information, an attached debugger can walk the threadlist
and obtain state, name, registers, etc for each thread.
Use global define WITH_DEBUGGER_INFO to enable this.