Fix lf t55xx trace: read the correct block

This commit is contained in:
Philippe Teuwen 2019-03-31 01:13:59 +01:00
parent 032062cfe9
commit 720c410278
2 changed files with 5 additions and 3 deletions

View file

@ -1079,7 +1079,7 @@ int CmdT55xxReadTrace(const char *Cmd) {
// sanity check.
if (!SanityOfflineCheck(false)) return 1;
if (!AquireData(T55x7_PAGE1, REGULAR_READ_MODE_BLOCK, pwdmode, password))
if (!AquireData(T55x7_PAGE1, T55x7_TRACE_BLOCK1, pwdmode, password))
return 1;
}
@ -1914,7 +1914,7 @@ bool tryDetectP1(bool getData) {
bool st = true;
if (getData) {
if (!AquireData(T55x7_PAGE1, 1, false, 0))
if (!AquireData(T55x7_PAGE1, T55x7_TRACE_BLOCK1, false, 0))
return false;
}
@ -2043,7 +2043,7 @@ int CmdT55xxDetectPage1(const char *Cmd) {
if (errors) return usage_t55xx_detectP1();
if (!useGB) {
if (!AquireData(T55x7_PAGE1, 1, usepwd, password))
if (!AquireData(T55x7_PAGE1, T55x7_TRACE_BLOCK1, usepwd, password))
return false;
}
bool success = tryDetectP1(false);

View file

@ -29,6 +29,8 @@
#define T55x7_CONFIGURATION_BLOCK 0x00
#define T55x7_TRACE_BLOCK1 0x01
#define T55x7_TRACE_BLOCK2 0x02
#define T55x7_PAGE0 0x00
#define T55x7_PAGE1 0x01
#define T55x7_PWD 0x00000010