Start Back Next End
  
ZBasic Language Reference
123
ZBasic Microcontrollers
Examples
--device-parameter=BootloaderSize,2048
--device-parameter=BootloaderSize,2K
--device-parameter=BootloaderSize,0x800
--device-parameter=BootloaderSize,&H800
Option DeviceParameter BootloaderSize 2048
Option DeviceParameter BootloaderSize "2K"
Option DeviceParameter BootloaderSize "0x800"
Option DeviceParameter BootloaderSize "&H800"
WriteWordAddress, WritePageAddress
WriteWordAddress <value>
Default: 0
WritePageAddress <value>
Default: 0
If your target device contains a bootloader other than the ZBasic bootloader and your application writes to
Program Memory, your bootloader must provide entry points for write word and write page functions and
you must specify the addresses of those entry points using these device parameters.  The C function
prototypes of the service routines must match those given below.
void writeWord(uint16_t addrLo, uint16_t dataWord);
void writePage(uint16_t addrLo, uint16_t addrHi);
On devices with less than 64K bytes of Flash memory, the second parameter of the writePage function is
omitted.  Otherwise, the second parameter is the 64K page (zero-based) to which the previously
constructed page should be written).  The source code for the ZBasic bootloader (for which source code
is provided) contains entry points which meet these requirements; they are named writeFlashWord
and writeFlashPage.
Examples
--device-parameter=WriteWordAddress,0x812
--device-parameter=WritePageAddress,&H814
Option DeviceParameter WriteWordAddress "0x812"
Option DeviceParameter WritePageAddress "&H814"
clkCtrl, psCtrl, oscCtrl, xoscCtrl, pllCtrl
clkCtrl <value>
Default: 0
psCtrl <value>
Default: 0
oscCtrl <value>
Default: ¹
xoscCtrl <value>
Default: 0
pllCtrl <value>
Default: 0
These parameters, usually required for and applicable only to xmega devices, are used to specify the
clock system initialization values written to the corresponding xmega registers as shown in the table
below.
ATxmega Register Mapping
Parameter
xmega Register
clkCtrl
CLK_CCTRL
psCtrl
CLK_PSCTRL
oscCtrl
OSC_CTRL
xoscCtrl
OSC_XOSCCTRL
pllCtrl
OSC_PLLCTRL
Details regarding the appropriate values for these parameters can be found in the Atmel Xmega
documentation.  The example values shown below are those used by the xmega-based ZX devices that
Previous page Top Next page