TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 114
TOOTHPIC
Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet
1.TOOTHPIC.pdf
(126 pages)
Specifications of TOOTHPIC
Svhc
No SVHC (15-Dec-2010)
- Current page: 114 of 126
- Download datasheet (2Mb)
Semaphores
Only one high-priority and one low-priority interrupt can be serviced at a time. If you try to do something from
within an interrupt service routine which relies on an interrupt of the same or lower level being responded to,
the processor will hang because the second interrupt call will never be serviced.
Callbacks generally occur from within a low priority interrupt, and this is where you are most likely to
encounter this problem. You can’t do anything inside a callback function which relies on low priority interrupts
being responded to. This includes functions such as AwaitBMTOK, which require interpretation of incoming
serial data from BlueMatik. It does not include most BMTCommands and FxPCommands which transmit data
only. (The exception is BMTReset, which cannot be called from within a callback.)
The solution is to use Semaphores. A semaphore is a global variable which you set inside the interrupt
service routine before promptly returning from interrupt. From inside your main code, inspect the semaphore
value frequently and respond appropriately when it is set.
In addition to your own semaphores, ToothPIC OS provides certain semaphores which it uses to
communicate the current state of the ToothPIC OS. You may inspect these logical values but you should not
modify them except by calling ClearSemaphores in when initializing BlueMatik. The semaphores and
macros are defined in ToothPIC.h.
The following example puts BlueMatik into slave mode when two semaphores are raised: the
BlueMatikInitOK ToothPIC semaphore and a developer-defined StartSlave semaphore which is raised
on initialization and whenever a master disconnects.
Bool StartSlave = True;
void main( void )
{
Page 114
while ( 1 )
{
ResetOrWakeEventWasStackOverflow
ResetOrWakeEventWasStackUnderflow
ResetOrWakeEventWasSoftwareReset
ResetOrWakeEventWasInterrtuptOrNMCLRDuringSleep
ResetOrWakeEventWasWDTReset
ResetOrWakeEventWasWDTWakeup
ResetOrWakeEventWasBrownOut
if (BlueMatikInitOK && StartSlave)
{
9-Apr-06
Semaphore / Macro
BlueMatikExists
ProcessingATCommand
AwaitInitOK
AwaitBMTOK
IsConnected
InFxPMode
FxPDeviceConnected
IsFxPInitialized
BMTCommand( BMTC_Slave, 0, 0 );
AwaitConnect(0);
Toothpick 3.0.00007
DS380-8
Function
BlueMatik module is attached and has completed initialization.
BlueMatik is still processing an AT function
Waits until BlueMatikInitOK is set
Waits until ProcessingATCommand is clear
Raised while remote device is connected to BlueMatik
Raised while FlexiPanel user interface service is operating
Raised while FlexiPanel compatible is connected
Raised once FlexiPanel control data has been initialized and
is valid
© FlexiPanel Ltd
Patents apply and/or pending
// Semaphore
// Test semaphores
// Go into slave mode
www.FlexiPanel.com
Related parts for TOOTHPIC
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
RF Switch SPDT 0MHz to 2GHz 27dB 8-Pin SOIC T/R
Manufacturer:
M/A-Com Technology Solutions
Datasheet:
Part Number:
Description:
RF Switch SPST 500MHz to 2GHz 40dB 8-Pin SOIC T/R
Manufacturer:
M/A-Com Technology Solutions
Datasheet:
Part Number:
Description:
RF Switch SPDT 100MHz to 4GHz 14dB 6-Pin SOT-6
Manufacturer:
Skyworks Solutions Inc
Datasheet:
Part Number:
Description:
RF Switch SPST 500MHz to 2.5GHz 10dB 6-Pin SOT-6
Manufacturer:
Skyworks Solutions Inc
Part Number:
Description:
IC ENCODER TRANSMITTER RF 8DIP
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
IC DECODER RECEIVER RF 18DIP
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
IC ENCODER 3 DGTL I/O SOT23-6
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
IC ENCODER 3 DGTL I/O 8-PDIP
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
IC DECODER 3 DGTL I/O 8-PDIP
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
IC DECODER 3 DGTL I/O 8-SOIC
Manufacturer:
RF Solutions
Datasheet:
Part Number:
Description:
118 SERIES AM REMOTE CONTROL SYSTEMS.
Manufacturer:
RF Solutions Ltd.