- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how to use Auxiliary flash. mean how to read or write api's..?
is there a limitation on write cycle..?
is this can be used for event log ..?
is can we have file system like fat16,fat32, etc ..?
can i get the sample code example.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
Yes for PSoC Creator, you can use the PSoC_EmEEPROM_PSoC6 code example as shown:
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
By auxillary flash on the CYBLE-416045-02, do you mean to use a part of the flash to store your user data in a non-volatile state.
There is a dedicated 32KB of flash that can be used an an emulated EEPROM and the code example for this can be found in project creator as below:
In this code example, you can alternatively use the user flash instead of the dedicated emulated EEPROM area if you require a storage size greater than 32KB.
The write cycle limitation is 100K cycles for the same.
If you require file system like fat16, you can refer this code example and then use the emFile library in your firmware to develop the same. Currently we do not have a code example were the emFile library is used with the user flash or emulated EEPROM.
Hope this helps.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
Can you please let me know the amount of data (in bytes) that you wish to write every second?
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
If you are planning to log the 20 Bytes of data every 1 second into the Emulated EEPROM, then you will finish up your 32Kb or emulated EEPROM in 30 minutes (Provided you use wear levelling option when writing the 20 bytes of data).
If you want to log data like this for more than 30 minutes, then I would suggest you to go for a different storage mechanism like an external flash or SD Card. But the SD Host Controller interface for SD Card is not available on PSoC 63 devices like the CYBLE-416045-02.
So your only option here would be to go for an external flash.
Can you please let me know how long the data should be retained in the auxillary flash for your application before the flash is erased again to log the new set of data?
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AlenAn14 we will use the circular style of writing the data, before it writes to 1st 20bytes we will take the action for that data.
you suggest me how can I read/write only 20bytes.? api's or a piece of code which demo this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
There is a dedicated 32KB of flash that can be used an an emulated EEPROM and the code example for this can be found in project creator as below:
The GitHub repo for this code example : https://github.com/Infineon/mtb-example-psoc6-emulated-eeprom
You can refer to this example and use the Cy_Em_EEPROM_Write() and Cy_Em_EEPROM_Read() API's to write and read your data to the devices emulated EEPROM.
In this example there is a macro called EEPROM_SIZE which is set to 256 Bytes, You can increase this value upto 32KB as required.
You can also specify the flash region to use from the FLASH_REGION_TO_USE macro.
Hope this helps.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
Yes for PSoC Creator, you can use the PSoC_EmEEPROM_PSoC6 code example as shown:
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is this Auxiliary flash will erase while programming..? if so how to avoid it ..?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
The Em_EEPROM is actually in FLASH and hence when you program a PSoC device you first command it to ERASE ALL FLASH and then program the same.
This will clear any value you may have saved in Em_EEPROM.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is this same applies when i do ota firmware upgrade.?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, in the case of OTA upgrade, the erase operation is performed by the bootloader which can decide the section/area to be erased while in the previous scenario, the programmer is the one that performs the erase operation which always does a complete erase of the flash before programming the device. So in the case of OTA firmware upgrade , the user can decide to erase the emulated EEPROM area or leave a certain section of flash used for non volatile memory from erasure.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how can we decide this while doing ota update please guide me on this.
Please do guide me on having single .hex that includes both app and boot loader.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
Since this is a query related to DFU, please create a new post for the same so that an engineer with more expertise on this can help you better.
Warm Regards
Alen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Amar_Hiremath ,
As this is a new issue, please create a new thread regarding this issue. This will ensure that your new query is tracked and is not missed by other community users too.
Warm Regards
Alen