Makefile addition for GRUVIN9X PCB PORTH real-time diagnostics.

$ make ... PORTH_TIMING=YES

See code comments for details. This is used to analyse real-world timing of
mixer interrupt, setupPulses and PPM or DSM=SERIAL or DSM2=PPM data output
streams.

NOTE: Not compatible to SOUND=YES (SOMO14)
This commit is contained in:
gruvin@gmail.com
2012-10-31 23:40:21 +00:00
parent 21f3e4395a
commit c71ee46e5f
4 changed files with 46 additions and 3 deletions
+10
View File
@@ -2996,6 +2996,11 @@ uint16_t getTmr16KHz()
#if defined (PCBGRUVIN9X)
ISR(TIMER5_COMPA_vect, ISR_NOBLOCK) // mixer interrupt
{
#ifdef PORTH_TIMING
PORTH |= 0x40; // PORTH:6 LOW->HIGH signals start of mixer interrupt
#endif
cli();
TIMSK5 &= ~(1<<OCIE5A); //stop reentrance
OCR5A = 0x7d * 40; /* 20ms */
@@ -3027,6 +3032,11 @@ ISR(TIMER5_COMPA_vect, ISR_NOBLOCK) // mixer interrupt
cli();
TIMSK5 |= (1<<OCIE5A); //stop reentrance
sei();
#ifdef PORTH_TIMING
PORTH &= ~0x40; // PORTH:6 HIGH->LOW signals end of mixer interrupt
#endif
}
#endif