at91rm3400 ATMEL Corporation, at91rm3400 Datasheet - Page 73

no-image

at91rm3400

Manufacturer Part Number
at91rm3400
Description
Atmel Advanced At91 Arm Microcontroller
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
at91rm3400-AU-002
Manufacturer:
Atmel
Quantity:
10 000
Using the Service
1790A–ATARM–11/03
The first step is to find the address of the open service method
the ROM Entry Service.
1. Allocate one instance of
2. Initialize the
3. Configure the DataFlash structure with its correct features and link it to the device
4. Now the different methods can be used. Following is an example of a Page Read of
memory space:
// Allocate the service and a device structure.
AT91S_SvcDataFlash svcDataFlash;
AT91S_Dataflash Device; // member of AT91S_SvcDataFlash service
Then initialize the
function:
// Initialize service
pAT91->OpenSvcDataFlash (AT91C_BASE_PMC, &svcDataFlash);
// Initialize the SPI Interrupt
at91_irq_open ( AT91C_BASE_AIC,AT91C_ID_SPI,3,
structure in the
// Example with an ATMEL AT45DB321B DataFlash
Device.pages_number = 8192;
Device.pages_size = 528;
Device.page_offset = 10;
Device.byte_mask = 0x300;
// Link to the service structure
svcDataFlash.pDevice = &Device;
528 bytes on page 50:
// Result of the read operation in RxBufferDataFlash
unsigned char RxBufferDataFlash[528];
svcDataFlash.PageRead(&svcDataFlash,
(50*528),RxBufferDataFlash,528);
SPI Interrupt
AT91S_SvcDataFlash
AT91S_SvcDataFlash
AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE ,AT91F_spi_asm_handler);
AT91S_SvcDataFlash
:
service structure:
instance by calling the
and
AT91S_Dataflash
AT91F_OpenSvcDataFlash
AT91RM3400
AT91F_OpenSvcDataFlash
in the application
using
73

Related parts for at91rm3400