There's an interrupt that is run only when there's a catastrophe of desaturation detection or undervoltage, so it won't cause any problems with jitter. However, the FOC code is run at 10KHz, and is run inside an interrupt. A 2nd timer based interrupt could do its thing at 40KHz (toggle at 40KHz for 20KHz frequency), but that's a lot of interruptions. I'm not sure how long interrupts take with their pausing and returning. Maybe you could include a little attiny ($1) on the board that oscillates at any frequency that sounds good to you? I use an attiny putting out a frequency of 50KHz (updated at 100kHz) for feeding the inputs of all 6 isolated supply inputs. Fran told me that he used hundreds of attinys in his EVs that he designed (a mine blowing up machine, etc...), and has never seen one be less than 100% reliable.
On the other hand, if you are happy with 50KHz, you could use the signal from the ATTINY that's on the board! haha. Also, the jitter may not cause a problem for the FOC code if we had the main dspic30f4011 do it.
|