| поискавой системы для электроныых деталей |
|
AN2540 датащи(PDF) 18 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2540 датащи(HTML) 18 Page - STMicroelectronics |
|
18 / 25 page ![]() Embedded application aspects AN2540 - Application note 18/25 4 Embedded application aspects This section gives some advice on how to overcome software limitations in embedded applications and to fulfill the needs of different applications. 4.1 Data granularity management The emulated EEPROM can be used in embedded applications where non-volatile storage of data updated with a byte, half-word or word granularity is required. It generally depends on the user requirements and Flash architecture, such as stored data length, write access, etc. The STR91xFxx on-chip Flash memory allows 16-bit, half-word programming. Data can however be programmed by bytes or words by using some software techniques. 4.1.1 Programming on a word-by-word basis To write 32 bits of data "FMI_Data" to the desired Flash memory address "FMI_Address" in Bank1 for example, the process is the following: ■ Write the LSB part of the data (the first two bytes) to the desired Flash memory address. ■ Write the MSB part of the data (the last two bytes) to the Flash memory address incremented twice. 4.1.2 Programming on a byte-by-byte basis Writing by bytes offers the user the possibility to cover the entire memory space and, therefore, to store more data. The performance may however be reduced. A simple example can be useful to understand how to implement such a feature. Let us assume for example that we want to write one byte of data "0xDD" into Bank1 at the FMI_Address. This can be achieved as follows: If FMI_Address is even, then 0xFFDD is written. If FMI_Address is odd, 0xDDFF is written. The generic scheme is shown in Figure 8. u16 LSB=FMI_Data; u16 MSB= FMI_Data >>16; FMI_WriteHalfWord ( FMI_Address, LSB); FMI_WaitForLastOperation(FMI_BANK_1); FMI_WriteHalfWord ( FMI_Address+2, MSB);FMI_WaitForLastOperation(FMI_BANK_1); |
|
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |