-
-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase performance of SWD and JTAG bitbanging #1688
base: main
Are you sure you want to change the base?
Commits on Jan 4, 2024
-
jtagtap: Extract platform_delay_busy()
* Copy the snippet verbatim from 10 identical places * Ask GCC to please inline it back (so codegen does not change) compromising 116 bytes of flash for less jumping around
Configuration menu - View commit details
-
Copy full SHA for 04b0080 - Browse repository at this point
Copy the full SHA 04b0080View commit details -
swdptap: Extract platform_delay_busy()
* Copy the snippet verbatim from 10 similar places, preserving the +1 in argument (turnaround/parity) for automatic 0 clock delay instead of checking against UINT32_MAX * Mark as static for GCC to inline it back (so codegen does not change) compromising 96 bytes of flash for less jumping around
Configuration menu - View commit details
-
Copy full SHA for ea3e132 - Browse repository at this point
Copy the full SHA ea3e132View commit details -
jtagtap, swdptap: Replace platform_delay_busy() with a faster version
* Use predecrement and check against zero, as before * Stop touching the stack with `volatile` variables, a register is sufficient * Use normal SysTick platform_delay() in jtagtap_reset(), which is both longer duration and does not depend on platform HCLK.
Configuration menu - View commit details
-
Copy full SHA for 682349c - Browse repository at this point
Copy the full SHA 682349cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e70d536 - Browse repository at this point
Copy the full SHA e70d536View commit details -
Configuration menu - View commit details
-
Copy full SHA for 39673a0 - Browse repository at this point
Copy the full SHA 39673a0View commit details -
timing_stm32: Do not default clk_divider to 0; fix frequency_get()
* Avoid a zero loops delay, which underflows in `platform_delay_busy()`, hanging the adapter
Configuration menu - View commit details
-
Copy full SHA for 1b4bbd9 - Browse repository at this point
Copy the full SHA 1b4bbd9View commit details -
timing_stm32: Update factor and offset for uncalibrated platforms
* For STM32F4, dial in 12 & 4 as measured by LA and MSO. This became faster thanks to dropping double writes and volatile on-stack counters. * For STM32F0, dial in slightly bigger 16 & 6 because armv6-m codegen is different. * For STM32F1, dial in 18 & 4: less than 22 thanks to no volatile on-stack counters, and similar busy delay impact (armv7-m). * For everything else, keep the old numbers in hope someone measures it later.
Configuration menu - View commit details
-
Copy full SHA for ad0f9b3 - Browse repository at this point
Copy the full SHA ad0f9b3View commit details -
swdptap: Tweak
_no_delay()
timings for a more even duty cycle* Reference: jtagtap_tms_seq_no_delay(). Also add comments. * Use appropriate type for TMS state output.
Configuration menu - View commit details
-
Copy full SHA for 12c40bc - Browse repository at this point
Copy the full SHA 12c40bcView commit details -
swdptap: Handle no_delay parity/turnaround as well
* This allows dropping the 0-loops check from delay_busy
Configuration menu - View commit details
-
Copy full SHA for 4bff6d1 - Browse repository at this point
Copy the full SHA 4bff6d1View commit details -
jtagtap: optimize _no_delay() paths at -O3 like swdptap
* Also update signature of jtagtap_tms_seq() (s/ticks/clock_cycles/)
Configuration menu - View commit details
-
Copy full SHA for 1a39f13 - Browse repository at this point
Copy the full SHA 1a39f13View commit details -
jtagtap: Equalize _next & _cycle, replace line reset
* SWD line reset needs 50 clocks with high TMS/SWDIO, this was achieved by looping over jtagtap_next() which incurs function call delays; * Use jtagtap_cycle() instead which seems appropriate here, and discards TDO anyways; * The adiv5_swd.c:swd_line_reset_sequence() counterpart seems less fitting to duplicate in jtagtap. * Annotate any new nops in hot no_delay path.
Configuration menu - View commit details
-
Copy full SHA for d425df2 - Browse repository at this point
Copy the full SHA d425df2View commit details -
jtagtap: Protect tdi_tdo_seq from writing into NULL data_out
...by redirecting to faster tdi_seq * Do not use nullability attributes yet
Configuration menu - View commit details
-
Copy full SHA for 58a2425 - Browse repository at this point
Copy the full SHA 58a2425View commit details