New Connect ME 9210 -C DC-ME-Y402-C PN:(1P)50001529-36 modules won’t run our NET+OS image.bin application or rom.bin boot loader

Some customers with existing NET+OS firmware are having issues (not booting) when running their firmware (image.bin or rom.bin or both) on new modules delivered after May 2022.  Specifically NOK with PN:(1P)50001528-36, where old working SKU hat PN:(1P)50001528-06 was OK (both Digi Connect ME 9210 -C for NET+OS 4MB flash 8MB RAM).

Root cause in most of this cases is that customer did not (correctly) apply the flash patch for Macronix MX29LV32E which was announced back in PCN#180601 June 1st year 2018. Or their firmware build is still based on older sources, even if they patched the NET+OS ESP but not their project.

While the PCN announced new flash chip back in 2018, Digi did not deliver any modules with the new flash chip since that time, because we still had stock of the old flash chips. This means no customer ever had verified with hardware having the new flash chip, that they correctly applied the patch and they evaluate now in 2022/2023 when Digi is finally delivering some modules with this flash part.

Symptom might be that after programming old custom firmware, the firmware does not boot anymore or is throwing an Exception similar to (see serial output after firmware update):


NET+OS Version 7.5.2.2
..
Download complete, writing to flash...
Firmware updated, quit the session to restart.
Resetting the system in 2 seconds...

Prefetch Exception
 CONTEXT: INTERRUPT

Program Counter :00B9FF44
Stack Pointer :001267A8
Current program status Register :200000D7
R00:FFFFFFFF    R01:000E6300

Customers need to check in their NET+OS source code to have:


--- a/netos/netos/src/bsp/platforms/connectme9210/flashparts.h
+++ b/netos/netos/src/bsp/platforms/connectme9210/flashparts.h
@@ -629,3 +629,20 @@
  * @since 7.0
 *ad*/
 #define NAFLASH_WANT_TO_SUPPORT_SST38VF6402B TRUE
+
+
+/*ad*
+ * Set this constant to TRUE to compile in support for the
+ * MACROMIX MX29LV320EB
+ * flash part.  Set this constant to FALSE to reduce the memory
+ * requirements of the flash driver if you do not need to 
+ * support this flash part.
+ *
+ * You set this constant by editing the file flashparts.h in 
+ * the platform directory.
+ *
+ * @external
+ * @category BSP:Device_Drivers:Flash_Memory
+ * @since 7.5
+*ad*/
+#define NAFLASH_WANT_TO_SUPPORT_MX29LV320EB TRUE


--- a/netos/netos/src/bsp/common/flashparts.c +++ b/netos/netos/src/bsp/common/flashparts.c @@ -306,7 +306,7 @@ static const flash_cmd_t SHARP_flash_write_cmd[] = { #endif -#define NEED_AMD_BOTTOM (NAFLASH_WANT_TO_SUPPORT_AM29F800BB || NAFLASH_WANT_TO_SUPPORT_AM29LV800BB || NAFLASH_WANT_TO_SUPPORT_MBM29LV800BE || NAFLASH_WANT_TO_SUPPORT_S29PL032J || NAFLASH_WANT_TO_SUPPORT_MX29LV640EB || NAFLASH_WANT_TO_SUPPORT_SST38VF6402B) +#define NEED_AMD_BOTTOM (NAFLASH_WANT_TO_SUPPORT_AM29F800BB || NAFLASH_WANT_TO_SUPPORT_AM29LV800BB || NAFLASH_WANT_TO_SUPPORT_MBM29LV800BE || NAFLASH_WANT_TO_SUPPORT_S29PL032J || NAFLASH_WANT_TO_SUPPORT_MX29LV320EB || NAFLASH_WANT_TO_SUPPORT_MX29LV640EB || NAFLASH_WANT_TO_SUPPORT_SST38VF6402B) #define NEED_AMD_TOP (NAFLASH_WANT_TO_SUPPORT_AM29F800BT || NAFLASH_WANT_TO_SUPPORT_AM29LV800BT || NAFLASH_WANT_TO_SUPPORT_AM29LV641 || NAFLASH_WANT_TO_SUPPORT_AM29LV160T) #if (NEED_AMD_TOP || NEED_AMD_BOTTOM) @@ -2952,6 +2952,99 @@ static const flash_cmd_t MICROCHIP_SST38VF6402B_flash_block_erase_cmd[] = { }; #endif +#if NAFLASH_WANT_TO_SUPPORT_MX29LV320EB +/* + * Array of commands user to erase sectors, starting with the first. + */ +static const flash_cmd_t MACROMIX_MX29LV320EB_flash_block_erase_cmd[] = { + {0x30, 0x00000}, /* Command to erase the first sector */ + {0x30, 0x01000}, + {0x30, 0x02000}, + {0x30, 0x03000}, + {0x30, 0x04000}, + {0x30, 0x05000}, + {0x30, 0x06000}, + {0x30, 0x07000}, + {0x30, 0x08000}, + {0x30, 0x10000}, + {0x30, 0x18000}, + {0x30, 0x20000}, + {0x30, 0x28000}, + {0x30, 0x30000}, + {0x30, 0x38000}, + {0x30, 0x40000}, + {0x30, 0x48000}, + {0x30, 0x50000}, + {0x30, 0x58000}, + {0x30, 0x60000}, + {0x30, 0x68000}, + {0x30, 0x70000}, + {0x30, 0x78000}, + {0x30, 0x80000}, + {0x30, 0x88000}, + {0x30, 0x90000}, + {0x30, 0x98000}, + {0x30, 0xA0000}, + {0x30, 0xA8000}, + {0x30, 0xB0000}, + {0x30, 0xB8000}, + {0x30, 0xC0000}, + {0x30, 0xC8000}, + {0x30, 0xD0000}, + {0x30, 0xD8000}, + {0x30, 0xE0000}, + {0x30, 0xE8000}, + {0x30, 0xF0000}, + {0x30, 0xF8000}, + {0x30, 0x100000}, + {0x30, 0x108000}, + {0x30, 0x110000}, + {0x30, 0x118000}, + {0x30, 0x120000}, + {0x30, 0x128000}, + {0x30, 0x130000}, + {0x30, 0x138000}, + {0x30, 0x140000}, + {0x30, 0x148000}, + {0x30, 0x150000}, + {0x30, 0x158000}, + {0x30, 0x160000}, + {0x30, 0x168000}, + {0x30, 0x170000}, + {0x30, 0x178000}, + {0x30, 0x180000}, + {0x30, 0x188000}, + {0x30, 0x190000}, + {0x30, 0x198000}, + {0x30, 0x1A0000}, + {0x30, 0x1A8000}, + {0x30, 0x1B0000}, + {0x30, 0x1B8000}, + {0x30, 0x1C0000}, + {0x30, 0x1C8000}, + {0x30, 0x1D0000}, + {0x30, 0x1D8000}, + {0x30, 0x1E0000}, + {0x30, 0x1E8000}, + {0x30, 0x1F0000}, + {0x30, 0x1F8000} +}; + +/* Array of all the sector sizes */ +static const WORD32 MACROMIX_MX29LV320EB_flash_block_size_array[] = +{ + 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, + 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000, 0x10000 +}; +#endif + static const flash_id_table_t flash_id_table[] = { /* Insert Flashes used by Forth Systeme */ /* AMD AM29LV641 */ @@ -3462,6 +3555,18 @@ static const flash_id_table_t flash_id_table[] = { , #endif +#if NAFLASH_WANT_TO_SUPPORT_MX29LV320EB + { + 0xC2, 0x00, MACROMIX_MX29LV320EB_ID1, 0x01, 0, 0, 0, 0, MACROMIX_MX29LV320EB_FLASH_SECTORS, MACROMIX_MX29LV320EB_FLASH_SECTOR_SIZE, MACROMIX_MX29LV320EB_PROG_SECTOR_SIZE, 90, + (flash_cmd_t *) AMD_flash_id_enter_cmd, sizeof (AMD_flash_id_enter_cmd) / sizeof (flash_cmd_t), + (flash_cmd_t *) AMD_flash_id_exit_cmd, sizeof (AMD_flash_id_exit_cmd) / sizeof (flash_cmd_t), + (flash_cmd_t *) AMD_flash_erase_cmd, sizeof (AMD_flash_erase_cmd) / sizeof (flash_cmd_t), + (flash_cmd_t *) AMD_flash_write_cmd, sizeof (AMD_flash_write_cmd) / sizeof (flash_cmd_t), + (flash_cmd_t *) MACROMIX_MX29LV320EB_flash_block_erase_cmd, + (WORD32 *) MACROMIX_MX29LV320EB_flash_block_size_array} + , +#endif + #if NAFLASH_WANT_TO_SUPPORT_MX29LV640EB 

If you don't have this in your source code, you don't have the latest NET+OS 7.5.2.2 with all PackageManager (PKM) patches applied. You should run the PKM, install all latest patches (specifically Patch version:  Flash 1.04 ESP_Plugins 1.02 ) and create a new project and merge your changes from the old into the new project.

During project creation some of the installed source code and libraries are copied into the new project. So updating the ESP with PKM will only update sources and libs for new projects. Existing projects might still use their old sources + libraries.

Last updated: Aug 18, 2023

Filed Under

Embedded

Recently Viewed

No recently viewed articles

Did you find this article helpful?