2019-09-20 01:38 PM
how to erase or program using by st cube ide stm32f030k6t6 ? after I have program ic PA13 and PA14 set as input pin. now I can't erase or debug with stlink swd . please help thanks
2019-09-20 01:50 PM
Pull BOOT0 HIGH so *your* code doesn't run
2019-09-20 07:20 PM
2019-09-21 11:26 AM
first many thanks you are 100% right. I have finally i erase and new program fallow your instruction . last week problem with my stlink debugger pin lose contact . that's why error device not found. finally thanks now I can use this two pin as output.
2019-09-21 11:32 AM
2019-09-27 01:11 PM
dear Clive
I need your help for store int data to flash memory . I am working on stm32f030k6t6.
please help me.
thanks.
2019-09-27 01:35 PM
What like static const int array[] = { 1, 2, 3, 4, 5 }; ??
2019-09-28 01:13 PM
yes dear Clive this my code and SETV is global veriable uint16_t. uint16_t SETV = 0 ;
I need to store this value in SETV after setting by user key up and dn.
in my circuit have 3 input key (1) UP (2) DN (3) SET.
UP key AND DN key is setting up and down and SET key is for store data in flash.
I don't know the sectors number in stm32f030k6t6.where to store and I don't know erase ,read write HAL instruction function
please help me thanks a lot.
I need to store value 0000 to 9999 .
/////-----------------------INTERUPT FUNCTION FOR SET KEY UP +1 AND -1 DN --------------------------
void KEY (void)
{
if (HAL_GPIO_ReadPin(UP_GPIO_Port,UP_Pin)) /// press. up key +1
{
SETV = SETV +1;
LD2ON;
DT10;
}
else
{
LD2OFF;
//INV = ADV1 ;
}
if (HAL_GPIO_ReadPin(DN_GPIO_Port,DN_Pin)). /// press down key for -1
{
SETV = SETV -1;
LD2ON;
DT10;
}
else
{
//INV = ADV1 ;
LD2OFF;
}
}
///--------------------------------------- END INTRUPT KEY FUNCTION ---------------------------------------------------------------
2019-09-28 01:55 PM
I'd imagine much of the specifics for the part are covered in the Data Sheet or Reference Manual. I'd probably use the last sector at the end of memory, and shrink the size available to the linker. You'll need to fetch the value from memory rather that use a static definition for the value in the code.
STM32Cube_FW_F0_V1.10.1\Projects\STM32F030R8-Nucleo\Examples\FLASH\FLASH_EraseProgram
2019-09-28 04:37 PM
dear Clive first thank you very much for help.
I try to understand erase and read in reference manual near 2 hour but I can't understand .
specially erase syntax line.please can you tell me where is clear I can understand .
if you tell me 2 or 3 line example I will be oblige .
thank you very much