From f4d2c46eb36eb50ff1a5ce2afaa02c16c483842d Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 18 Dec 2018 20:32:10 -0500 Subject: [PATCH] fomu-flash: print out status registers as part of id Print the contents of SR1, SR2, and SR3. Not all chips have SR3, so this may be 0xff. Signed-off-by: Sean Cross --- fomu-flash.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fomu-flash.c b/fomu-flash.c index fbc6030..1e27a48 100755 --- a/fomu-flash.c +++ b/fomu-flash.c @@ -312,6 +312,9 @@ int main(int argc, char **argv) { printf("Memory type: %02x\n", id.memory_type); printf("Memory size: %02x\n", id.memory_size); printf("Serial number: %02x %02x %02x %02x\n", id.serial[0], id.serial[1], id.serial[2], id.serial[3]); + printf("SR1: %02x\n", spiReadSr(spi, 1)); + printf("SR2: %02x\n", spiReadSr(spi, 2)); + printf("SR3: %02x\n", spiReadSr(spi, 3)); break; }