- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I am working on a project with PSoC 4.1 on CY8C5888AXQ-LP096
I need to store some data in the flash.
here is a code snippet:
----------------------------------------------------------------------------
unsigned char VMImetadata_t[256] = \
{0x24,0x24,0x12,0x12,0x12,0x12,0x12,0x12,\
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,\
(...)
0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,\
0x24,0x12,0x12,0x12,0x12,0x12,0x12,0x24};
result_vmi = CyWriteRowFull(0x03, 0x50, VMImetadata_t, 0x100);
--------------------------------------------------------------------------------------------------------
In my case CyWriteRowFull returns result_vmi = 9 and no data is stored in the flash.
What's the meaning of that?
The whole flash is unprotected.
Any suggestions to help me out are welcome and very appreciated.
Thanks
B.R.
GiorgioM.
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
User needs to acquire the die temperature at least once before Flash write. It is acquired by calling CySetTemp function. You can find more details on the flash programming algorithm from the System Reference Guide available in PSoC Creator, Help > System Reference Guides.
Please refer to the Flash Example code example available as part of PSoC Creator.
CySetTemp();
returnValue = CyWriteRowData(ARRAY_ID, ARRAY_ID_ROW_ADDR, rowPattern);
/* Check if operration is successful */
if (returnValue != CYRET_SUCCESS)
{
LED_Error_Write(LIGHT_ON);
CyHalt(0x00u);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I solved the problem by invoking CySetTemp()
* Holds the die temperature for the flash writing algorithm. The first byte is
* the sign of the temperature (0 = negative, 1 = positive). The second byte is
* the magnitude.
I did not found this in my documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My recommendation is to use an "Emulated EEPROM (Em_EEPROM)" component.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
User needs to acquire the die temperature at least once before Flash write. It is acquired by calling CySetTemp function. You can find more details on the flash programming algorithm from the System Reference Guide available in PSoC Creator, Help > System Reference Guides.
Please refer to the Flash Example code example available as part of PSoC Creator.
CySetTemp();
returnValue = CyWriteRowData(ARRAY_ID, ARRAY_ID_ROW_ADDR, rowPattern);
/* Check if operration is successful */
if (returnValue != CYRET_SUCCESS)
{
LED_Error_Write(LIGHT_ON);
CyHalt(0x00u);
}