If an attempt to Erase or Partition an SSD in Apple OS X return the error of "Unable to write to the last block of the device," a few different issues may be at fault. Try these steps to easily fix this error or confirm if more advanced support is needed.
1. Change cables and ports
A communication error or some fault in the connection can cause this error. Changing ports and cables addresses this. Use an alternate USB port if your SSD is connected externally and change your USB cable or enclosure if applicable. Try the device inside the system if an internal SATA connection is available. Also, moving the drive to another system entirely if you have another one available may help.
2. Use Disk Utility via macOS Recovery
If you are receiving this error while you are booted to OS X like normal, the same process within the Recovery Utilities may help. Boot to macOS Recovery (either by holding Option or Command+R during your system's startup, depending on which your system requires) and attempt the Erase procedure there to rule out other software as a potential source of conflicts.
3. Use alternate software or another operating system
A Disk Utility or OS X variable can be at fault. If so, trying different partitioning or formatting software, including but not limited to Windows Disk Management, may be a solution. If you format the drive in such an environment and end up using a file system not suited for your needs (such as Windows NTFS when your SSD needs to be Mac OS Extended Journaled), you can typically move the drive back to your Mac and Erase it again, which should now complete after the drive has accepted a format elsewhere.
If the troubleshooting above is not effective, please contact us for further support.