1
1
/***************************************************************************/ /**
2
2
* \file cy_flash.h
3
- * \version 3.20
3
+ * \version 3.30
4
4
*
5
5
* Provides the API declarations of the Flash driver.
6
6
*
104
104
* Crypto).
105
105
* -# If you do not use the default startup, perform the following steps
106
106
* before any flash write/erase operations:
107
- * \snippet flash\3.20\ snippet\ main.c Flash Initialization
107
+ * \snippet flash/ snippet/ main.c Flash Initialization
108
108
*
109
109
* \subsection group_flash_config_rww Partially Blocking:
110
110
* This method has a much shorter time window during which Flash accesses are not
111
111
* allowed. Application code execution from Flash is blocked for only a part of
112
112
* Flash Write duration, for both cores. Blocking duration depends upon the API
113
113
* sequence used.
114
114
*
115
- * For API sequence Cy_Flash_StartErase () + Cy_Flash_StartProgram() there are
115
+ * For API sequence Cy_Flash_StartEraseRow () + Cy_Flash_StartProgram() there are
116
116
* four block-out regions during which the read is blocked using the software
117
117
* driver (PDL). See <b>Figure 1</b>.
118
118
*
216
216
* (DMA and Crypto).
217
217
* -# If you do not use the default startup, perform the following steps
218
218
* before any flash write/erase operations:
219
- * \snippet flash\3.20\ snippet\ main.c Flash Initialization
219
+ * \snippet flash/ snippet/ main.c Flash Initialization
220
220
*
221
221
* \subsection group_flash_config_emeeprom EEPROM section use:
222
222
* If you plan to use "cy_em_eeprom" section for different purposes for both of
255
255
* <table class="doxtable">
256
256
* <tr><th>Version</th><th style="width: 52%;">Changes</th><th>Reason for Change</th></tr>
257
257
* <tr>
258
+ * <td rowspan="3">3.30</td>
259
+ * <td>Moved ipcWaitMessageStc structure to the RAM section called ".cy_sharedmem".</td>
260
+ * <td>Support Secure Boot devices.</td>
261
+ * </tr>
262
+ * <tr>
263
+ * <td>Renamed Function Cy_Flash_StartErase() to Cy_Flash_StartEraseRow().</td>
264
+ * <td>The driver improvements based on the usability feedback.</td>
265
+ * </tr>
266
+ * <tr>
267
+ * <td>Added new API functions \ref Cy_Flash_EraseSector,
268
+ * \ref Cy_Flash_StartEraseSector, \ref Cy_Flash_EraseSubsector,
269
+ * \ref Cy_Flash_StartEraseSubsector </td>
270
+ * <td>The driver improvements based on the usability feedback.</td>
271
+ * </tr>
272
+ * <tr>
258
273
* <td rowspan="3">3.20</td>
259
274
* <td>Flattened the organization of the driver source code into the single source directory and the single include directory.</td>
260
275
* <td>Driver library directory-structure simplification.</td>
@@ -359,7 +374,7 @@ extern "C" {
359
374
#define CY_FLASH_DRV_VERSION_MAJOR 3
360
375
361
376
/** Driver minor version */
362
- #define CY_FLASH_DRV_VERSION_MINOR 20
377
+ #define CY_FLASH_DRV_VERSION_MINOR 30
363
378
364
379
#define CY_FLASH_ID (CY_PDL_DRV_ID(0x14UL)) /**< FLASH PDL ID */
365
380
@@ -377,8 +392,6 @@ extern "C" {
377
392
378
393
/** Flash row size */
379
394
#define CY_FLASH_SIZEOF_ROW (CPUSS_FLASHC_PA_SIZE * 4u)
380
- /** Flash effective page size */
381
- #define CY_FLASH_EFFECTIVE_PAGE_SIZE 32
382
395
/** Long words flash row size */
383
396
#define CY_FLASH_SIZEOF_ROW_LONG_UNITS (CY_FLASH_SIZEOF_ROW / sizeof(uint32_t))
384
397
@@ -430,11 +443,15 @@ typedef enum cy_en_flashdrv_status
430
443
*/
431
444
void Cy_Flash_Init (void );
432
445
cy_en_flashdrv_status_t Cy_Flash_EraseRow (uint32_t rowAddr );
446
+ cy_en_flashdrv_status_t Cy_Flash_StartEraseRow (uint32_t rowAddr );
447
+ cy_en_flashdrv_status_t Cy_Flash_EraseSector (uint32_t sectorAddr );
448
+ cy_en_flashdrv_status_t Cy_Flash_StartEraseSector (uint32_t sectorAddr );
449
+ cy_en_flashdrv_status_t Cy_Flash_EraseSubsector (uint32_t subSectorAddr );
450
+ cy_en_flashdrv_status_t Cy_Flash_StartEraseSubsector (uint32_t subSectorAddr );
433
451
cy_en_flashdrv_status_t Cy_Flash_ProgramRow (uint32_t rowAddr , const uint32_t * data );
434
452
cy_en_flashdrv_status_t Cy_Flash_WriteRow (uint32_t rowAddr , const uint32_t * data );
435
453
cy_en_flashdrv_status_t Cy_Flash_StartWrite (uint32_t rowAddr , const uint32_t * data );
436
454
cy_en_flashdrv_status_t Cy_Flash_StartProgram (uint32_t rowAddr , const uint32_t * data );
437
- cy_en_flashdrv_status_t Cy_Flash_StartErase (uint32_t rowAddr );
438
455
cy_en_flashdrv_status_t Cy_Flash_IsOperationComplete (void );
439
456
cy_en_flashdrv_status_t Cy_Flash_RowChecksum (uint32_t rowAddr , uint32_t * checksumPtr );
440
457
cy_en_flashdrv_status_t Cy_Flash_CalculateHash (const uint32_t * data , uint32_t numberOfBytes , uint32_t * hashPtr );
@@ -451,11 +468,15 @@ uint32_t Cy_Flash_GetExternalStatus(void);
451
468
void Cy_Flash_ResumeIrqHandler (void );
452
469
#endif
453
470
454
- /* Macros to backward compatibility */
471
+ /*******************************************************************************
472
+ Backward compatibility macro. The following code is DEPRECATED and must
473
+ not be used in new projects
474
+ *******************************************************************************/
455
475
#define Cy_Flash_IsWriteComplete (...) Cy_Flash_IsOperationComplete()
456
476
#define Cy_Flash_IsProgramComplete (...) Cy_Flash_IsOperationComplete()
457
477
#define Cy_Flash_IsEraseComplete (...) Cy_Flash_IsOperationComplete()
458
- #define CY_FLASH_NUMBER_ROWS (CY_FLASH_SIZE / CY_FLASH_SIZEOF_ROW)
478
+ #define CY_FLASH_NUMBER_ROWS (CY_FLASH_SIZE / CY_FLASH_SIZEOF_ROW)
479
+ #define Cy_Flash_StartErase Cy_Flash_StartEraseRow
459
480
460
481
/** \endcond */
461
482
0 commit comments