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;
}
}
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;
}