Open loecha55 opened 1 year ago
I check it this weekend! Will give an answer soon.
Am 14.09.2023 um 16:31 schrieb loecha55 @.***>:
XMCEEPROMLib version
System information
XMCEEPROMLib version - Windows11 @ Arduino IDE Version: 2.1.1 @ Infineon XMC Flasher Lite (JLink Library Version: V7.92b) - XMC 2Go (KIT_XMC_2GO_XMC1100_V1)
Issue description
After initialisation of EEPROM flash i can read the EEPROM.status() with the result of "0". But as soon as i try to read EEPROM adress (already 0 adress), i get freezing of the controller (XMC 2Go --> XMC1100 with 64Kbyte Flash).
I was able to track it to the "XMC_FLASH_ReadBlocks( (uint32_t*)(xmcdatasector+b16), (uint32_t)blockbuffer, 1);" function where controller freeze. Interestingly, if i initialize the EEPROM with 2Byte also "EEPROM.begin(2);" i doesnt freeze but deliver me always xFF as the read result.
I guess the problem is, as you already mensioned in your description: "There is no mechanism implemented to check if the flash blocks used are free. If you fill up your flash with program code and then start the EEPROM it will break.". My current sketch uses already 29124 bytes (44%) of program storage space.
Is there a workaround to get it running, even with quite big program space?
— Reply to this email directly, view it on GitHub https://github.com/slviajero/XMCEEPROMLib/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56CR6VYMR74LOBUA5YLX2MIMPANCNFSM6AAAAAA4YGXWXA. You are receiving this because you are subscribed to this thread.
For a small system with only 32 kB you could do the following, start the EEPROM with
EEPROM.begin(1024, 32768).
The begin method works like this:
void begin(uint16_t eepromsize=4096, uint32_t flashsize=65536)
The first parameter is the EEPROM size in bytes and the second the flash size. To determine the right data sector, both parameters need to match the physical layout of the MCU.
A begin(2) doesn’t work, because in the first line of the begin method the code reduces the size to full pages which means you have a 0 EEPROM size. The size has to be integer multiples of the page size which currently is hardcoded to 256.
Am 14.09.2023 um 16:31 schrieb loecha55 @.***>:
XMCEEPROMLib version
System information
XMCEEPROMLib version - Windows11 @ Arduino IDE Version: 2.1.1 @ Infineon XMC Flasher Lite (JLink Library Version: V7.92b) - XMC 2Go (KIT_XMC_2GO_XMC1100_V1)
Issue description
After initialisation of EEPROM flash i can read the EEPROM.status() with the result of "0". But as soon as i try to read EEPROM adress (already 0 adress), i get freezing of the controller (XMC 2Go --> XMC1100 with 64Kbyte Flash).
I was able to track it to the "XMC_FLASH_ReadBlocks( (uint32_t*)(xmcdatasector+b16), (uint32_t)blockbuffer, 1);" function where controller freeze. Interestingly, if i initialize the EEPROM with 2Byte also "EEPROM.begin(2);" i doesnt freeze but deliver me always xFF as the read result.
I guess the problem is, as you already mensioned in your description: "There is no mechanism implemented to check if the flash blocks used are free. If you fill up your flash with program code and then start the EEPROM it will break.". My current sketch uses already 29124 bytes (44%) of program storage space.
Is there a workaround to get it running, even with quite big program space?
— Reply to this email directly, view it on GitHub https://github.com/slviajero/XMCEEPROMLib/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSY56CR6VYMR74LOBUA5YLX2MIMPANCNFSM6AAAAAA4YGXWXA. You are receiving this because you are subscribed to this thread.
XMCEEPROMLib version
System information
XMCEEPROMLib version - Windows11 @ Arduino IDE Version: 2.1.1 @ Infineon XMC Flasher Lite (JLink Library Version: V7.92b) - XMC 2Go (KIT_XMC_2GO_XMC1100_V1)
Issue description
After initialisation of EEPROM flash i can read the EEPROM.status() with the result of "0". But as soon as i try to read EEPROM adress (already 0 adress), i get freezing of the controller (XMC 2Go --> XMC1100 with 64Kbyte Flash).
I was able to track it to the "XMC_FLASH_ReadBlocks( (uint32_t)(xmcdatasector+b16), (uint32_t*)blockbuffer, 1);" function where controller freeze. Interestingly, if i initialize the EEPROM with 2Byte also "EEPROM.begin(2);" i doesnt freeze but deliver me always xFF as the read result.
I guess the problem is, as you already mensioned in your description: "There is no mechanism implemented to check if the flash blocks used are free. If you fill up your flash with program code and then start the EEPROM it will break.". My current sketch uses already 29124 bytes (44%) of program storage space.
Is there a workaround to get it running, even with quite big program space?