2008-01-25 00:23:49 +01:00
|
|
|
/****************************************************************************
|
2021-03-08 22:39:04 +01:00
|
|
|
* boards/z16/z16f/z16f2800100zcog/include/board.h
|
2008-01-08 00:19:24 +01:00
|
|
|
*
|
2021-03-16 16:20:49 +01:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2008-01-08 00:19:24 +01:00
|
|
|
*
|
2021-03-16 16:20:49 +01:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2008-01-08 00:19:24 +01:00
|
|
|
*
|
2021-03-16 16:20:49 +01:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2008-01-08 00:19:24 +01:00
|
|
|
*
|
2008-01-25 00:23:49 +01:00
|
|
|
****************************************************************************/
|
2008-01-08 00:19:24 +01:00
|
|
|
|
2019-08-09 15:22:39 +02:00
|
|
|
#ifndef __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H
|
|
|
|
#define __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H
|
2008-01-08 00:19:24 +01:00
|
|
|
|
2008-01-25 00:23:49 +01:00
|
|
|
/****************************************************************************
|
2008-01-08 00:19:24 +01:00
|
|
|
* Included Files
|
2008-01-25 00:23:49 +01:00
|
|
|
****************************************************************************/
|
2008-01-08 00:19:24 +01:00
|
|
|
|
2008-01-25 00:23:49 +01:00
|
|
|
/****************************************************************************
|
2015-04-08 17:15:17 +02:00
|
|
|
* Pre-processor Definitions
|
2008-01-25 00:23:49 +01:00
|
|
|
****************************************************************************/
|
2021-03-16 21:39:13 +01:00
|
|
|
|
2014-09-05 15:59:31 +02:00
|
|
|
/* The Z16F2800100ZCOG board has a 20MHz crystal. The ZNEO clocking will be
|
|
|
|
* configured to use this crystal frequency directly as the clock source
|
2014-01-22 20:46:42 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define BOARD_XTAL_FREQUENCY 20000000 /* 20MHz */
|
|
|
|
#define BOARD_CLKSRC 1 /* Clock source = external crystal */
|
|
|
|
#define BOARD_SYSTEM_FREQUENCY BOARD_XTAL_FREQUENCY
|
|
|
|
|
2014-01-23 19:06:57 +01:00
|
|
|
/* Flash option bits
|
|
|
|
*
|
|
|
|
* "Each time the option bits are programmed or erased, the device must be
|
|
|
|
* Reset for the change to take place. During any reset operation .., the
|
|
|
|
* option bits are automatically read from the Program memory and written
|
|
|
|
* to Option Configuration registers. ... Option Bit Control Register are
|
|
|
|
* loaded before the device exits Reset and the ZNEO CPU begins code
|
|
|
|
* execution. The Option Configuration registers are not part of the
|
|
|
|
* Register file and are not accessible for read or write access."
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
# define BOARD_FLOPTION0 (Z16F_FLOPTION0_MAXPWR | Z16F_FLOPTION0_WDTRES | \
|
|
|
|
Z16F_FLOPTION0_WDTA0 | Z16F_FLOPTION0_VBOA0 | \
|
|
|
|
Z16F_FLOPTION0_DBGUART | Z16F_FLOPTION0_FWP | \
|
|
|
|
Z16F_FLOPTION0_RP)
|
|
|
|
|
|
|
|
# define BOARD_FLOPTION1 (Z16F_FLOPTION1_RESVD | Z16F_FLOPTION1_MCEN | \
|
|
|
|
Z16F_FLOPTION1_OFFH | Z16F_FLOPTION1_OFFL)
|
|
|
|
|
|
|
|
# define BOARD_FLOPTION2 Z16F_FLOPTION2_RESVD
|
|
|
|
|
|
|
|
# define BOARD_FLOPTION3 (Z16F_FLOPTION3_RESVD | Z16F_FLOPTION3_NORMAL | \
|
|
|
|
Z16F_FLOPTION3_ROMLESS)
|
|
|
|
|
|
|
|
/* The same settings, pre-digested for assembly language */
|
|
|
|
|
|
|
|
#else
|
|
|
|
# define BOARD_FLOPTION0 %ff
|
|
|
|
# define BOARD_FLOPTION1 %ff
|
|
|
|
# define BOARD_FLOPTION2 %ff
|
|
|
|
# define BOARD_FLOPTION3 %ff
|
|
|
|
#endif
|
2008-01-08 00:19:24 +01:00
|
|
|
|
2008-01-25 00:23:49 +01:00
|
|
|
/* LED pattern definitions
|
|
|
|
*
|
|
|
|
* The z16f2800100zcog board has four LEDs:
|
|
|
|
*
|
|
|
|
* - Green LED D1 which illuminates in the presence of Vcc
|
|
|
|
* - Red LED D2 connected to chip port PA0_T0IN
|
|
|
|
* - Yellow LED D3 connected to chip port PA1_T0OUT
|
|
|
|
* - Green LED D4 connected to chip port PA2_DE0
|
|
|
|
*/
|
|
|
|
|
2014-01-23 19:06:57 +01:00
|
|
|
#define LED_STARTED 0
|
|
|
|
#define LED_HEAPALLOCATE 1
|
|
|
|
#define LED_IRQSENABLED 2
|
|
|
|
#define LED_STACKCREATED 3
|
|
|
|
#define LED_IDLE 4
|
|
|
|
#define LED_INIRQ 5
|
|
|
|
#define LED_SIGNAL 6
|
|
|
|
#define LED_ASSERTION 7
|
|
|
|
#define LED_PANIC 8
|
2008-01-25 00:23:49 +01:00
|
|
|
|
|
|
|
/****************************************************************************
|
2021-03-16 21:39:13 +01:00
|
|
|
* Public Functions Definitions
|
2008-01-25 00:23:49 +01:00
|
|
|
****************************************************************************/
|
|
|
|
|
2008-01-08 00:19:24 +01:00
|
|
|
#undef EXTERN
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
#define EXTERN extern "C"
|
2019-08-09 15:22:39 +02:00
|
|
|
extern "C"
|
|
|
|
{
|
2008-01-08 00:19:24 +01:00
|
|
|
#else
|
|
|
|
#define EXTERN extern
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef EXTERN
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2020-01-31 19:07:39 +01:00
|
|
|
#endif /* __BOARDS_Z16_Z16F2811_Z16F2800100ZCOG_INCLUDE_BOARD_H */
|