Код: Выделить всё
#include "stm32f4xx.h"
#include "stm32f4xx_flash.h"
#define DEVICE_ADDRESS 0x08008010
#define DEVICE_SECTOR FLASH_Sector_2
//void WriteDeviceAddress(char* data)
void WriteDeviceAddress(void)
{
FLASH_Unlock();
FLASH_EraseSector(FLASH_Sector_2,VoltageRange_3);
FLASH_ProgramHalfWord(0x08008010,0x5555);
FLASH_Lock();
}
int main (void)
{
while(1);
}