SAM3S8/SD8 Software Package: Working with HSMCI

SAM3S8/SD8 Software Package 1.2

# Working with HSMCI
[Working with SAM3S8/SD8 Peripherals]

Collaboration diagram for Working with HSMCI:

The HSMCI driver provides the interface to configure and use the HSMCI peripheral.

The user needs to set the number of wait states depending on the frequency used.
Configure number of cycles for flash read/write operations in the FWS field of HSMCI_FMR.

It offers a function to send flash command to HSMCI and waits for the flash to be ready.

To send flash command, the user could do in either of following way:

- Write a correct key, command and argument in HSMCI_FCR.
- Or, Use IAP (In Application Programming) function which is executed from ROM directly, this allows flash programming to be done by code running in flash.
- Once the command is achieved, it can be detected even by polling EEFC_FSR or interrupt.

The command argument could be a page number,GPNVM number or nothing, it depends on the command itself. Some useful functions in this driver could help user tranlate physical flash address into a page number and vice verse.

For more accurate information, please look at the EEFC section of the Datasheet.

Related files :
hsmci_pdc.c
hsmci.h.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines