CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API Reference (PDF) - Persistor Instruments Inc CF2 API Reference (PDF) - Persistor Instruments Inc
CF2 API ReferenceQPBUnlockSlot -- Unlock PicoBus for unrestricted use.Description:Prototype:Inputs:Returns:Notes:This function allows you to unlock the PicoBus after it has been locked by a specific slot.bool QPBUnlockSlot (QPB *qpb);qpb is a pointer to the slot structure that owns the current lockReturns TRUE if the bus was successfully unlocked or FALSE if it was unable to unlock or thegiven QPB structure was not the owner of the lock..See QPBLockSlot for more information. It is necessary to lock the bus when performingasynchronous reads using QPBRepeatAsynch.PERSISTORInstruments Inc.48 of 84CF2 API Reference7/19/2005
CF2 API ReferenceReal Time Clock Drivers and FunctionsReal Time Clock OperationThe 68332 has no onboard Real Time Clock (RTC). The RTC function is provided by a Texas InstrumentsMSP430 microcontroller which lives on the CF2 board with the 68332. The MSP430 is clocked by a 40 KHzcrystal, and powered by either the main supply or an off-board backup battery. The RTC crystal is a tuningfork resonator with an initial accuracy of +/-20ppm with the parabolic temperature versus frequency curvetypical of these types of crystals. The MSP430 feeds this same signal to the 68332 PLL for system clockgeneration.Low-level software in the 68332 maintains communications with the MSP430. While the 68332 is on itmaintains its own internal clock which is synchronized with the MP430. When power is removed the MSP430maintains time and continues to run from the lithium battery (this assumes you are using a Recipe Card).When power is re-applied, the 68332 restarts and synchronizes its internal clock from the MSP430.Elapsed and Countdown TimersThe countdown and elapsed time functions provide convenient methods for measuring short intervals orwaiting for a timeout. These functions work with and return values normalized to microseconds. Time ismeasured with a fundamental unit of 40000 Hz.. Thus, the timer is internally counted as an integer numberof these ‘ticks’. One tick is approximately 25 µsecs and with a calling overhead for the functions that interactwith these counters of about 20 µsecs, the timers have an effective resolution of no less than 50 µsecs. Theelapsed and countdown timers have a maximum span of about 1.2 hours before overflowing. Below is anexample of usage:RTCTimer tmtest;...RTCElapsedTimerSetup(&tmtest);< code block being measured >printf("Elapsed time %ld us \n", RTCElapsedTime(&tmtest));RTCDelayMicroSeconds -- Delay for microsecondsDescription:Prototype:Inputs:Returns:Notes:Provides a simple means to kill a specific amount of time, specified in microseconds. Thisperforms much the same function as RTCDelayTicks but takes its argument in microseconds.The resolution of the calculation from microseconds to ticks which the real time clock canmeasure is about 25 µsecsbool RTCDelayMicroSeconds (ulong d);d is a ulong containing the number of microseconds to wait before returning.Returns a boolean that is TRUE unless the clock is stopped at the time RTCDelayMicroSecondsis called.RTCDelayMicroSeconds behavior in the event that the RTC is stopped is dependent on the actionspecified by RTCEnableErrTrap. Normally, it will simply return FALSE if the clock is stopped but iferror trapping is enabled by RTCEnableErrTrap then the machine will crash and print debuginformation. Because internally the real time clock can only measure time in units of ticks, thecountdown is counted in an integer number of ticks. Because one tick is approximately 25 µsecsand the calling overhead of the functions that interact with the clock is around 20 µsecs, delaysof less than 55 µsecs are meaningless and that RTCDelayMicroSeconds has an effectiveresolution of 55 µsecs.PERSISTORInstruments Inc.49 of 84CF2 API Reference7/19/2005
- Page 1 and 2: PERSISTOR ® CF2API ReferenceCopyri
- Page 3 and 4: CF2 API ReferenceATA Device Drivers
- Page 5 and 6: CF2 API ReferenceBigIDEA IDE Driver
- Page 7 and 8: CF2 API ReferenceBIOSVersionCheck -
- Page 9 and 10: CF2 API ReferenceCheckSum32 -- Upda
- Page 11 and 12: CF2 API ReferenceChip Select Wrappe
- Page 13 and 14: CF2 API ReferenceCompactFlash Low L
- Page 15 and 16: CF2 API ReferenceBelow are macros d
- Page 17 and 18: CF2 API ReferenceCIOprintf - Simple
- Page 19 and 20: CF2 API Referenceuprintf -- A clone
- Page 21 and 22: CF2 API ReferenceDIRMatchName -- Re
- Page 23 and 24: CF2 API ReferenceLED Signal Functio
- Page 25 and 26: CF2 API ReferencePeriodic Interrupt
- Page 27 and 28: CF2 API ReferencePicoDOS Initializa
- Page 29 and 30: CF2 API ReferencePin I/O Drivers, F
- Page 31 and 32: CF2 API ReferencePinIO -- Make an I
- Page 33 and 34: CF2 API ReferencePIOClear -- Config
- Page 35 and 36: CF2 API ReferencePing-Pong Buffer F
- Page 37 and 38: CF2 API ReferencePPBPutWord -- Writ
- Page 39 and 40: CF2 API ReferenceQSMRun - Start the
- Page 41 and 42: CF2 API ReferenceQuery/Reply Functi
- Page 43 and 44: CF2 API ReferenceQRdouble -- Query/
- Page 45 and 46: CF2 API ReferenceQueued PicoBUS (QS
- Page 47: CF2 API ReferenceQPBSetup -- Set up
- Page 51 and 52: CF2 API ReferenceRTCtime -- ANSI st
- Page 53 and 54: CF2 API ReferenceSTDIO WarningThe A
- Page 55 and 56: CF2 API ReferenceSCIRxFlush -- Dele
- Page 57 and 58: CF2 API ReferenceSCIRxTxIdle -- Ret
- Page 59 and 60: CF2 API ReferenceSCITxWaitCompletio
- Page 61 and 62: CF2 API ReferenceTable Driven Comma
- Page 63 and 64: CF2 API ReferenceCmdIsNumber- Is Co
- Page 65 and 66: CF2 API ReferenceTime Processing Un
- Page 67 and 68: CF2 API ReferencePrototype:Inputs:N
- Page 69 and 70: CF2 API ReferenceTPU UartSummary of
- Page 71 and 72: CF2 API ReferenceTUOpen - Open a TP
- Page 73 and 74: CF2 API ReferenceTUTxFlush - Delete
- Page 75 and 76: CF2 API ReferenceUtility Functionse
- Page 77 and 78: CF2 API Referencesscantime -- scan
- Page 79 and 80: CF2 API ReferenceVEEDelete -- Delet
- Page 81 and 82: CF2 API ReferenceVEEStoreFloat -- S
- Page 83 and 84: CF2 API ReferencePinBus, 30PinClear
<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>QPBUnlockSlot -- Unlock PicoBus for unrestricted use.Description:Prototype:Inputs:Returns:Notes:This function allows you to unlock the PicoBus after it has been locked by a specific slot.bool QPBUnlockSlot (QPB *qpb);qpb is a pointer to the slot structure that owns the current lockReturns TRUE if the bus was successfully unlocked or FALSE if it was unable to unlock or thegiven QPB structure was not the owner of the lock..See QPBLockSlot for more information. It is necessary to lock the bus when performingasynchronous reads using QPBRepeatAsynch.PERSISTOR<strong>Instruments</strong> <strong>Inc</strong>.48 of 84<strong>CF2</strong> <strong>API</strong> <strong>Reference</strong>7/19/2005