2024-11-15 01:06 AM - last edited on 2024-11-25 12:58 AM by Andrew Neil
hello i am using stm32f429i-disc1 microcontroller board in this how to generate flash code (eeprom)
Your other thread showed a major confusion between what is a "microcontroller", and what is a "board" - so edited for clarity.
2024-11-15 04:29 AM - edited 2024-11-15 04:32 AM
This code is not build on stm32f429i-disc1 and iam using stm32cube ide software
2024-11-15 04:38 AM
What do you mean?
2024-11-15 09:20 PM
when i build this so many error are showing ?
2024-11-15 10:21 PM - last edited on 2024-11-25 01:00 AM by Andrew Neil
(merged from duplicate thread)
hello iam using srm32f429i-disc1 microcontroller board and i want refrence code for emulated eeprom
2024-11-15 10:25 PM
I think you have to use the STM32 HAL library.
2024-11-15 10:59 PM - edited 2024-11-15 10:59 PM
yes iam using HAL library
2024-11-15 11:00 PM - last edited on 2024-11-25 01:00 AM by Andrew Neil
hello iam using srm32f429i-disc1 microcontroller board and i want refrence code for emulated eeprom
2024-11-16 01:17 AM
this code is not build in stm32cubeide
2024-11-16 03:13 AM
The EEPROM emulation itself is just the eeprom.c & eeprom.h files.
The rest is just a "test harness" to demonstrate that.
So you should be able to:
2024-11-18 12:05 AM - last edited on 2024-11-18 03:15 AM by Andrew Neil
Hello,
I want to read and write string in eeprom this is my code but in this code string is not storing in eeprom
#include "main.h"
#include <stdio.h>
/** @addtogroup EEPROM_Emulation
* @{
*/
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Virtual address defined by the user: 0xFFFF value is prohibited */
uint16_t VirtAddVarTab[NB_OF_VAR] = {0x5555, 0x6666, 0x7777};
uint16_t VarDataTab[NB_OF_VAR] = {0, 0, 0};
uint16_t VarValue,VarDataTmp = 0;
/* Private function prototypes -----------------------------------------------*/
static void SystemClock_Config(void);
static void Error_Handler(void);
/* Private functions ---------------------------------------------------------*/
/**
* @brief Main program.
* None
* @retval None
*/
//char writeString[] = "Hello Hashmi";
char readString[64]={0};
int main(void)
{
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock to 180 MHz */
SystemClock_Config();
/* Unlock the Flash Program Erase controller */
HAL_FLASH_Unlock();
/* Configure LED3 */
BSP_LED_Init(LED3);
/* EEPROM Init */
if( EE_Init() != EE_OK)
{
Error_Handler();
}
if((EE_ReadVariable(VirtAddVarTab[0], &readString[0])) != HAL_OK)
{
Error_Handler();
}
while(1)
{
char writeString[] = "Hello";
for (int i = 0; i < sizeof(writeString); i++)
{
if (EE_WriteVariable(VirtAddVarTab[0] + i, (uint16_t*)&writeString[i]) != HAL_OK)
{
Error_Handler();
}
}
}
}