mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
Fix MCK in usart, our MCK is 16*12/2/2
This commit is contained in:
parent
362d7b6956
commit
e9eb764358
2 changed files with 4 additions and 2 deletions
|
@ -135,7 +135,9 @@ void PrintAndLogEx(logLevel_t level, const char *fmt, ...) {
|
||||||
} else {
|
} else {
|
||||||
snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
|
snprintf(buffer2, sizeof(buffer2), "%s%s", prefix, buffer);
|
||||||
if (level == INPLACE) {
|
if (level == INPLACE) {
|
||||||
fprintf(stream, "\r%s", buffer2);
|
char buffer3[MAX_PRINT_BUFFER + 20] = {0};
|
||||||
|
memcpy_filter_ansi(buffer3, buffer2, sizeof(buffer2), !session.supports_colors);
|
||||||
|
fprintf(stream, "\r%s", buffer3);
|
||||||
fflush(stream);
|
fflush(stream);
|
||||||
} else {
|
} else {
|
||||||
fPrintAndLog(stream, "%s", buffer2);
|
fPrintAndLog(stream, "%s", buffer2);
|
||||||
|
|
|
@ -225,7 +225,7 @@ void usart_init(uint32_t baudrate, uint8_t parity) {
|
||||||
// note that for very large baudrates, error is not neglectible:
|
// note that for very large baudrates, error is not neglectible:
|
||||||
// b921600 => 8.6%
|
// b921600 => 8.6%
|
||||||
// b1382400 => 8.6%
|
// b1382400 => 8.6%
|
||||||
pUS1->US_BRGR = 48054841 / (usart_baudrate << 3);
|
pUS1->US_BRGR = 48000000 / (usart_baudrate << 3);
|
||||||
|
|
||||||
// Write the Timeguard Register
|
// Write the Timeguard Register
|
||||||
pUS1->US_TTGR = 0;
|
pUS1->US_TTGR = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue