Products > Embedded Computing

[ATSAM] Interupt handling from scratch

<< < (8/8)

westfw:

--- Quote --- I don't know why Forth needs to write things into Flash, but hopefully it does not do that after application development is done.
--- End quote ---
Remember that Forth is an interpreter.  You can define new words and things after the main part of your application development is done, and they'll be written to flash to save them.

--- Quote ---
--- Quote ---for ATSAM [] the flash controller only supports 256-bytes-at-once writes.
--- End quote ---
This is not true. It has to erase 256-byte row at once, but it can program any number of bytes.
--- End quote ---
Are you sure?  I looked at the SAMC datasheet, and it's certainly possible to read it such that the 256byte-row-at-a-time, or at best 64byte-page-at-a-time writes are necessary.  It's not clear whether leaving bytes set to 0xFF when you write a page will permit those bytes to be written with non-FF values later (or exactly how you'd do that WRT "write page" command.)

ataradov:
Yes, I'm 100% sure. You can write individual bytes or bits. Just write 0xff where you don't want things to be changed.

Otherwise the note about 8 writes into a row would not make any sense.

techman-001:

--- Quote from: ataradov on August 29, 2019, 07:21:40 am ---Yes, I'm 100% sure. You can write individual bytes or bits. Just write 0xff where you don't want things to be changed.

Otherwise the note about 8 writes into a row would not make any sense.

--- End quote ---

I passed your feedback to the Mecrisp-Stellaris designer and he replied with the following questions:

Must the Flash always  be written in  ascending or descending order ?

Can it not be mixed by writing to random locations in Atmel SAME70 ?

I would be glad to know which Atmel SAM... chips may suffer from this limitations and which do not.

ataradov:
You need to write 64 bytes for a write page command, but if you set bytes that you want to keep to 0xff, it will work.

SAM E70 is a bit different. It has ECC, so you must write in 64-bit chunks and with 64-bit alignment. But you can still do partial writes keeping in mind this limitation. This is explicitly described in the datasheet in the section about partial writes.

techman-001:

--- Quote from: ataradov on August 29, 2019, 10:05:52 am ---You need to write 64 bytes for a write page command, but if you set bytes that you want to keep to 0xff, it will work.

SAM E70 is a bit different. It has ECC, so you must write in 64-bit chunks and with 64-bit alignment. But you can still do partial writes keeping in mind this limitation. This is explicitly described in the datasheet in the section about partial writes.

--- End quote ---

Thanks again, turns out that the SAM he was using to port his Forth to was a E70!

 He tells me that he may dig out some alternative SAMS and have another go, so there may yet be a Mecrisp-Stellaris Forth for SAM, just not the E70 :-+

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod