Skip to main content
Production EEPROM and Flash Programming with Binho Nova and Python, featured image

Production EEPROM and Flash Programming with Binho Nova and Python

GSAS Engineering · · 5 min read

Production EEPROM and Flash Programming with Binho Nova and Python

Many embedded products include external EEPROM or SPI flash memory alongside the main microcontroller. The MCU runs the application firmware, but the EEPROM stores configuration data, device calibration constants, factory settings, network credentials, or product identity information. The SPI flash may hold firmware update images, data logs, web server assets, or voice prompts.

Programming these external memories during production is a separate step from MCU programming. The MCU programmer handles the microcontroller’s internal flash. The EEPROM and SPI flash need their own programming solution, and the Binho Nova with its Python SDK provides exactly that.

I2C EEPROM Programming

I2C EEPROMs (24LC256, 24C02, AT24CM02, and similar) are the most common external non-volatile memory in embedded products. They store small amounts of configuration data, typically 256 bytes to 2 MB, at I2C addresses that depend on the device and its address pin configuration.

The Binho Nova’s I2C interface, running at up to 3.4 MHz, provides direct access to these EEPROMs through the Python SDK. A basic write-and-verify script looks like:

from binho.interfaces.i2cDevice import I2CDevice

## Connect to Nova
from binho import binhoHostAdapter
binho = binhoHostAdapter.binhoHostAdapter()
binho.setOperationMode(0, 'I2C')
binho.setI2CFrequency(0, 400000)  # 400 kHz

eeprom_addr = 0x50  # 7-bit address

## Write configuration data starting at address 0x00
config_data = [0x01, 0x02, 0x03, 0x04]  # Example
binho.writeToAddress(0, eeprom_addr, config_data)

## Read back and verify
readback = binho.readFromAddress(0, eeprom_addr, len(config_data))
assert readback == config_data, "Verification failed"
print("EEPROM programming verified")

For production use, the script extends to handle page-aligned writes (respecting the EEPROM’s page write size), write cycle delays (typically 5 ms per page), and error handling with retry logic.

SPI Flash Programming

SPI NOR flash devices (Winbond W25Q, Macronix MX25L, ISSI IS25LP, GigaDevice GD25Q) are used for larger storage, firmware update images, web assets, voice prompts, and data logs. These devices communicate through SPI at speeds from 1 MHz to the Nova’s maximum of 12 MHz.

A typical SPI flash programming workflow involves:

  1. Read JEDEC ID to confirm the flash device is present and identify its type
  2. Erase the target sectors or perform a full chip erase
  3. Program data in page-sized chunks (typically 256 bytes per page)
  4. Verify by reading back the programmed data and comparing against the source
## Read JEDEC ID
binho.setOperationMode(0, 'SPI')
binho.setSPIFrequency(0, 8000000)  # 8 MHz

jedec_id = binho.spiTransfer(0, [0x9F, 0x00, 0x00, 0x00])
manufacturer = jedec_id[1]
device_type = jedec_id[2]
capacity = jedec_id[3]
print(f"Flash: MFG={hex(manufacturer)}, Type={hex(device_type)}, Cap={hex(capacity)}")

## Chip erase
binho.spiTransfer(0, [0x06])        # Write enable
binho.spiTransfer(0, [0xC7])        # Chip erase
## Wait for erase to complete (poll status register)

The programming script handles the erase-program-verify cycle for the full flash image, with progress reporting and error handling suitable for production use.

Production Workflow Integration

For production floors in Chennai and Pune, the Python script integrates into the manufacturing workflow through several approaches:

Standalone station. A PC with the Nova connected runs the programming script. The operator loads a board into a bed-of-nails fixture, initiates the script (button press, barcode scan trigger, or MES signal), and waits for the pass/fail result. The script programs both the I2C EEPROM and SPI flash in sequence.

Integrated with MCU programming. After the MCU is programmed by a dedicated MCU programmer (such as an Elprotronic S-GANG), the board moves to the Nova station for external memory programming. The serial number assigned during MCU programming can be read from the MCU and cross-referenced with the EEPROM data.

Calibration data injection. For products that undergo calibration during production test (temperature sensors, pressure sensors, power meters), the calibration constants measured at the test station are written to EEPROM by the Nova as the final production step.

Per-Unit Serialization

The Nova’s Python SDK enables per-unit data customization. Each board can receive unique data written to EEPROM or flash:

  • Serial numbers for traceability
  • MAC addresses for network-connected devices
  • Encryption keys for secure products
  • Calibration constants measured during production test
  • Configuration parameters specific to the product variant or customer order

The script reads the unique data from a CSV file, database, or MES API, writes it to the target memory, and verifies the write. Production logs record the per-unit data alongside the programming result for traceability.

Scaling Considerations

The Nova programs one board at a time, making it suitable for production volumes up to a few thousand units per month. For higher volumes, the Binho Supernova provides faster SPI speeds (50 MHz vs 12 MHz) and can reduce per-unit programming time for large SPI flash images.

For productions lines in Bengaluru and Hyderabad running moderate volumes across diverse product types, the Nova’s flexibility, supporting both I2C EEPROM and SPI flash from one tool, with Python scriptability for custom per-unit data, makes it a practical production tool that adapts to changing product requirements without hardware changes.

Why Buy from GSAS

GSAS Micro Systems is the authorized Binho engineering partner in India. We provide the Nova and Supernova with INR invoicing, local inventory, and applications engineering support. Our team in Bengaluru, Hyderabad, Chennai, Pune, Mumbai, and Delhi NCR helps production teams develop Python programming scripts, design test fixtures, and integrate Binho adapters into manufacturing workflows. Contact us for evaluation units or production integration consulting.

Interested in Binho tools?

Talk to our application engineers for personalized tool recommendations.

Stay in the Loop

Get monthly compliance updates, product insights, and engineering best practices delivered to your inbox.