User's Manual
Datalogic Scanning, Inc
959 Terry Street
Eugene, Oregon 97402
Page 64 10/23/2009
Revision X2
Bits 0 to 7 of this uint16 pskey map to PIO0 to PIO7 respectively. If a bit of the pskey's value is set high
then application code cannot change the value of the corresponding PIO port pin.
NOTE: On the current Casira motherboard, PIO2 is connected to USB+ via a 1k5 resistor. The USB+ pin
doubles as the UART RTS line on BlueCore, so care must be taken if an application uses PIO2.
Key Name Key Number Type Default Setting
PSKEY_PMALLOC_SIZES 0x0203 uint16[]
The pmalloc pool memory manager is used throughout the firmware. The way in which its raw RAM block
is fragmented is specified by this pskey. The value is an array of pairs of uint16s: {uint16 el_size, uint16
n_elements}. Each pair describes a pool containing n_elements each of size el_size. The array must be
terminated with {0, 0}.
The total number of pools must not exceed MAX_POOLS, defined in pmalloc.h. (At the time of writing
this comment the value is 20.)
The size of the raw RAM block is TOTAL_POOL_SIZE uint16s, defined in xpmalloc.c, so this depends on
the firmware build. How this is carved up is a complex issue - the bulk of the block will normally be
fragmented according to the value of this pskey, but the start of the block is used to hold pool management
information - pool control blocks. The size of this management information depends on the number of
pools and whether pmalloc debugging information is being maintained - at the time of writing this
comment it takes 7 uint16s per pool. This may typically take 10% of the total, so very crudely,
sum(el_size*n_elements) <= (0.9 * TOTAL_POOL_SIZE).
If the definition of how the memory should be used exceeds the capacity of TOTAL_POOL_SIZE then the
allocation is simply truncated. Typically the last pool in the array ends up with fewer elements than
requested. The array does not have to be in size order, so it may make sense for the last element in the list
to define a pool whose size may be flexible. Also the memory is most efficiently used if this last pool has a
small el_size.
The pskey's default value is taken from C #include file ps_pools.h. The include file is derived from file
pools.cfg during compilation.
Key Name Key Number Type Default Setting
PSKEY_UART_BAUD_RATE 0x0204 uint16 none
The UART's (initial) Baud rate in builds before HCI 18.X. (This PS key's name is similar to
PSKEY_UART_BAUDRATE
, used in builds from HCI 18.X.)
Set the chip's UART baud rate at boot time to:
baud_rate = ps_value/0.004096
Some common baud_rate values:
38k4 baud - 157 (0x009d)
115k2 baud - 472 (0x01d8)
A BCCMD command allows the baud rate to be changed instantly but this presents the problem that if the
command succeeds then notification of the command's behaviour will be sent at the new rate, and if it fails