Skip to main content
ASmit.19
Associate
Oct 5, 2019 9:00 AM UTC
Solved

STM32L433 Flash memory erase

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

This topic has been closed for replies.
Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Oct 5, 2019 9:04 AM UTC

Use "Connect Under Reset" option or pull BOOT0 pin high.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
Oct 5, 2019 9:04 AM UTC

Use "Connect Under Reset" option or pull BOOT0 pin high.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ASmit.19
ASmit.19Author
Associate
Oct 5, 2019 10:11 AM UTC

Thank you!

Its worked for me.

ASmit.19
ASmit.19Author
Associate
Oct 5, 2019 10:09 AM UTC

test //todo delete