Robert Fisk
85f965eaa0
Fix for occasional timeout on writes...
...
...Downstream was not always changing state correctly after closely
spaced interrupts.
Also improve flash-write-lockout function to avoid dependency on
optimisation level.
8 years ago
Robert Fisk
637f67fc14
Implement dynamic crystal frequency selection based on board revision.
...
Also fixed minor issue in hardware revision-detection function.
8 years ago
Robert Fisk
f9b7416df0
Sleep instead of busy-wait, approx 50% power reduction!
9 years ago
Robert Fisk
0d2d4d6341
Implement flash write lockout by spamming the unlock register, then
...
checking that the correct unlock sequence fails.
9 years ago
Robert Fisk
25ff531917
Tweaks to 1.0 firmware. Not completely working yet :(
9 years ago
Robert Fisk
e29ef84861
Modify firmware for v1.0 hardware with STM32F401RC micro:
...
- Processor-specific header
- Startup file
- Linker script
- Project settings
- Debugger config script
- Debugger project settings
- Board revision detection routines
9 years ago
Robert Fisk
1262c5337a
All tabs to spaces
9 years ago
Robert Fisk
08e6846cc5
Add missing option to clock configuration
9 years ago
Robert Fisk
21de622469
Added hardware check on bootup: fault LED will light if Upstream
...
firmware is placed on Downstream hardware or vice versa.
9 years ago
Robert Fisk
2983da24b2
Changed Upstream and Downstream SPI transfers back to DMA. DMA works
...
correctly now, either because SPI is in 16-bit mode, or because I found
all the other bugs!
Doubled SPI baudrate to 10.5Mbps. Transfer speed now limited (again) by
Downstream's lack of FIFO buffering in the USB host controller.
Also disabled DMA transaction half-complete interrupt in
stm32f4xx_hal_dma.c, as it wasn't doing anything useful.
9 years ago
Robert Fisk
58308c4a89
Added Mozilla Public License information to file headers.
...
Mozilla Public License v2.0 is compatible with the various licenses used
by ST and ARM.
9 years ago
Robert Fisk
ce03845623
Completed moving Upstream to interrupt-based SPI.
...
Although I am not entirely convinced this is necessary, as the SPI data
stall issue only appeared with optimisation off (-O0). Perhaps re-visit
this if Upstream needs more free CPU time later...
9 years ago
Robert Fisk
f24714cd8c
Revisit Upstream project to:
...
- Implement Upstream state machine, with Downstream-dependent device
emulation
- Add fault LED flashing
- Improve fault handling and freakouts
- Misc bug fixes
9 years ago
Robert Fisk
4350666330
Refactor a bunch of stuff in Upstream project to avoid endless confusion
...
with Downstream project.
Also fixed a couple of things in upstream_spi.c and
upstream_interface_msc.c but due to file rename the diff is not
obvious...
9 years ago
Robert Fisk
503d79de56
Streamlining Downstream project
9 years ago
Robert Fisk
69d1490faa
Upstream debugged and working again, emulating a 128MB storage device.
...
Implemented mock downstream_interface_msc.c for debugging purposes.
Multiple bugfixes and tweaks to:
- downstream_interface_msc.c
- downstream_spi.c
- usbd_core.c
- usbd_msc.c
- usbd_msc_scsi.c
- stm32f4xx_hal_pcd.c
9 years ago
Robert Fisk
d3da69eb07
Draft implementation of downstream SPI interface. Significant mods
...
required to USB MSC class, mainly in usbd_msc_scsi.c. Currently
untested!
9 years ago
Robert Fisk
6d7d86b2f5
Initial commit!
...
Upstream (device) firmware builds, emulates a small USB block device
filled with zeroes.
10 years ago