stm32g4: Do not disable SWD by accident
Keep SWEN as 1 in FLASH->ACR register such that the SWD interface doesn't get disabled. Signed-off-by: Alex Voinea <voinea.dragos.alexandru@gmail.com>
This commit is contained in:
parent
516fdae2b7
commit
0972561783
|
@ -130,7 +130,7 @@ clock_setup(void)
|
|||
((CONFIG_CLOCK_FREQ>30000000) ? FLASH_ACR_LATENCY_1WS :
|
||||
FLASH_ACR_LATENCY_0WS)))));
|
||||
FLASH->ACR = (latency | FLASH_ACR_ICEN | FLASH_ACR_DCEN
|
||||
| FLASH_ACR_PRFTEN);
|
||||
| FLASH_ACR_PRFTEN | FLASH_ACR_DBG_SWEN);
|
||||
|
||||
enable_pclock(PWR_BASE);
|
||||
PWR->CR3 |= PWR_CR3_APC; // allow gpio pullup/down
|
||||
|
|
Loading…
Reference in New Issue