ataradov / embedded-swd Goto Github PK
View Code? Open in Web Editor NEWEmbedded implementation of the SWD interface
License: BSD 3-Clause "New" or "Revised" License
Embedded implementation of the SWD interface
License: BSD 3-Clause "New" or "Revised" License
I am trying to understand the semantic of the addr
parameter passed to the dap_target_write_page
function.
Is this the page number or the absolute address of the first flash byte to be written (and has thus be aligned to page boundaries)?
Moreover I'm wondering about the significance of 0x8000 passed to the function. Does this have to do something with top of RAM of the target chip?
What I'm trying to do is to extend your example to not only flash a single page, but to flash a hole binary to a target.
I am trying to port it to my custom microcontroller but it got stuck at "Erasing entire device..." when flashing STM32F103C8T6.
do I need to change dap target values?
In the code I see that writes and reads are starting with a clock low:
static void dap_swd_write(uint32_t value, int size)
{
for (int i = 0; i < size; i++)
{
DAP_CONFIG_SWDIO_write(value & 1);
DAP_CONFIG_SWCLK_clr();
dap_delay_loop();
DAP_CONFIG_SWCLK_set();
dap_delay_loop();
value >>= 1;
}
}
If I look in the ARM documentation, https://documentation-service.arm.com/static/5f900a61f86e16515cdc0610?token= I see that in the figure they start with the clock high.
However, I have seen more code like yours that starts with the clock low. For example at https://github.com/atc1441/ESP32_nRF52_SWD/blob/main/ESP32_SWD_WIFI/swd.cpp.
Maybe it doesn't matter but I have the idea that you guys know what you are doing. So, hereby my question: Why is the clock implemented with first a half cycle LOW and then a half cycle HIGH.
I know this is not an active project, but it would be super great to learn to know why!
I already wondered in the past whether it would be possible to combine edbg and free-dap into one project in order to increase flashing speed (I guess the slowest path is the USB HID communication between edbg and free-dap). I know that Adafruit has done something similar called Adafruit DAP.
Therefore my question is: what's the difference between this project, free-dap, edbg and Adafruit DAP :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.