cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L433 Flash memory erase

ASmit.19
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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

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

View solution in original post

3 REPLIES 3

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ASmit.19
Associate II

test //todo delete

Thank you!

Its worked for me.