Skip to content

Commit

Permalink
Merge pull request #122 from sheaff/master
Browse files Browse the repository at this point in the history
STM32F4 flash while using DMA potential fix
  • Loading branch information
texane committed Jan 10, 2013
2 parents d66a700 + 0ed3907 commit 4cfc1f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flash/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ int main(int ac, char** av)
if (stlink_current_mode(sl) != STLINK_DEV_DEBUG_MODE)
stlink_enter_swd_mode(sl);

// Disable DMA - Set All DMA CCR Registers to zero. - AKS 1/7/2013
memset(sl->q_buf,0,4);
for (int i=0;i<8;i++) {
stlink_write_mem32(sl,0x40026000+0x10+0x18*i,4);
stlink_write_mem32(sl,0x40026400+0x10+0x18*i,4);
stlink_write_mem32(sl,0x40026000+0x24+0x18*i,4);
stlink_write_mem32(sl,0x40026400+0x24+0x18*i,4);
}
if (o.cmd == DO_WRITE) /* write */
{
if ((o.addr >= sl->flash_base) &&
Expand Down

0 comments on commit 4cfc1f6

Please sign in to comment.