Uwe Bonnes
7a7266a0f7
Speed up JTAG.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
59e03dea27
Keep TMS floating until scanning.
...
NRF5x shares nRST with SWDIO and otherwise does not run until scan is done.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
97561fc5cc
stlink: Decrease delay with SWD turn around for native,stlink and swlink.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
5548d54626
common/swdptap: some clean up.
...
Remove superfluous transaction.
Use native variable size.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
7e3fe352ad
adiv5_swdp.c: Use swdptap_seq_out for initialiation sequence.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
e54a826745
common/swdptap.c: Speed up by "unrolling" swd.._seq_...() for GPIO.
...
Try to have sensible setup/hold times by evenntually duplicated or
logically useless port commands.
Loading code to RAM on a STM32L476 got up from 46 to 83 kB/sec.
2018-06-26 19:50:14 +02:00
Uwe Bonnes
633af5bb85
libftdi/jtagtap.c: Fix error introduced with commit de33473
...
Seen when scanning e.g. Zync with mon jtag 6 4.
2018-06-26 17:43:06 +02:00
Uwe Bonnes
2657aa6fbb
libftdi: Allow more flexible Swd Read/Write Switching.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
df05d7ce7b
libftdi: Allow device specific port/pin to read SWD bitbanged.
...
Gracefully abort swd scan if devices can not do SWD.
Best effort to indicated SWD capability on existing cables and
add descriptions for the cables.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
fce25b9fd5
libftdi/swdptap.c: Substantial speed increase for bitbanging SWD.
...
Provide the swd sequences unrolled.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
992ccf91a9
libftdi/swdptap.c: Use MPSSE Mode for bitbanging SWD.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
2ec078cfcf
libftdi/jtagtap.c: Allow NULL as one DI/DO argument jtagtap_tdi_tdo_seq.
...
Implement jtagtap_tdi_seq() by calling jtagtap_tdi_tdo_seq().
2018-05-30 19:21:03 +02:00
Uwe Bonnes
de33473535
libftdi/jtagtap: Copy DI direct into the write buffer.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
aa938c6dae
libftdi/jtagtap: Try harder to initialize Ftdi MPSSE jtag mode.
...
After "mon s" at least the second "mon j" now succeeds again.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
c548e307fe
libftdi/jtagtap: Clean up code.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
7d45bd4869
ibftdi/jtagtap: Remove magic numbers.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
6f0a46d9c1
libftdi: Export active cable description.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
68c7180376
libftdi: Add ftdiswd variant.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
f4bc6f9ddd
libftdi/platform.c: Issue SEND_IMMEDIATE before reading.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
744deb678d
libftdi/platform.c: Only set bit direction with MPSSE SET_BIT_XXXX.
2018-05-30 19:21:03 +02:00
Uwe Bonnes
6127a6431e
stlink: Check nRST line level when setting SRST.
...
Problem: On some boards flashing hanged.
Cause: Releasing SRST caused a slow rise of nRST and flashing
started while the target still was in reset.
Attention: platform_delay(ms) only resolved 0.1 s.
Nucleo-P boards have SRST unconnected to target nRST by default.
2018-04-23 10:48:05 +12:00
Uwe Bonnes
72c1498ae1
stlink: Make SWO Trace Buffer smaller.
...
Changes for delayed memory map setup otherwise overflow SRAM silently.
2018-04-23 10:48:05 +12:00
Uwe Bonnes
fc25a3339a
traceswoasync: Implement async swo for stm32.
...
Use for stlink.
Uses dma with large buffer.
Pull up swo to provide idle level on unconnected swo pin.
2018-03-27 13:40:49 +02:00
Uwe Bonnes
93bc3a155a
traceswo: Provide command option for async swo.
2018-03-27 13:40:49 +02:00
Uwe Bonnes
3e3e450408
cdcacm.c: Use less buffer for the usb_uart buffers and reallocate.
...
With 128 bytes for both usb_uart buffers, traceswo gives errors!
Keep the size for the receive buffer and diminisch the transmit buffer,
as there is no flow control to the device.
Probably related to https://github.com/libopencm3/libopencm3/issues/477
2018-03-27 13:40:49 +02:00
Adam Heinrich
f5cac4c78d
platforms/stm32: Ignore noise errors on USBUART
2018-01-13 21:11:17 +01:00
Gareth McMullin
9a5b31c37b
Fix fallthrough warnings on gcc 7
2017-10-09 11:07:29 +13:00
Gareth McMullin
f27f3bad5c
libftdi: Fix tdi_tdo_seq result unpacking
2017-10-05 08:26:33 +13:00
Gareth McMullin
0ed66547d5
Fix libopencm3 breakage
2017-09-25 11:17:03 +13:00
Uwe Bonnes
4966168802
s[t|w]link: Implement ENABLE_DEBUG.
2017-09-23 16:40:28 +02:00
Uwe Bonnes
ce1ef6e41b
stm32: Move rdi handling to common stm32 code.
2017-09-23 16:39:35 +02:00
Uwe Bonnes
203f6702d8
Flashsize_F103: Options for BMP on STM32F103C8 devices
2017-09-21 23:05:20 +02:00
Uwe Bonnes
963df9febc
stlink: Use common initialization and detect V2.1 boards.
...
Factor out hardware revision detection, USB detach and power settings, as
all three program (bootloader, bmp and dfu-upgrade) need it.
2017-09-21 18:43:06 +02:00
Gareth McMullin
2eb2f8edd7
Use vector_table symbol for assignment of SCB_VTOR.
2017-06-09 13:07:06 +12:00
Uwe Bonnes
a7771fa23f
stlink/swlink: Remove missleading comments.
2017-06-08 18:25:43 +02:00
Uwe Bonnes
8cc2c44dbf
f4discovery: Use Magic constant in RAM for Bootloader entry.
2017-05-11 22:21:38 +02:00
Uwe Bonnes
a0e47c392b
f4_discovery: Clean up platform.h and Readme.
2017-05-11 21:53:01 +02:00
Uwe Bonnes
814eb0e3a2
f4discovery: Make DFU work (again?)
2017-05-11 21:52:24 +02:00
Uwe Bonnes
f5dd3006fb
STM32: Generate same serial number as internal DFU bootloader.
2017-05-11 21:52:24 +02:00
Uwe Bonnes
b7235da97f
dfucore.c: Announce no writable bootloader pages when device is read proteced
...
or bootloader is write protected.
Device read protection or write protection on first 4 bootloader pages
can only be removed by mass erase. Triggering mass erase with a program
running from flash is doomed for failure.
User can force bootloader update, at their own risk to brick the device.
2017-05-07 13:19:37 +02:00
Uwe Bonnes
b09a522f37
STM32F103: Use flash size from device for DFU string.
...
Complements #204 .
STLinkV2-1 has F103CB on board! F103C8 on older Stlinks can use upper flash
with hopefully acceptable error rate.
For F103C8 devices, user has to give the force option to dfu-utils.
2017-05-07 13:19:37 +02:00
Uwe Bonnes
5af76a1b74
dfu_f1/dfu_upgrade: Do not set read protection.
...
As the first 4 pages of the bootloader will always keep write protection
once read protection is applied, with the second update of the bootloader
only the higher pages where updated effectivly.
In most cases this resulted in an inaccessible device!
2017-04-29 14:58:41 +02:00
Gareth McMullin
b10971b19b
Merge pull request #206 from UweBonnes/dfu-upload
...
Dfu upload
2017-04-27 10:07:37 -07:00
Gareth McMullin
633662dbb3
Hold TMS high during reset.
...
This is a questionable fix for the Kinetis K22F that samples
this pin on release from reset to enable its EzPort which
makes the flash unusable and disables the rest of the micro.
2017-04-21 11:05:07 +12:00
Gareth McMullin
e5395aaba7
Merge pull request #91 from schodet/usb-vbus
...
Fix usage of USB_VBUS
2017-04-18 08:22:57 +12:00
Uwe Bonnes
d796571438
Implement DFU_UPLOAD.
2017-04-15 14:26:03 +02:00
Uwe Bonnes
1d8ebcd75f
Handle SET_ADDRESS according to DFUSE specs.
2017-04-14 15:16:59 +02:00
Gareth McMullin
394fd4894b
Increase st-link flash allowance to 128K.
...
Although the devices are only documented to have 64K flash,
they have been obeserved to have a full 128K, although the undocumented
half may be untested and have problems.
2017-04-13 09:01:26 +12:00
Gareth McMullin
7ba2987a83
native: Fix macros for setting pin mode.
...
Fixes #184
2017-01-24 10:49:45 +13:00
Gareth McMullin
a77fb9ac1b
Merge pull request #180 from paramaggarwal/patch-1
...
Actual pin mappings and the comment differ!
2017-01-09 14:39:06 +13:00