Académique Documents
Professionnel Documents
Culture Documents
init_firmware()
Alimentar WD - 250 ms 1
True
WD_ext = feed_WD (WD_ext,
20000); SFRPAGE = CONFIG_PAGE
130us Timer
Finalización de conteo de
SFRPAGE = TMR3_PAGE
130us
Detiene el Timer 3 TMR3CN_bit.TF3 == 1
True
Reinicia el Timer 3 TMR3CN_bit.TOG3 = 0
Tarea de lectura de
wait_us ()
variables digitales
ReadDig()
Update the values in the
enableProcTest
Test structure
True
Update the values according
cargarEstructuraDeTest(testConfigNumber, processTestNumber)
to the test structure
powerBits = testVector.powerBits
nimBits = testVector.nimBits
localSweepBits = testVector.localSweepBits
localOutput = testVector.localOutput
False False
dirmod = testVector.dirmod
vTestAdc = testVector.vTestAdc
vCampbell = testVector.vCampbell
currentFreq = testVector.currentFreq
Tarea de checkeo de
sweepState = testVector.sweepState
funcionamiento
Conteo de errores y resete LogicaPCG()
Si hay un error general, se
apaga el LED de estado del PCG_errorCountAndReset()
supervisor
False errorGeneral
True False
False END 130us Timer
LED_SUP_OK = LED_OFF 10ms Timer
TimeOut SFRPAGE = TMR2_PAGE
TMR2CN_bit.TF2 == 1 Detiene Timer 2
True
Iniciar Timer2 - Próxima
TMR2CN_bit.TOG2 = 0
interrupción en 10 ms
Tarea de lectura de
wait_ms(TS)
variables analógicas
Cuando Prom == 0 se dispone
ReadAdc()
de un nuevo valor de ADC
Se cálcula la frecuencia de
pulsos junto al nuevo valor
del ADC.
calculateFrequency() es
asincrónico a la captura de
los pulsos y
se calcula a partir de las
Prom == 0
muestras auxiliares de
conteo y de intervalos
de cuenta.
Guarda el valor previo de la
frecuencia para detección de
finalización
de barridos exponenciales.
True
Calcula el nuevo valor de
previousFreq = currentFreq
frecuencia
calculateFrequency()
Increments the sample of the
simulated value each time a
enableProcTest new value is read
The sample is frezed in the
last sample
True
testVector.sample<((testVector.samplesNumber)-1)
False True
False Update the values in the
testVector.sample++
Test structure
False Update the values according
cargarEstructuraDeTest(testConfigNumber, processTestNumber)
to the test vector
False
vTestAdc = testVector.vTestAdc
vCampbell = testVector.vCampbell
Detección de finalización de
currentFreq = testVector.currentFreq
barridos exponenciales
Cálculo de Rate PCG_detectSweepEnd()
rateCalc()
END 10ms Timer
Nuevo Paquete CAN SFRPAGE = CONFIG_PAGE
Flag de micro OK para CAN
microOK |= 0x04
(CAN_tx == 1)
True
Inicio_uC == 0
True
procesarCAN()