fixed bugs in multistepper: eeprom in flash + adc, tested on TMC2130, but don't work on TMC2230

This commit is contained in:
Edward Emelianov
2023-02-24 23:29:34 +03:00
parent 1a8345d4f0
commit 59d8f8f515
18 changed files with 172 additions and 130 deletions

View File

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