From b57750256f7170defbbeb26314063628901e18e1 Mon Sep 17 00:00:00 2001 From: hadaq Date: Wed, 2 Sep 2009 14:49:17 +0000 Subject: [PATCH] do not protect mdc sector at end of programming --- trbrich/trbflash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/trbrich/trbflash.c b/trbrich/trbflash.c index 7be5f2c..ab7d75e 100644 --- a/trbrich/trbflash.c +++ b/trbrich/trbflash.c @@ -636,7 +636,7 @@ static int programImageBuffer(uint16_t trb_address, unsigned int size, if ((flashType == FLASH_ADCM1) || (flashType == FLASH_ADCM2)) { /* Enable writing */ - if (sendCommand(trb_address, 0x06 << 24, 0) == -1) { + if (sendCommand(trb_address, 0x06 << 24, 0x00) == -1) { fprintf(stderr, "\nError > program: write enable, aborting\n"); return -1; } @@ -695,8 +695,8 @@ static int programImageBuffer(uint16_t trb_address, unsigned int size, } if ((verifyOnly == 0) && (flashType == FLASH_MDC)) { - /* Protect all Sectors */ - if (writeStatusRegister(trb_address, 0x3c) == -1) { + /* Protect all Sectors i.e. write 0x3c to statusRegister */ + if (writeStatusRegister(trb_address, 0x00) == -1) { fprintf(stderr, "\nError > program: protect all sectors, aborting\n"); return -1; } -- 2.43.0