TOOTHPIC RF Solutions, TOOTHPIC Datasheet - Page 103

MODULE, BLUETOOTH, DATA ACQUISITION

TOOTHPIC

Manufacturer Part Number
TOOTHPIC
Description
MODULE, BLUETOOTH, DATA ACQUISITION
Manufacturer
RF Solutions
Datasheet

Specifications of TOOTHPIC

Svhc
No SVHC (15-Dec-2010)
Note that the clock time is not changed if initialization is due to a software reset, so the module can use the
software reset to return to a known state without the real time clock being re-initialized.
If the button was pressed at power-up, ToothPIC will enter wireless field programming mode. If not, control
then passes to c018itp.c, which initializes C static variables and reinitializes the stack.
c018itp.c passes control to the developer function main().
Interrupts
Interrupt Management
High and low priority interrupts are provided on the PIC18LF6720. In ToothPIC, the high priority interrupt is
preserved for urgent, extremely quick tasks such as taking a byte received from a UART and placing it in a
buffer. This must be done quickly because another byte may be received soon after. You should do nothing
in a high priority interrupt which takes much time because other high priority interrupts will have to wait until
your task is complete. The BlueMatik UART (USART1) operates at 115kBaud and so no high priority task
should task more than around 80µs (400 instruction cycles).
Low priority interrupts are for tasks which must be completed before the main program can continue. They
may take as long as they like, however, because a high priority interrupt event will still be handled immediately.
CAUTION: MPLAB permits low priority interrupt processing to be ‘nested’ by clearing the GIEF interrupt flag
or by using the macro EnableLowInts from within an interrupt. However, this is not permitted with ToothPIC
Services as the interrupts generated by ToothPIC services are not expecting it. Therefore, to protect critical
code from being interrupted, you should only re-enable low priority interrupts if they were previously enabled,
e.g.
Interrupt Handlers
You must provide the following two interrupt handling functions:
They will be called if an interrupt occurs which does not concern the ToothPIC operating system.
The following registers will be saved while servicing a high priority interrupt:
ErrorStatus may be called from the High Priority interrupt.
ErrorStatus may be unpredictable if ErrorStatus or any of the functions it calls uses static variables.
The following registers will be saved while servicing a low priority interrupt:
MATH_DATA, .tmp_data, TBLPTR, TABLAT
and is set to 20 bytes. If the compiler requires more .tmp_data space it is usually due to complicated
expressions. These can be broken down to a series of smaller ones.
Page 103
• Serial port service is registered in BlueMatik Service Discovery Database.
• Semaphore BKSF_BMTEXISTS is set.
unsigned char LIS = LowIntState;
DisableLowInts;
if (LIS) EnableLowInts;
void LowInterrupt( void )
void HighInterrupt( void )
9-Apr-06
--- your critical code ---
Toothpick 3.0.00007
DS380-8
. The size of .tmp_data is fixed at ToothPIC Services compile time
© FlexiPanel Ltd
Patents apply and/or pending
The effect of returning from a call to
WREG
,
WREG
STATUS
,
www.FlexiPanel.com
STATUS
,
BSR
,
Finally,
,
PROD,
BSR
.

Related parts for TOOTHPIC