Current flash is partially blank and dme lost communication I can still read and write to it using my programmer. It’s for a 2017 430i grand coupe. MG1CS003 DME8R1_SP11 B48
You'll need a known-good full flash (internal + external) for that DME to restore communication. A few things to sort out first:
What programmer are you using to read/write — bench tool (e.g. AutoHex, Ktag, PCMFlash) or direct JTAG/BDM on the Tricore?
Did you read the internal flash (Tricore TC298 pflash/dflash) or only the external SPI flash?
Can you share the exact HW number and SW number from the DME label or from whatever you were able to read? (e.g. HW: 8491496 / SW: 8XXXxxx)
Is the partially blank area in the calibration zone, the program/boot area, or the external flash?
For MG1CS003 / DME8R1_SP11 on a B48 (F36 430i), the flash consists of the internal Tricore pflash (program + cal) and external SPI NOR. If the boot or program area is wiped, the DME won't initialize CAN communication at all — which matches your symptom.
A stock ori flash for the exact HW/SW revision would let you restore it, but it must match your hardware number precisely. Post the HW and SW numbers (or a photo of the DME label) and confirm your read method, and someone here may be able to help locate the correct file or confirm compatibility.