Setting flash option bytes in c – Zilog ZUSBOPTS User Manual
Page 196

Language Extensions
UM017105-0511
168
Zilog Developer Studio II – ZNEO™
User Manual
FIXED,
VERIFIED,
CLOSED
} short status;
void main(void)
{
if (color == RED)
status = FIXED;
else
status = OPEN;
}
Setting Flash Option Bytes in C
The ZNEO CPU provides up to four Flash option bytes to configure the device. These
Flash option bytes can be set in C, using the following syntax:
#include
FLASH_OPTION0 = val;
FLASH_OPTION1 = val;
FLASH_OPTION2 = val;
FLASH_OPTION3 = val;
where:
•
FLASH_OPTION0 is the Flash option byte at address 0
•
FLASH_OPTION1 is the Flash option byte at address 1
•
FLASH_OPTION2 is the Flash option byte at address 2
•
FLASH_OPTION3 is the Flash option byte at address 3
For example:
#include
FLASH_OPTION0 = 0xFF;
FLASH_OPTION1 = 0xFF;
FLASH_OPTION2 = 0xFF;
FLASH_OPTION3 = 0xFF;
void main (void)
{
}
This example sets the Flash option bytes at address 0, 1, 2, and 3 as
0xFF
. The Flash
option bytes can be written only once in a program. They are set at load time. When you
set these bytes, you must make sure that the settings match the actual hardware. For more
information, see the product specification specific to your device.