diff options
author | Rodrigo L. Rosa <rodrigorosa.LG@gmail.com> | 2011-07-19 20:03:08 -0700 |
---|---|---|
committer | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-08-09 20:07:46 +0200 |
commit | e8543de820ac28db80eb9c22523cd5ee043ee0e9 (patch) | |
tree | 6b20032e50283d1acc55ab0025c2abb6a6d879e1 /src/target/dsp5680xx.c | |
parent | ba68ae8bd51e1430f64fcc606a5c272cef5dabc9 (diff) |
dsp5680xx fix FM clk
before doing anything with the flash module (FM) the clock divider must be set.
if erase_check was the first thing done with the FM after reset then an error would be generated because the clk divider was not set.
now erase_check sets the clk divider.
Diffstat (limited to 'src/target/dsp5680xx.c')
-rw-r--r-- | src/target/dsp5680xx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/target/dsp5680xx.c b/src/target/dsp5680xx.c index e3ec860b..fc1f9c64 100644 --- a/src/target/dsp5680xx.c +++ b/src/target/dsp5680xx.c @@ -1228,6 +1228,8 @@ int dsp5680xx_f_erase_check(struct target * target, uint8_t * erased,uint32_t se retval = dsp5680xx_halt(target); err_check_propagate(retval); } + retval = eonce_set_hfmdiv(target); + err_check_propagate(retval); // Check if chip is already erased. retval = dsp5680xx_f_execute_command(target,HFM_ERASE_VERIFY,HFM_FLASH_BASE_ADDR+sector*HFM_SECTOR_SIZE/2,0,&hfm_ustat,1); // blank check err_check_propagate(retval); |