Topic : Debugger crash when eeprom writing

Forum : ST7/STM8

Original Post
Post Information Post
November 24, 2009 - 8:52am
Guest

Hi I´m using Ride7 BN55 with Rkit 2.24.09.0238 and working with STM8207R8.

When I try to debug the program always crash on this instruction:


*((PointerAttr u8*) Address) = Data;

This instruction is from the firmware, the program is:

#define DIRECCION_BASE_DE_LA_EEPROM             0x4000
#define DIR_EEPROM_VERSION         240

void FLASH_ProgramByte(u32 Address, u8 Data)
{
    //Check parameters 
   assert_param(IS_FLASH_ADDRESS_OK(Address));
    *((PointerAttr u8*) Address) = Data;
}

void guarda_en_la_eeprom(u32 dir, int valor)
   {
    FLASH_ProgramByte(DIRECCION_BASE_DE_LA_EEPROM + dir, valor);
   }

void guarda_version_eeprom(void)
   {
   guarda_en_la_eeprom(DIR_EEPROM_VERSION, 68);
   }

it crash when in the main I call "guarda_version_eeprom" but with breakpoints I have noticed that it fails in the instruction already mentioned.

but if I change the define "DIRECCION_BASE_DE_LA_EEPROM" to 0x400 it works fine, even it writes right in the address 0x4F0, (0x400 + 240).
why in the eeprom address (0x40F0) it fails?

Thank you very much

Regards

Alberto

Replies
Post Information Post
+1
0
-1
November 24, 2009 - 10:19am
Raisonance Support Team

Hi Alberto,

We have not been able to reproduce the crash here.
Can you upgrade your RKit-STM8 with the latest version, which offers some improved management of the EEPROM?
If you still have the problem, can you send us a zipped project containing the failing application, along with the .lst and .map files produced while building it.

Regards,
Bruno

+1
0
-1
November 24, 2009 - 10:21am
Guest

just comming to say that,

I upgrade the version and it works fine, thank you very much!!