[AT91Boot_DLL problem] SendFlash to AT91SAM7SE512 fail !!

Microchip in-system programming solution: SAM-BA

Moderators: nferre, fab

gzgetright
Posts: 1
Joined: Wed May 07, 2008 1:12 pm

[AT91Boot_DLL problem] SendFlash to AT91SAM7SE512 fail !!

Wed May 07, 2008 1:28 pm

I have two Board, one board use AT91SAM7SE512, the other board use AT91SAM7S64 chip.
I call AT91Boot_DLL to write flash to AT91SAM7SE512, but it fail & with [no] error message.
I modify the program to write flash to AT91SAM7S64, It works.

The program is modify from AT91-ISP v1.11 OLE_without_MFC.cpp.


SoftwarePack: Install AT91-ISP v1.11.exe (http://www.atmel.com/dyn/resources/prod ... 0v1.11.exe)
OS: Windows XP & Windows 2003 Server
ISP Interface: USB & RS-232
ISP program: Modify from "AT91Boot_DLL without MFC"
Cpu: AT91SAM7SE512




Some source code:
------------------------------------------------------------
...

#define PROG_FMR 0x00480100 // EFC FMR configuration for 48MHz

...

// Assume Target is at 48MHz
pAT91BootDLL->AT91Boot_Write_Int(h_handle, PROG_FMR, 0xFFFFFF60, &error_code);
if (error_code != AT91C_BOOT_DLL_OK)
goto exit;

// Send File into SAM7S256 Flash
pAT91BootDLL->AT91Boot_SAM7S256_Send_Flash(h_handle, 0, buffer, dwSize, &error_code);
if (error_code != AT91C_BOOT_DLL_OK)
goto exit;

...
------------------------------------------------------------

I checked "SAM-PROG v2.4" & USB interface can write AT91SAM7SE512 Internal flash, but Why the program OLE_without_MFC can not work with AT91SAM7SE512?


For Embedded engineers, may be C++ is not good, OLE is not good, and MFC is not good.
Why not provide native DLL API for ISP?


Thanks In Advance!
:shock:
fab
Contact:
Location: ATMEL Rousset France
Posts: 17
Joined: Thu Aug 17, 2006 9:46 am

Thu Aug 07, 2008 8:07 am

Hi gzgetright,

Be careful to configure both EFC0 and EFC1 for SAM7SE512 (you have two flash banks into it) at addresses 0xFFFFFF60 and 0xFFFFFF70.

Make sure to use pAT91BootDLL->AT91Boot_SAM7SE512_Send_Flash (and not SAM7S256 one).

Did you manage to make some read operations on the device (read Chip ID register for example) ?

Best regards,

Fab
zenda
Posts: 4
Joined: Tue Jun 24, 2008 4:35 pm

Re: [AT91Boot_DLL problem] SendFlash to AT91SAM7SE512 fail !!

Wed Nov 26, 2008 8:32 pm

I have a similar problem but with AT91SAM7X256. The modified PC program ran fine without error but the board does not start. I used SAM-BA and it says the flash and the file are perfectly matched. When I use SAM-PROG to sent the file, the board always starts. Is there anything special I have to do with 7X256?

Your help is greatly appreciated.

------------------------------------------------------------------
#define PROG_FMR 0x00480100 // EFC FMR configuration for 48MHz
.
.
AT91BootDLL->AT91Boot_Write_Int(h_handle, PROG_FMR, 0xFFFFFF60, &error_code);
if (error_code != AT91C_BOOT_DLL_OK)
goto exit;

// Send File into SAM7S256 Flash
pAT91BootDLL->raw_AT91Boot_SAM7X256_Send_Flash(h_handle, 0x000000, buffer, dwSize, &error_code);
if (error_code != AT91C_BOOT_DLL_OK)
goto exit;

Return to “SAM-BA”

Who is online

Users browsing this forum: No registered users and 4 guests