mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 11:54:30 +03:00
fixed bugs in multistepper: eeprom in flash + adc, tested on TMC2130, but don't work on TMC2230
This commit is contained in:
@@ -175,10 +175,10 @@ static int erase_flash(const void *start, const void *end){
|
||||
FLASH->AR = (uint32_t)Flash_Data + i * blocksize;
|
||||
FLASH->CR |= FLASH_CR_STRT;
|
||||
while(FLASH->SR & FLASH_SR_BSY) IWDG->KR = IWDG_REFRESH;
|
||||
FLASH->SR |= FLASH_SR_EOP;
|
||||
FLASH->SR = FLASH_SR_EOP;
|
||||
if(FLASH->SR & FLASH_SR_WRPRTERR){
|
||||
ret = 1;
|
||||
FLASH->SR |= FLASH_SR_WRPRTERR;
|
||||
FLASH->SR = FLASH_SR_WRPRTERR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user