S7-300 CPU 313C MMC Recovery: Fixing Memory Inadequate Faults

David Krause14 min read
S7-300SiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

S7-300 CPU 313C MMC Recovery: Fixing Memory Inadequate and Communication Faults

1. Problem Statement

A SIMATIC S7-300 CPU 313C (order number 6ES7313-5BE01-0AB0, also marketed as 313C-2DP / 313C-2 PtP in the -6xx variant) returns one or both of the following fault conditions when the integrated work memory has been cleared and the project is reloaded:

  • "Memory inadequate" / "Not enough memory in the target system" when attempting to download the project from STEP 7 with the Micro Memory Card (MMC) removed.
  • "No communication to PLC" or permanent STOP / SF/BF indication when the MMC is inserted but has been formatted on a standard Windows / Linux PC.

Both symptoms point to the same root cause: the MMC is no longer recognised by the CPU as a valid Siemens boot medium. Because every S7-300 CPU (Firmware V2.0 and later) and every S7-400 CPU loads its firmware extensions and, when present, the user project from the MMC, a non-Siemens file system on the card renders the CPU effectively unusable even though the card physically seats correctly.

S7-300 CPUs with firmware 2.x and 3.x have no internal retentive load memory; the MMC is mandatory for project retention across power cycles. Without a working MMC, the CPU always powers up empty.

2. CPU 313C Hardware Architecture Relevant to MMC Behaviour

The CPU 313C integrates 32 digital inputs, 16 digital outputs, 4 analog inputs, 2 analog outputs, and a technological counter section. The memory model follows the standard SIMATIC separation:

Memory Area Size (313C, FW 2.6) Volatility Location
Load memory 64 KB integrated, expandable with MMC up to 8 MB Non-volatile RAM (integrated) + MMC
Work memory (code) 32 KB Volatile RAM
Work memory (data) 32 KB Volatile RAM
Retentive memory Configurable up to 32 KB Non-volatile Backed by MMC
System memory Bit memory, timers, counters Volatile RAM

The integrated 64 KB RAM load memory is volatile. When power is removed, the project evaporates unless it has been transferred to the MMC. A CPU 313C with a missing or invalid MMC therefore behaves exactly as the user reports: a download succeeds momentarily into the RAM load area, then on next power-up the CPU reports "Memory inadequate" because it cannot rebuild the load image from MMC.

2.1 LED Diagnostic Indicators

Cross-check the front-panel LED pattern. The 313C ships with six status LEDs (SF, BF, DC5V, FRCE, RUN, STOP). The expected pattern during a faulty MMC condition is:

LED Color State with PC-formatted MMC Interpretation
SF Red Flashing or steady System fault: MMC missing/incompatible
BF Red Off (313C) / flashing (313C-2DP only if PROFIBUS master configured) Bus fault
DC5V Green Steady Internal 5 V supply healthy
FRCE Yellow Off Force inactive
RUN Green Off CPU not running
STOP Yellow Steady (slow flash 0.5 Hz if MMC error) CPU in STOP due to missing load image

A STOP LED that flashes slowly (0.5 Hz) instead of being steadily lit is a classic signature of an MMC read error. The diagnostic buffer records event ID 0x12 0xA0 "MMC is not inserted" or 0x12 0xA1 "MMC cannot be read".

3. Why a PC-Formatted MMC Fails in a Siemens CPU

The MMC is not a generic FAT16/FAT32 storage card. Siemens MMCs (order numbers 6ES7953-8Lxx-0AA0) contain:

  1. A reserved Siemens header sector at LBA 0 (8-byte signature "MMCFLASH" plus a 128-byte volume ID).
  2. A custom sector allocation table where sectors 0x00000000 through 0x00000003 contain CPU firmware-bootstrap blocks.
  3. A standard FAT16 file system from LBA 4 onward, but with cluster size 2 sectors and fixed OEM ID "SIMATIC".
  4. Active wear-levelling metadata in the controller's flash translation layer.

When the card is reformatted with a Windows or Linux tool, the signature and bootstrap blocks are overwritten. The CPU's boot ROM polls LBA 0 first; when it cannot find the MMCFLASH signature, the MMC is rejected even though the FAT layer appears intact to a PC card reader. The result is the dual fault: with the MMC inserted the CPU stops because it cannot read the bootstrap, and with the MMC removed the download fails because the integrated 64 KB RAM load memory cannot hold the project (typical user projects for a 313C are 80-250 KB once the system data and technology objects are included).

Always assume a PC-formatted MMC is bricked from the CPU's perspective. Do not attempt in-circuit recovery through STEP 7; the CPU will not reformat the card while it is installed.

4. Affected Components and Recognising Genuine Siemens MMC

Only Siemens-branded MMCs are supported by the S7-300 boot ROM. Third-party SD-to-MMC adapters and counterfeit cards are detected and rejected. Original MMC identification:

MMC Capacity Order Number (MLFB) Typical Use in 313C
64 KB 6ES7953-8LF11-0AA0 Small blocks only
128 KB 6ES7953-8LG11-0AA0 Small blocks only
512 KB 6ES7953-8LF20-0AA0 Standard for 313C
2 MB 6ES7953-8LL20-0AA0 Recommended headroom
4 MB 6ES7953-8LM20-0AA0 Firmware updates
8 MB 6ES7953-8LP20-0AA0 Firmware updates

A genuine Siemens MMC shows the Siemens logo, MLFB code, and a serial number on the label. The casing is grey-blue with a single write-protect slider on the side. Counterfeit cards often omit the serial number and use a different casing colour.

5. Pre-Recovery Checklist

Before starting any recovery procedure, gather the following:

  • STEP 7 (SIMATIC Manager) V5.5 + SPx or TIA Portal V13 SP1 / V14 / V15 / V16 / V17 installed on the engineering PC.
  • A Siemens Field PG (programming device) or any PC with an SD/MMC card reader running STEP 7.
  • A genuine Siemens MMC of capacity ≥ 512 KB. The 64 KB and 128 KB cards cannot hold a typical 313C project that includes HMI tags and recipe DBs.
  • An MPI or PROFIBUS PC adapter (PC Adapter USB A2, 6ES7972-0CB20-0XA0) or Ethernet CP (CP 343-1 Lean/Standard) if downloading over Industrial Ethernet.
  • The original STEP 7 project archive (.zip) from EKB or backup. If only a paper printout exists, an online read-back is not possible because the PLC load memory is now empty.

6. Recovery Procedure A: Format the MMC in a Siemens PG / STEP 7

This procedure applies when the MMC is genuine Siemens but was PC-formatted and cannot be re-initialised in-circuit.

  1. Power down the CPU 313C and remove the MMC from the slot. Insert the card into the PCMCIA / SD reader of the Field PG, or use a USB MMC reader.
  2. Open SIMATIC Manager → Options → SIMATIC Card Manager (German: SIMATIC Karten-Manager). Alternatively, on a Field PG, start Start → Programs → Siemens Automation → SIMATIC → STEP 7 → S7 Card Manager.
  3. In the Card Manager, select the drive letter corresponding to the MMC. The "Card Type" should auto-detect as S7-MMC; if it shows Generic, the card reader is not supported - use a different PG port.
  4. Click Format. STEP 7 writes the Siemens header, the firmware bootstrap blocks, and a fresh FAT16 file system. Duration: 15-60 s for 512 KB; up to 5 min for 8 MB cards.
  5. After the green Format successful dialog, click Close and physically remove the card. Do NOT drag-and-drop files from Windows Explorer; STEP 7 owns the entire card.
  6. Insert the freshly formatted MMC into the powered-off CPU 313C.
  7. Apply 24 VDC to the PS 307 power supply and power on the CPU. Verify that the STOP LED is steady (not flashing) and that the diagnostic buffer records MMC initialised (event ID 0x11 0x11).
  8. Connect STEP 7 to the CPU via MPI / PROFIBUS / Ethernet and proceed to step 7 of section 8 to load the project.
If STEP 7 reports Card cannot be formatted - unknown card type, the MMC is counterfeit or has a defective flash translation layer. Replace the card.

7. Recovery Procedure B: Write a Known-Good Image from Backup

If a project archive (.zip) or a Card image (.s7img or .arc) is available, recovery is faster.

  1. Insert the PC-formatted or blank MMC into the Field PG.
  2. Open SIMATIC Manager → Options → SIMATIC Card Manager.
  3. Select the MMC drive and click Restore Card (German: Karte wiederherstellen).
  4. Navigate to the previously archived .s7img or .arc backup. STEP 7 verifies the MD5 checksum of the image before writing.
  5. When the restore completes, click Finish and remove the MMC.
  6. Insert into the CPU 313C and power up. The CPU should boot into STOP with the previously selected project name visible in STEP 7's online view.

8. Recovery Procedure C: Replace the MMC and Reload the Project

This is the most common field remedy when the MMC is unreadable.

  1. Order a replacement MMC: 6ES7953-8LF20-0AA0 (512 KB) or larger.
  2. Insert the new MMC into the powered-off CPU. Power on. The CPU's diagnostic buffer will record No project on MMC (event ID 0x12 0xA2) and the STOP LED will be steady.
  3. Open STEP 7 (or TIA Portal) and de-archive the original project to a working directory.
  4. Connect the engineering PC to the CPU using Online → Accessible Nodes. If the CPU does not appear, verify the MPI address (default 2), baud rate (187.5 kbit/s default for MPI), and the PC Adapter cable.
  5. Once the CPU is visible, right-click the project in the component view and choose Download to Target System (or in TIA Portal: Online → Download to device).
  6. STEP 7 will automatically format the MMC during the download. Verify in the dialog "Download to Target System" that the option "Format MMC before download" is checked. Without this option, the download will fail with the same "Memory inadequate" error.
  7. Confirm the download. Progress bar should reach 100% without "Memory inadequate" interruption.
  8. Switch the CPU from STOP to RUN via the operating-mode selector (or via STEP 7 Operating Mode → RUN). Verify the RUN LED goes steady green within 5 seconds.

9. TIA Portal Variant of the Recovery Procedure

For projects that were originally engineered in TIA Portal V13 or later, the procedure is functionally identical but uses different menu paths:

  1. Open the TIA Portal project.
  2. Select the CPU 313C device in the project tree.
  3. Right-click → Download to device → Software (all).
  4. In the "Download" dialog, ensure Consistent download is selected and click Search under "Select target device".
  5. Tick Format MMC in the advanced options if the MMC has been used previously.
  6. Click Load. TIA Portal writes the active project to the MMC and reports the elapsed time and bytes transferred.
  7. After the download, click Finish and check the Online & diagnostics view to confirm RUN state.

10. Verification Checklist

After any of the three recovery procedures, run the following verifications before returning the machine to production:

Check Expected Result Method
MMC read by STEP 7 Shows project name, last modified timestamp Online → Accessible Nodes → MMC
Diagnostic buffer entry No errors after power cycle CPU → Diagnostic Buffer
STOP → RUN transition RUN LED steady within 5 s, no SF Mode selector or STEP 7
Retentive data retention DB contents survive power cycle Power off / on, compare values
I/O scan Process I/O updates in watch table Online → Monitor / Modify
HMI tag exchange (if WinCC flexible / TIA HMI present) Tags update < 1 s HMI runtime diagnostics
Firmware consistency Firmware in CPU matches expected FW V2.6.7 or V3.3.10

11. Troubleshooting Matrix

Symptom Root Cause Remedy
"Memory inadequate" without MMC Integrated 64 KB RAM insufficient Insert MMC, redo download with "Format MMC" enabled
"Memory inadequate" with MMC inserted MMC corrupt or counterfeit Replace with genuine Siemens MMC, format with SIMATIC Card Manager
STOP LED flashes 0.5 Hz MMC bootstrap unreadable Format MMC with Field PG, retry download
CPU not visible in "Accessible Nodes" MPI address conflict or cable fault Set MPI = 2, baud = 187.5 kbit/s, swap cable
SF LED steady after download Hardware mismatch / OB not loaded Check diagnostic buffer, re-download OB1, OB82, OB100
HMI shows "No connection" HMI connection not in project Verify WinCC flexible connection in PG/PC interface
CPU hangs every 5-10 minutes Watchdog or scan-time overrun Check OB1 cycle time, OB80/OB121 entries, reduce pointer arithmetic
CPU stays in STOP at startup Missing OB100 / OB101 / OB102 Reload the project including startup OBs

12. Related CPU 313C Issues Observed in Field Service

Two recurring failure modes that often coexist with the MMC problem are worth noting because they produce overlapping symptoms:

12.1 CPU 313C-2DP Connectivity Hang

Symptoms include the CPU entering STOP unexpectedly, "No PROFINET communication" or "Connection aborted by CPU" diagnostics on the connected HMI or PG. Common causes: PROFIBUS slave failure generating OB86 not loaded, EMC noise on the bus connector, or a corrupted MMC that intermittently succeeds in bootstrap but fails during I/O update. Fix sequence: replace MMC first, then check OB86, OB122, and the PROFIBUS termination.

12.2 CPU 313C Stuck in STOP After Power-Up

Even after a successful MMC replacement, the CPU can remain in STOP if the startup OBs (OB100 / OB101 / OB102) are missing from the project archive. STEP 7 will compile and download the project but the CPU cannot complete its startup sequence without OB100 (warm restart). Always verify that OB1, OB82, OB86, OB100, OB121, OB122 are present in the project offline/online comparison.

13. Firmware Updates and MMC Re-Programming

Firmware updates for the CPU 313C are stored on the MMC and executed on next cold restart. The procedure doubles as a sanity check that the MMC is healthy:

  1. Download the firmware file (e.g. S7300_CPU_313C_V2_6_7.fwc or V3.x equivalent) from the Siemens Product Support portal.
  2. Insert an MMC of at least 4 MB (order number 6ES7953-8LM20-0AA0) into the Field PG.
  3. Format the MMC with SIMATIC Card Manager, then drag the .fwc file to the card root.
  4. Insert the MMC into the powered-off CPU 313C and power on. The STOP LED flashes fast (2 Hz) while the firmware is being written to internal flash; this takes 30-90 s.
  5. When the STOP LED returns to steady, remove the MMC and restart the CPU without it to confirm the new firmware is active.

14. Preventive Measures

  • Always archive projects with card images: SIMATIC Manager → File → Archive → Card image. Store the resulting .s7img on a managed backup share.
  • Never format the MMC on a non-Siemens system. Use only STEP 7 / SIMATIC Card Manager or TIA Portal's card-management functions.
  • Periodically verify the MMC by removing it from a powered-off CPU, reading it with the Card Manager, and checking for read errors. Replace at the first sign of bad blocks.
  • Use the same MMC capacity across the fleet to simplify spare-parts inventory.
  • Enable write-protection on MMCs containing firmware once the deployment is complete.
  • Maintain a boot project in the MMC that contains OB100 and a heartbeat so a corrupt user program cannot leave the machine in an indeterminate state.

15. Procurement Notes

Item MLFB / Order Number Notes
CPU 313C, 32 DI / 16 DO / 4 AI / 2 AO 6ES7313-5BE01-0AB0 FW V2.6 / V3.3
CPU 313C-2DP, with PROFIBUS DP master 6ES7313-6CE01-0AB0 FW V2.6 / V3.3
CPU 313C-2 PtP, with serial interface 6ES7313-6BE01-0AB0 FW V2.6
MMC 512 KB 6ES7953-8LF20-0AA0 Standard capacity
MMC 2 MB 6ES7953-8LL20-0AA0 Recommended headroom
PC Adapter USB A2 (MPI/PROFIBUS) 6ES7972-0CB20-0XA0 Required for online access
PS 307 power supply, 5 A 6ES7307-1EA01-0AA0 120/230 VAC in

16. Frequently Asked Questions

Why does my S7-300 CPU 313C show "Memory inadequate" when the MMC is inserted?

The MMC is either PC-formatted, counterfeit, or defective. STEP 7 cannot write the project to a card that lacks the Siemens MMCFLASH header. Reformat the MMC in the SIMATIC Card Manager from a Field PG, or replace it with a genuine Siemens MMC (e.g. 6ES7953-8LF20-0AA0, 512 KB) and re-download with the "Format MMC before download" option enabled.

Can I format a Siemens MMC with Windows?

No. Windows formats the card with a generic FAT16/32 file system and overwrites the Siemens bootstrap sector at LBA 0. The CPU's boot ROM then rejects the card, producing "No communication" and STOP LED flashing at 0.5 Hz. Always use the SIMATIC Card Manager inside STEP 7 V5.5 or TIA Portal V13+.

What is the minimum MMC capacity for a CPU 313C project?

512 KB (6ES7953-8LF20-0AA0) is the practical minimum for a project with HMI tags and one or two technology OBs. For firmware updates or projects exceeding 256 KB compiled, use 2 MB or larger.

How do I get the project back into the PLC if I no longer have the STEP 7 archive?

If the project was once loaded successfully, the MMC itself contained the load image. If the MMC is intact, insert it into a PG's Card Manager and read it back as a Card image (.s7img) before re-deploying. If the MMC has been corrupted by PC formatting, the load image is lost and the project must be re-engineered from the documentation, paper printout, or HMI tag list.

The CPU is visible in "Accessible Nodes" but the download fails immediately - what next?

Verify the MPI address (default 2), baud rate (187.5 kbit/s default), and that the PC Adapter is selected as the active PG/PC interface in Set PG/PC Interface. If these are correct, the most likely cause is the MMC integrity - format it with the SIMATIC Card Manager and retry with the "Format MMC" option ticked.

Can I reuse the same MMC after replacing the CPU 313C?

Yes, provided the new CPU is from the same family (S7-300) and supports the MMC capacity. The MMC is hot-swappable only when the CPU is powered off; inserting it with the CPU in RUN will be ignored.

Back to blog