Page 1 of 1

Bootloader SAM4E16E

Posted: Fri Feb 12, 2016 8:49 pm
by gabrielcuellar
Hello guys, I`m working in my bootloader for my application, I reading the datasheet about EEFC but I can`t read or write any byte, for example, I want write the position 0x00000000 the new firmware data, the idea is copy my file.hex and load the compiled firmware.

what is your advice for this? Examples please.

Re: Bootloader SAM4E16E

Posted: Fri Feb 12, 2016 10:47 pm
by tsvoipio
The flash starts at 0x00400000, there is nothing to write at address 0x00000000, though you can see an alias of the flash there for start-up.

If you're running bare metal (no Atmel libraries), please note that you have to run the core programming code in RAM (starting at 0x20000000), as the flash is unusable for code during programming.

--

-TV

Re: Bootloader SAM4E16E

Posted: Mon Feb 15, 2016 3:43 pm
by gabrielcuellar
Thank you for replay.
Anyway I can`t write this address 0x00400000 I use a functions for simulate EEPROM but this perform in the IRAM. :roll:

Re: Bootloader SAM4E16E

Posted: Mon Feb 15, 2016 10:33 pm
by tsvoipio
The internal flash cannot be written directly. The write method is specified in the SAM4E datasheet, chapter on flash controller.

There is an Atmel application note on using internal flash as an EEPROM substitute: <http://www.atmel.com/images/atmel-42218 ... p-note.pdf>.