2019-10-05 02:00 AM
Hello!
I made a mistake in my software and download it in MCU's flash memory. This mistake prevents me for downloading again. So i want to know is there any way to erase MCU's flash memory or something else...
I am using NUCLEO-L476RG board with SMT32L433.
The essence of mistake:
I configured All pins of GPIOA and GPIOB as IO pins and force them to constant change there state between "1" and "0" without any form of delay. PA13 and PA14 share with SWD signals connected to ST-LINK/V2-1 witch used for downloading.
Is there any way to solve this problem?
Thank you for your help,
Andrew
void portConfig()
{
GPIO_InitTypeDef GpioInit;
__GPIOA_CLK_ENABLE();
__GPIOB_CLK_ENABLE();
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_All);
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_All);
GpioInit.Pin = GPIO_PIN_All;
GpioInit.Mode = GPIO_MODE_OUTPUT_PP;
GpioInit.Pull = GPIO_NOPULL;
GpioInit.Speed = GPIO_SPEED_FREQ_MEDIUM;
HAL_GPIO_Init(GPIOA, &GpioInit);
HAL_GPIO_Init(GPIOB, &GpioInit);
while(1)
{
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_All, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_SET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_All, GPIO_PIN_RESET);
}
}
Solved! Go to Solution.
2019-10-05 02:04 AM
Use "Connect Under Reset" option or pull BOOT0 pin high.
2019-10-05 02:04 AM
Use "Connect Under Reset" option or pull BOOT0 pin high.
2019-10-05 03:09 AM
test //todo delete
2019-10-05 03:11 AM
Thank you!
Its worked for me.