One thing to try is to just use CF4, and monitor the emission lines.
When your N or CN line vanishes do a brief over etch.
You might have a mixture of CF4 and CHF3 to make sure you get an
appreciable CN emmission.
I am thinking that you have a series of SiO2, Si3N4, Si and so you need
some intermediate chemistry that will etch Si3N4 but will chock
stoichiometrically on Si.
However, that might be making this into too much of a project and you
can just use an emission line monitoring to endpoint when the etch
reaches the Si under the Si3N4.
Ed