{"id":10143,"date":"2013-06-14T10:56:54","date_gmt":"2019-07-04T23:19:43","guid":{"rendered":"http:\/\/engineersgarag-main\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/"},"modified":"2023-05-25T13:23:27","modified_gmt":"2023-05-25T17:23:27","slug":"how-to-use-spm-to-load-application-from-eeprom-part-34-46","status":"publish","type":"post","link":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/","title":{"rendered":"How To Use SPM To load Application from EEPROM &#8211; (Part 34\/46)"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The BLS section is normally used for storing the Boot-loader code for the microcontroller. The Boot-Loader code can be used for initializing the peripherals in the microcontroller, initialize the devices connected to the microcontroller, select the application to load and execute from a storage medium, load the selected application to the application section, jump to the application section and execute the application.\u00a0<\/span><span style=\"line-height: 200%;\">The code running in the BLS section can execute <strong>Self Programing Mode<\/strong> (SPM) instructions which are blocked for the code running in the Application section. Using SPM instructions the code from the BLS can rewrite the code in the application section or the code in the BLS itself.<\/span><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"Configuring SPM To load Application from EEPROM in AVR Prototype\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Configuring-SPM-To-load-Application-from-EEPROM-in-AVR-Prototype.jpg\" alt=\"Configuring SPM To load Application from EEPROM in AVR Prototype\" \/><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 2: Block Diagram of SPM function with BLS in AVR<\/em><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The task of writing the BLS code with SPM has been made simple by the APIs available in the header file &lt;avr\/boot.h&gt;. The following are the important APIs available in the header file which helps in the SPM.<\/span><\/span><\/span><\/p>\n<table class=\"MsoTableGrid\" style=\"width: 6.7in; border-style: none;\" border=\"1\" width=\"643\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"width: 180.9pt; border: 1pt solid windowtext; padding: 0in 5.4pt;\" valign=\"top\" width=\"241\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">FUNCTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<td style=\"width: 184.5pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"246\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">DESCRIPTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<td style=\"width: 117pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"156\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">PARAMETER<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 180.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"241\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">boot_page_erase (address)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 184.5pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"246\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Erase the flash page that is referred by address<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 117pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"156\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">A byte address in flash<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 180.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"241\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">boot_page_fill \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (address, data) \u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 184.5pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"246\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Fill the Boot-Loader temporary page buffer for flash address with data word<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 117pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"156\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The address is a byte address. The data is a word<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 180.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"241\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">boot_page_write (address)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 184.5pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"246\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write the Boot-Loader temporary page buffer to flash page that contains address<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 117pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"156\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Byte address in flash<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 3:<\/em><\/span><\/span><em>\u00a0<span style=\"font-size: 12.8px;\">Important APIs for AVR&#8217;s SPM Function<\/span><\/em><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">\u00a0<\/span><span style=\"line-height: 200%;\">Using the above APIs one can write a code for SPM in an AVR microcontroller provided that the code should follow certain steps in the order. <\/span><\/span><\/span><\/p>\n<p class=\"MsoListParagraphCxSpFirst\" style=\"margin-bottom: 0.0001pt; text-indent: -0.25in; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><!-- [if !supportLists]--><span style=\"line-height: 200%;\">\u00b7<span style=\"line-height: normal;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><!--[endif]--><span style=\"line-height: 200%;\">Step: 1 Erase the flash page which is about to write into<\/span><\/span><\/span><\/p>\n<p class=\"MsoListParagraphCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-indent: -0.25in; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\">{C<span style=\"line-height: 200%;\">\u00b7<span style=\"line-height: normal;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><span style=\"line-height: 200%;\">Step: 2 Store the binaries in a temporary buffer before write into a flash page<\/span><\/span><\/span><\/p>\n<p class=\"MsoListParagraphCxSpLast\" style=\"margin-bottom: 0.0001pt; text-indent: -0.25in; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\">{C}<span style=\"line-height: 200%;\">\u00b7<span style=\"line-height: normal;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><span style=\"line-height: 200%;\">Step: 3 Program the filled temporary buffer into the already erased flash page<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The above three steps are explained with details in a previous <\/span><\/span><\/span><span style=\"font-size: 12.0pt; line-height: 200%; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\">project<\/span><\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">\u00a0on AVR SPM. In this particular project the data that is required to fill the temporary page buffer as discussed in the step: 2 is taken from the built-in EEPROM of the AVR microcontroller where a simple code has already been flashed into. <\/span><span style=\"line-height: 200%;\">The internal EEPROM of the AVR microcontroller has 512 bytes capacity. It can be easily read and write with the help of APIs available in the header file &lt;avr\/eeprom.h&gt;. The following are the important APIs available in the header file which helps in accessing the EEPROM memory.<\/span><\/span><\/span><\/p>\n<table class=\"MsoTableGrid\" style=\"width: 459.9pt; border-style: none;\" border=\"1\" width=\"613\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"width: 297.9pt; border: 1pt solid windowtext; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">FUNCTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: solid solid solid none; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">DESCRIPTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_is_ready (void) <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Returns 1 if EEPROM is ready for a new read\/write operation, 0 if not<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_read_block (void *dst, const void *src, size_t\u00a0 n ) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Returns a block of n bytes from EEPROM address src to SRAM dst<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">uint8_t eeprom_read_byte (const uint8_t *p)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Returns one byte from EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">uint32_t eeprom_read_dword (const uint32_t *p)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Read one 32-bit double from EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">float eeprom_read_float (const float *p)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Returns one float value from EEPROM referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">uint16_t eeprom_read_word (const uint16_t *p)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Read one 16-bit word from EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr style=\"mso-yfti-irow: 7; height: 36.85pt;\">\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt; height: 36.85pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_update_block (const void *src, void *dst, size_t\u00a0 n) <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt; height: 36.85pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Update a block of n bytes to EEPROM address dst from src<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_update_byte (uint8_t *p, uint8_t\u00a0 value) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Update a byte value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_update_dword (uint32_t *p,uint32_t\u00a0 value) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Update a 32-bit double word value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_update_float (float *p, float value)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Update a float value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_update_word (uint16_t *p, uint16_t\u00a0 value) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Update a word value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_write_block (const void *src, void *dst, size_t\u00a0 n) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write a block of n bytes to EEPROM address dst from src.<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_write_byte (uint8_t *p, uint8_t value) <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write a byte value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_write_dword (uint32_t *p, uint32_t\u00a0 value) \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write a 32-bit double word value to EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_write_float (float *p, float value)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write a float value to EEPROM referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 297.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"397\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">void eeprom_write_word (uint16_t *p, uint16_t value)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 2.25in; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"216\">\n<p class=\"MsoNormal\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">Write a word value to EEPROM referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 4: APIs to access EEPROM memory<span style=\"line-height: 200%;\">\u00a0<\/span><\/em><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The data for filling the temporary buffer as discussed in the step: 2 is read from the built-in EEPROM memory of the AVR microcontroller using the library function;<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><i><span style=\"line-height: 200%;\">uint8_t eeprom_read_byte (const uint8_t *p)<\/span><\/i><\/b><\/span><\/span><b><i><\/i><\/b><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The above function can return the data byte which is stored in the EEPROM address referred by the pointer argument. The code is written in such a way that the pointer first points to the 0<sup>th<\/sup> location of the EEPROM and then increases the address as it reads each byte for storing in the temporary buffer.\u00a0<\/span><span style=\"line-height: 200%;\">Thus the steps with which binary of a code are read from the EEPROM memory and flashing the same into the flash memory is represented pictorially in the following;<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><u><span style=\"line-height: 200%;\">Step: 1 Erase the flash page which is about to write into<\/span><\/u><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The first step is to erase the flash page which is about to be written with the new values. The API which helps in executing this step is;<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><i><span style=\"line-height: 200%;\">Boot_page_erase (address)<\/span><\/i><\/b><\/span><\/span><b><i><\/i><\/b><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">This API can erase an entire page in the flash which the parameter addresses. In the code the address of the page erased is 256. The following image shows the status of the temporary page buffer and the flash memory at the step 1. The temporary page buffer is a buffer in which an entire page can be stored before it is flashed into a page in the flash memory.<\/span><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"Block Diagram of PageErase in SPM Function\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Block-Diagram-of-PageErase-in-SPM-Function.jpg\" alt=\"Block Diagram of PageErase in SPM Function\" \/><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 5: Block Diagram of PageErase in SPM Function<\/em><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><u><span style=\"line-height: 200%;\">Step: 2 Store the values in a temporary buffer before write into a flash page<\/span><\/u><\/span><\/span><u><\/u><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">This is the second step in which one should store the required binary in a temporary buffer, before writing to any of the flash memory page. The API that can be used for this purpose is;<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><i><span style=\"line-height: 200%;\">boot_page_fill \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (address, data)<\/span><\/i><\/b><\/span><\/span><b><i><\/i><\/b><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">This API f<\/span><span style=\"line-height: 200%;\">ills the Boot-Loader temporary page buffer byte by byte before flashing the data in the temporary page buffer into a page as such. The parameter data represents each byte in the buffer and the parameter address represents the page address + offset of the buffer location where the data byte need to be stored.<\/span><span style=\"line-height: 200%;\">The parameter data in the API boot_page_fill (address, data) is actually read from the first location of EEPROM memory with the help of an API which is available in the header file &lt;avr\/eeprom.h&gt;.<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><i><span style=\"line-height: 200%;\">uint8_t eeprom_read_byte (const uint8_t *p)<\/span><\/i><\/b><\/span><\/span><b><i><\/i><\/b><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">\u00a0<\/span><\/span><\/span><\/p>\n<table class=\"MsoTableGrid\" style=\"border-style: none;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"width: 126.9pt; border: 1pt solid windowtext; padding: 0in 5.4pt;\" valign=\"top\" width=\"169\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">FUNCTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<td style=\"width: 192.3pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"256\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">DESCRIPTION<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<td style=\"width: 159.6pt; border-style: solid solid solid none; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"213\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><span style=\"line-height: 200%;\">PARAMETER<\/span><\/b><\/span><\/span><b><\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 126.9pt; border-style: none solid solid; border-right-color: windowtext; border-bottom-color: windowtext; border-left-color: windowtext; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"169\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">uint8_t eeprom_read_byte (const uint8_t *p)<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 192.3pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"256\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The function returns one data byte which is stored in the EEPROM address referred by the pointer p<\/span><\/span><\/span><\/p>\n<\/td>\n<td style=\"width: 159.6pt; border-style: none solid solid none; border-bottom-color: windowtext; border-bottom-width: 1pt; border-right-color: windowtext; border-right-width: 1pt; padding: 0in 5.4pt;\" valign=\"top\" width=\"213\">\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The pointer refers to the EEPROM address from which the data byte need to be read<\/span><\/span><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\">\u00a0<\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"Block Diagram Loading Temporary Buffer for AVR's SPM\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Block-Diagram-Loading-Temporary-Buffer-for-AVRs-SPM.jpg\" alt=\"Block Diagram Loading Temporary Buffer for AVR's SPM\" \/><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 6: Block Diagram Loading Temporary Buffer for AVR&#8217;s SPM<\/em><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><u><span style=\"line-height: 200%;\">Step: 3 Program the filled temporary buffer into the already erased flash page<\/span><\/u><\/span><\/span><u><\/u><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">This is the final step in which the filled temporary buffer is flashed using an API into already erased page of the flash memory. The API which helps in this step is;<\/span><\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">\u00a0<\/span><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><b><i><span style=\"line-height: 200%;\">boot_page_write (address)<\/span><\/i><\/b><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"Block Diagram of Page Write in flash Memory\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Block-Diagram-of-Page-Write-in-flash-Memory.jpg\" alt=\"Block Diagram of Page Write in flash Memory\" \/><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: center; line-height: 200%;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 7: Block Diagram of Page Write in flash Memory<\/em><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; text-align: justify; line-height: 200%;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">The code in this project which is written for the BLS can copy 300bytes from the EEPROM memory into the temporary buffer starting from the address 0x00. These bytes are then flashed into the flash memory page starting from the address 0x0000. After doing this the code from the BLS will make a jump to the address 0x0000 so that the re-written binary can be executed next.\u00a0<\/span><\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">With this boot loader code, whatever program flashed into the EEPROM will get rewritten at the Application flash section of the AVR and get executed. A simple LED blinking test application can be written into the EEPROM memory starting to test the working.b<\/span><span style=\"line-height: 200%;\">Flash the code for the BLS first and then the LED application code to the EEPROM memory using the steps explained in the previous project on <\/span><\/span><\/span><span style=\"font-size: 12.0pt; line-height: 200%; font-family: 'Times New Roman','serif'; mso-fareast-font-family: 'Times New Roman';\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\">LED blinking from BLS of AVR<\/span><\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">. <\/span><\/span><\/span><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><span style=\"line-height: 200%;\">When the led blinks, it means that the code has been loaded from one section of the EEPROM memory to the flash memory and is executing. With that the code in the BLS can load any application which is programmed into the EEPROM on reset and hence it acts like a Boot-Load\u00a0<\/span><\/span><\/span><span style=\"font-size: 13.333333969116211px; font-family: Arial; line-height: 200%;\">\u00a0<\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: justify;\"><span style=\"font-size: small;\"><span style=\"font-family: Arial;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" title=\"LED Blinking using SPM Function of AVR Circuit on breadboard\" src=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/LED-Blinking-using-SPM-Function-of-AVR-Circuit-on-breadboard.png\" alt=\"LED Blinking using SPM Function of AVR Circuit on breadboard\" \/><\/span><\/span><\/p>\n<p class=\"MsoNormalCxSpMiddle\" style=\"margin-bottom: 0.0001pt; line-height: 200%; text-align: center;\"><span style=\"font-size: 12px;\"><span style=\"font-family: verdana,geneva,sans-serif;\"><em>Fig. 8: LED Blinking using SPM Function of AVR Circuit on breadboard<\/em><\/span><\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In any microcontroller the Boot-Loader is the first code which executes before the application code does. The major function of the Boot-Loader is to load the application code into the flash memory of the microcontroller and execute it. In AVR microcontroller the Self Programming Mode (SPM) helps the Boot-Loader to load a particular application from where the application binary is stored.The Boot-Loader may receive the code binary from other memory chips, SD-cards or through the serial port of the microcontroller in case of serial programming.&nbsp;It is then with the help of the SPM that the microcontroller write the binary code into the application flash section.&nbsp;In this particular project the operation of a Boot-Loader code using the SPM is demonstrated by re-writing flash memory with the code binary which has already been flashed into the built-in EEPROM of the ATMEGA16. The hardware used in this project includes ATMEGA16 as microcontroller, USBASP as the programmer and the software used are AVR STUDIO4 as IDE and AVR-BURNO-MAT as the burner software.&nbsp;<\/p>\n","protected":false},"author":3,"featured_media":15857,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[4043,13],"tags":[744,429,177,432,1185],"class_list":{"2":"type-post","14":"entry","15":"has-post-thumbnail"},"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.2 (Yoast SEO v25.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Use SPM To load Application from EEPROM - (Part 34\/46)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Use SPM To load Application from EEPROM - (Part 34\/46)\" \/>\n<meta property=\"og:description\" content=\"In any microcontroller the Boot-Loader is the first code which executes before the application code does. The major function of the Boot-Loader is to load the application code into the flash memory of the microcontroller and execute it. In AVR microcontroller the Self Programming Mode (SPM) helps the Boot-Loader to load a particular application from where the application binary is stored.The Boot-Loader may receive the code binary from other memory chips, SD-cards or through the serial port of the microcontroller in case of serial programming.&nbsp;It is then with the help of the SPM that the microcontroller write the binary code into the application flash section.&nbsp;In this particular project the operation of a Boot-Loader code using the SPM is demonstrated by re-writing flash memory with the code binary which has already been flashed into the built-in EEPROM of the ATMEGA16. The hardware used in this project includes ATMEGA16 as microcontroller, USBASP as the programmer and the software used are AVR STUDIO4 as IDE and AVR-BURNO-MAT as the burner software.&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\" \/>\n<meta property=\"og:site_name\" content=\"Engineers Garage\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/engineersgarage\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ashutosh Bhatt\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:site\" content=\"@EngineersGarage\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashutosh Bhatt\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\"},\"author\":{\"name\":\"Ashutosh Bhatt\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/4e6dc417fdf33f6ce27c9ce2f9fd08d3\"},\"headline\":\"How To Use SPM To load Application from EEPROM &#8211; (Part 34\/46)\",\"datePublished\":\"2019-07-04T23:19:43+00:00\",\"dateModified\":\"2023-05-25T17:23:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\"},\"wordCount\":1502,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg\",\"keywords\":[\"avr microcontroller\",\"circuit\",\"eeprom\",\"project\",\"SPM\"],\"articleSection\":[\"AVR\",\"Electronic Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\",\"url\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\",\"name\":\"How To Use SPM To load Application from EEPROM - (Part 34\/46)\",\"isPartOf\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg\",\"datePublished\":\"2019-07-04T23:19:43+00:00\",\"dateModified\":\"2023-05-25T17:23:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg\",\"width\":640,\"height\":480,\"caption\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.engineersgarage.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Use SPM To load Application from EEPROM &#8211; (Part 34\/46)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.engineersgarage.com\/#website\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"name\":\"Engineers Garage\",\"description\":\"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News\",\"publisher\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.engineersgarage.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.engineersgarage.com\/#organization\",\"name\":\"Engineer's Garage - WTWH Media\",\"url\":\"https:\/\/www.engineersgarage.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"contentUrl\":\"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png\",\"width\":372,\"height\":52,\"caption\":\"Engineer's Garage - WTWH Media\"},\"image\":{\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/engineersgarage\",\"https:\/\/x.com\/EngineersGarage\",\"https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/4e6dc417fdf33f6ce27c9ce2f9fd08d3\",\"name\":\"Ashutosh Bhatt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/97ae33d7fb6f22daeba201f00355919e158689239cd6f0b5f1d55f00e0851241?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/97ae33d7fb6f22daeba201f00355919e158689239cd6f0b5f1d55f00e0851241?s=96&r=g\",\"caption\":\"Ashutosh Bhatt\"},\"url\":\"https:\/\/www.engineersgarage.com\/author\/dmiyares\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How To Use SPM To load Application from EEPROM - (Part 34\/46)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/","og_locale":"en_US","og_type":"article","og_title":"How To Use SPM To load Application from EEPROM - (Part 34\/46)","og_description":"In any microcontroller the Boot-Loader is the first code which executes before the application code does. The major function of the Boot-Loader is to load the application code into the flash memory of the microcontroller and execute it. In AVR microcontroller the Self Programming Mode (SPM) helps the Boot-Loader to load a particular application from where the application binary is stored.The Boot-Loader may receive the code binary from other memory chips, SD-cards or through the serial port of the microcontroller in case of serial programming.&nbsp;It is then with the help of the SPM that the microcontroller write the binary code into the application flash section.&nbsp;In this particular project the operation of a Boot-Loader code using the SPM is demonstrated by re-writing flash memory with the code binary which has already been flashed into the built-in EEPROM of the ATMEGA16. The hardware used in this project includes ATMEGA16 as microcontroller, USBASP as the programmer and the software used are AVR STUDIO4 as IDE and AVR-BURNO-MAT as the burner software.&nbsp;","og_url":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/","og_site_name":"Engineers Garage","article_publisher":"https:\/\/www.facebook.com\/engineersgarage","og_image":[{"width":640,"height":480,"url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","type":"image\/jpeg"}],"author":"Ashutosh Bhatt","twitter_card":"summary_large_image","twitter_creator":"@EngineersGarage","twitter_site":"@EngineersGarage","twitter_misc":{"Written by":"Ashutosh Bhatt","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#article","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/"},"author":{"name":"Ashutosh Bhatt","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/4e6dc417fdf33f6ce27c9ce2f9fd08d3"},"headline":"How To Use SPM To load Application from EEPROM &#8211; (Part 34\/46)","datePublished":"2019-07-04T23:19:43+00:00","dateModified":"2023-05-25T17:23:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/"},"wordCount":1502,"commentCount":0,"publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"image":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","keywords":["avr microcontroller","circuit","eeprom","project","SPM"],"articleSection":["AVR","Electronic Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/","url":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/","name":"How To Use SPM To load Application from EEPROM - (Part 34\/46)","isPartOf":{"@id":"https:\/\/www.engineersgarage.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage"},"image":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage"},"thumbnailUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","datePublished":"2019-07-04T23:19:43+00:00","dateModified":"2023-05-25T17:23:27+00:00","breadcrumb":{"@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#primaryimage","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","width":640,"height":480,"caption":""},{"@type":"BreadcrumbList","@id":"https:\/\/www.engineersgarage.com\/how-to-use-spm-to-load-application-from-eeprom-part-34-46\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.engineersgarage.com\/"},{"@type":"ListItem","position":2,"name":"How To Use SPM To load Application from EEPROM &#8211; (Part 34\/46)"}]},{"@type":"WebSite","@id":"https:\/\/www.engineersgarage.com\/#website","url":"https:\/\/www.engineersgarage.com\/","name":"Engineers Garage","description":"Electronic Projects, Electrical Engineering Resources, Makers Articles and Product News","publisher":{"@id":"https:\/\/www.engineersgarage.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.engineersgarage.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.engineersgarage.com\/#organization","name":"Engineer's Garage - WTWH Media","url":"https:\/\/www.engineersgarage.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","contentUrl":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/08\/EGlogo.png","width":372,"height":52,"caption":"Engineer's Garage - WTWH Media"},"image":{"@id":"https:\/\/www.engineersgarage.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/engineersgarage","https:\/\/x.com\/EngineersGarage","https:\/\/www.youtube.com\/channel\/UC0VITh11JSYk-UW7toLebUw"]},{"@type":"Person","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/4e6dc417fdf33f6ce27c9ce2f9fd08d3","name":"Ashutosh Bhatt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.engineersgarage.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/97ae33d7fb6f22daeba201f00355919e158689239cd6f0b5f1d55f00e0851241?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/97ae33d7fb6f22daeba201f00355919e158689239cd6f0b5f1d55f00e0851241?s=96&r=g","caption":"Ashutosh Bhatt"},"url":"https:\/\/www.engineersgarage.com\/author\/dmiyares\/"}]}},"featured_image_src":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","featured_image_src_square":"https:\/\/www.engineersgarage.com\/wp-content\/uploads\/2019\/07\/Summary1_0.jpg","author_info":{"display_name":"Ashutosh Bhatt","author_link":"https:\/\/www.engineersgarage.com\/author\/dmiyares\/"},"_links":{"self":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/10143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/comments?post=10143"}],"version-history":[{"count":0,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/posts\/10143\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media\/15857"}],"wp:attachment":[{"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/media?parent=10143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/categories?post=10143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.engineersgarage.com\/wp-json\/wp\/v2\/tags?post=10143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}