Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
cascoda_dataflash_nano120.c File Reference
#include <stdio.h>
#include <string.h>
#include "Nano100Series.h"
#include "fmc.h"
#include "sys.h"
#include "cascoda-bm/cascoda_types.h"
#include "cascoda_chili.h"
Include dependency graph for cascoda_dataflash_nano120.c:

Macros

#define DATA_FLASH_CONFIG0   0xFFFFFFFE /* mask for CONFIG0 register dataflash enable */
 
#define CASCODA_CHILI_FLASH_PAGES   2 /* Dataflash: Number of pages configured */
 
#define DATA_FLASH_BASE   (FMC_APROM_END - (CASCODA_CHILI_FLASH_PAGES * FMC_FLASH_PAGE_SIZE) - FMC_FLASH_PAGE_SIZE)
 
#define MANUFACTURER_DATA_FLASH_BASE   (FMC_APROM_END - FMC_FLASH_PAGE_SIZE)
 

Functions

void BSP_GetFlashInfo (struct ca_flash_info *aFlashInfoOut)
 Get the flashinfo struct for the current platform. More...
 
void CHILI_FlashInit ()
 
ca_error BSP_FlashWriteInitial (u32_t startaddr, void *data, u32_t datasize)
 Writes Dataflash Memory, relies on Memory erased. More...
 
ca_error BSP_FlashErase (u32_t startaddr)
 Erases a Dataflash Memory page (All words in page set to 0xFFFFFFFF) More...
 
ca_error BSP_FlashRead (u32_t startaddr, u32_t *data, u32_t datasize)
 Reads Dataflash Memory. More...
 
ca_error BSP_FlashCheck (u32_t startaddr, u32_t checklen, u32_t crc32)
 Check that a given range of flash matches the provided CRC32 checksum. More...
 

Variables

const struct ca_flash_info BSP_FlashInfo
 

Macro Definition Documentation

◆ CASCODA_CHILI_FLASH_PAGES

#define CASCODA_CHILI_FLASH_PAGES   2 /* Dataflash: Number of pages configured */

◆ DATA_FLASH_BASE

#define DATA_FLASH_BASE   (FMC_APROM_END - (CASCODA_CHILI_FLASH_PAGES * FMC_FLASH_PAGE_SIZE) - FMC_FLASH_PAGE_SIZE)

◆ DATA_FLASH_CONFIG0

#define DATA_FLASH_CONFIG0   0xFFFFFFFE /* mask for CONFIG0 register dataflash enable */

◆ MANUFACTURER_DATA_FLASH_BASE

#define MANUFACTURER_DATA_FLASH_BASE   (FMC_APROM_END - FMC_FLASH_PAGE_SIZE)

Function Documentation

◆ CHILI_FlashInit()

void CHILI_FlashInit ( void  )

Variable Documentation

◆ BSP_FlashInfo

const struct ca_flash_info BSP_FlashInfo
Initial value:
= {FMC_APROM_BASE,
FMC_FLASH_PAGE_SIZE,
#define CASCODA_CHILI_FLASH_PAGES
Definition: cascoda_dataflash_nano120.c:50
#define MANUFACTURER_DATA_FLASH_BASE
Definition: cascoda_dataflash_nano120.c:55
#define DATA_FLASH_BASE
Definition: cascoda_dataflash_nano120.c:54