CW 5.9, HCS08QE32, DEMOQE
I wish to have a 1000Hz clock for TPM timing, and it was suggested by a forum member that that I should set my TPM to use 32kHz crystal XCLK, and prescaler of 32 to give me my 1000Hz clock, and that, I understand.
Below is code I have to set the ICS (HCS08QE has no ICG).
ICSC1 = 0b10000000; // CLKS = 10 external referenceICSC2 = 0b00000110; // EREFS = 1 oscillator driving crystal, // ERCLKEN = 1 ICSERCLK enabledwhile(!ICSSC_OSCINIT){} // wait for external crystal to be initiallised
I am getting confused by internal/external references, there seems to be more options than I thought there would be, also the EREFS bit I am unsure of, as the book I am using and data sheet seem to contradict each other when mentioning oscillators/crystals/resonators.
Basically I just want to set the micro to make use of the 32kHz crystal on my demo board (attatched to EXTAL and XTAL pins), but am not sure if I am setting the registers correctly, can anyone help?
Regards,
Iain