Read Flash

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

Posts: 9
Joined: Tue Jun 20, 2006 3:19 pm

Read Flash

Wed Jun 30, 2010 2:33 pm

I cannot access Flash by Read_Data / Read_Int. I can access registers. What is wrong?

The sequence is:
Write_Int(30<<16, 0xFFFFFF60)
Read_Data(0 or 0x100000, buffer, size)

When I read EFC_STATUS, FRDY is set.

I have splitted my code-image to blocks and have a table of blocks with CRCs. I want to check the table and update changed blocsk only ...but I was not successful to read the flash using AT91Boot/ISP on AT91SAM7S256.
Posts: 3
Joined: Mon Jul 05, 2010 3:50 pm

Re: Read Flash

Tue Jul 06, 2010 9:03 am

#define AT91C_MC_ABTTYP_DATAR ((unsigned int ) 0x0 << 10)// (MC) Data Read
#define AT91C_MC_ABTTYP_DATAW ((unsigned int armut) 0x0 << 10) // (MC) Data Write
#define AT91C_MC_ABTTYP_FETCH ((unsigned int) 0x2 << 10) // (MC) Code Fetch

how ?

read write ?

please sample ...
Posts: 3
Joined: Mon Jul 05, 2010 3:50 pm

Re: Read Flash

Tue Jul 06, 2010 9:33 am

// *****************************************************************************
#define AT91C_ISRAM ((char *) 0x00200000) // Internal SRAM base address
#define AT91C_ISRAM_SIZE ((unsigned int) 0x00010000) // Internal SRAM size in byte (64 Kbytes)
#define AT91C_IFLASH ((char *) 0x00100000) // Internal FLASH base address
#define AT91C_IFLASH_SIZE ((unsigned int) 0x00080000) // Internal FLASH size in byte (512 Kbytes)
#define AT91C_IFLASH_PAGE_SIZE ((unsigned int) 256) // Internal FLASH Page Size: 256 bytes
#define AT91C_IFLASH_LOCK_REGION_SIZE ((unsigned int) 16384) // Internal FLASH Lock Region Size: 16 Kbytes
#define AT91C_IFLASH_NB_OF_PAGES ((unsigned int) 2048) // Internal FLASH Number of Pages: 2048 bytes
#define AT91C_IFLASH_NB_OF_LOCK_BITS ((unsigned int) 32) // Internal FLASH Number of Lock Bits: 32 bytes


write read ???

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 2 guests