Standalone SWD programator
|
Základní SWD IO, na začátku funkce platformě závislé ...
Zobrazit zdrojový text tohoto souboru.
Funkce | |
void | swd_enable (void) |
Přepnutí do SWD módu. ... | |
void | swd_flush (void) |
Pomocná funkce. | |
enum SWD_RESPONSES | swd_write (char APnDP, int A, unsigned long data) |
Obecný zápis na SWD. ... | |
enum SWD_RESPONSES | swd_read (char APnDP, int A, volatile unsigned long *data) |
Obecné čtení ze SWD. ... | |
Základní SWD IO, na začátku funkce platformě závislé
void swd_enable | ( | void | ) |
Přepnutí do SWD módu.
Send magic number to switch to SWD mode. This function sends many zeros, 1s, then the magic number, then more 1s and zeros to try to get the SWD state machine's attention if it is connected in some unusual state.
enum SWD_RESPONSES swd_read | ( | char | APnDP, |
int | A, | ||
volatile unsigned long * | data | ||
) |
Obecné čtení ze SWD.
This is one of the two core SWD functions. It can read from a debug port register or an access port register. It implements the host->target read request, reading the 3-bit status, and then reading the 33 bits data+parity.
APnDP | AP nebo DP |
A | ... |
data | data |
enum SWD_RESPONSES swd_write | ( | char | APnDP, |
int | A, | ||
unsigned long | data | ||
) |
Obecný zápis na SWD.
This is one of the two core SWD functions. It can write to a debug port register or to an access port register. It implements the host->target write request, reading the 3-bit status, and then writing the 33 bits data+parity.
APnDP | AP nebo DP |
A | ... |
data | data |