Where is the difference between section 197 and De minimis safe harbor election?

I know both of them can be used to write off business assets as business expenses, but what are the differences between them? I googled it but couldn't get some clear answers.