Stand your ground means you do not have a duty to retreat if threatened with force, lethal or otherwise.
Castle doctrine means you can use deadly force if threatened at all, but only in the places listed in your particular statute. It is assumed that deadly force was the intention when someone enters the following locations and the burden of proof also falls on the prosecutor in these instances to prove it was anything other than SD. All statutes will include your home, others, buildings on your property, other peoples homes and buildings on their property, your car and other peoples cars. It's important that you read the details in your particular state's laws.