Hi!
I'm using a Piccolo control card, and the new one I got has also the XTAL mounted. I have several question about the use of XTAL.
1. It provides a more reliable clock signal than INTOSC1? It's in general better to use the XTAL if available?
2. I'm using the NMIINT to set some outputs before RESET in case of a CLOCKFAIL condition. When I use INTOSC1 as clock source, I use OSCOFF to simulate a missing clock. This is working as I expect. For the case in which I use XTAL as clock source, I don't understand how things should work. I simulate the missing clock by writing:
NmiIntruptRegs.NMIFLGFRC.bit.CLOCKFAIL = 1;
I get the interrupt, and I know the clock source is automatically switched to INTOSC1. I don't see any change in the registers ( I don't know if I look where I should... Sysctrl, NMIINT). I was thinking to let the system run with INTOSC1 as clock source ( is this a good practice or I should better let the system reset?) and only if INTOSC1 fails too, to let the system reset. So after the fail of XTAL, I try to simulate a failure on INTOSC1 using OSCOFF, but I get an error in the debugger, and I need to switch off the supply of the board to take the system out of the state it remained in.
Thank you,
Monica