aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/dsp5680xx_flash.c
diff options
context:
space:
mode:
authorRodrigo L. Rosa <rodrigorosa.LG@gmail.com>2011-08-30 14:19:09 -0700
committerRodrigo L. Rosa <rodrigorosa.LG@gmail.com>2011-08-30 15:09:34 -0700
commite1a2d7255eb8c282fc91e951c7453932c1e9a55f (patch)
tree275345efca78af0e9f7391ec1154fda03b239120 /src/flash/nor/dsp5680xx_flash.c
parent2aa14db67747d25df1f072f262dbc98e2169f718 (diff)
optional crc for flash writing
crc check was always performed on newly flashed data, now it is optional flash mem can be locked by writing a specific word to a specific address in flash. to verify flash, target must be halted, and this will (when the new halt sequence is implemented) require reseting the chip. if the target is reset after writing the lock words, then it will lock, hence the CRC will fail because it is not possible to read stuff from the target. also added a function that resets the jtag state machine. this is not used yet, but will be soon. it is implemented to allow strict control over JTAG state machine, necessary to implement to halt and unlocking sequences.
Diffstat (limited to 'src/flash/nor/dsp5680xx_flash.c')
-rw-r--r--src/flash/nor/dsp5680xx_flash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/dsp5680xx_flash.c b/src/flash/nor/dsp5680xx_flash.c
index 4ed72066..688493b3 100644
--- a/src/flash/nor/dsp5680xx_flash.c
+++ b/src/flash/nor/dsp5680xx_flash.c
@@ -157,7 +157,7 @@ static int dsp5680xx_flash_write(struct flash_bank *bank, uint8_t *buffer, uint3
LOG_ERROR("%s: Writing to odd addresses not supported. This chip uses word addressing, Openocd only supports byte addressing. The workaround results in disabling writing to odd byte addresses.",__FUNCTION__);
return ERROR_FAIL;
}
- retval = dsp5680xx_f_wr(bank->target, buffer, bank->base + offset/2, count);
+ retval = dsp5680xx_f_wr(bank->target, buffer, bank->base + offset/2, count, 0);
uint32_t addr_word;
for(addr_word = bank->base + offset/2;addr_word<count/2;addr_word+=(HFM_SECTOR_SIZE/2)){
if(retval == ERROR_OK)