Configuration settings for the weAut_01 automation module.
This file contains some platform specific definitions concerning software and hardware configuration. These settings influence the compilation and build process. Most of those settings can't be changed later at runtime.
Platform: weAut_01 (weAut_00); CPU: ATmega1284p;
Hardware specifica and settings:
Port A: DI or AI channels
Port B B0 in enter key in pullup 1 B1 in RTS in / counter in / free port JP9 (default in) 1 B2 out LED gn (0 = on) 0 B3 in comparator LV (Lastspannung) 0 B4 out LED rd (1 = on) 1 B7,6,5 SPI1-Master: B7clk, B5mosi must be set as output 101 Port B out 2 4 (LEDs) 5 7 SPI init SPI 1 : used for DI_LEDS and DO Enable SPI, Master, Int (SPR1,0=00 : clock /4) SPI 1 runs with 1/2 CPU clock, ie. 10MHz, needing 16 clocks for one byte
Port C: C2, C3, C6: /CS=Clk : out 1; C5 : DO enab : out 0; 0: DO disable (LED red) C7 : ether /CS : out 1; ether /reset (out 0) on weAut_00 C4 : DO OK : in 1 pullup C01 : Testpin 12 : 1 pullup
Port D: D7 NIC interrupt : in pullup D6 CTS generator : out (default) D5 free port on weAut_01 respectively SMC insertion switch D4 3 2 SPI 2 MOSI MISO Clk : 4&3 out D1 0 UART 0 TX RX : 1 out
This file is part of weAutSys <weinert-automation.de>
It is also used for the serial bootloader.
Copyright © 2014 Albrecht Weinert, Bochum
Defines | |
#define | ALLOW_UART_GREET_BOOTLOADER_BY_CLI 1 |
Report bootloader entrance by CLI on UART. | |
#define | BASIC_INIT() |
Port initialisation. | |
#define | BUZZER_PIN 1 |
Pin for buzzer (if any) | |
#define | BUZZER_PORT C |
Port for buzzer (if any) | |
#define | GN_LED_PIN 2 |
Pin for green Status LED. | |
#define | GN_LED_PORT B |
Port for green Status LED. | |
#define | HAVE_ETHERNET 1 |
Ethernet available. | |
#define | HAVE_MODBUS 1 |
Modbus on Ethernet available. | |
#define | HAVE_NIC 2 |
Network interface chip. | |
#define | HAVE_SMC 2 |
Small memory card via SPI. | |
#define | PROG_HW_VER |
The programmerHWver. | |
#define | RD_LED_PIN 4 |
Pin for red Status LED. | |
#define | RD_LED_PORT B |
Port for red Status LED. | |
#define | SMC_INS_POLL |
SMC insert check by software thread. | |
#define | SMC_INSERT 0xD5 |
SMC insert switch; 0: no switch. | |
#define | TIMEOUT_LIGHTSHOW |
Time out HMI display. | |
#define | UART0MAY_CTS 1 |
UART0 may signal ability to receive by CTS. | |
#define | UART0MAY_RTS 1 |
UART0 may use RTS to hold back sending. | |
#define | UART0SPIYKY 0 |
UART0 has spiky USB2serial: filter FE,FF. | |
#define | USART_IN_APP_WITH_INT |
UART uses interrupt in application. | |
#define | USE_BOOTLOADER_PRESET |
Have and use a bootloader. | |
#define | USE_SPI2 1 |
Use SPI2 for NIC and SMC. |
#define ALLOW_UART_GREET_BOOTLOADER_BY_CLI 1 |
Report bootloader entrance by CLI on UART.
Setting this to 1 we assume the UART on this platform being used for textual human interaction including command line interpreter (CLI).
#define SMC_INS_POLL |
SMC insert check by software thread.
If evaluated to non zero the SMC thread checks the card insertion by software at otherwise idle times about every 100 ms. This is not necessary if a hardware insert switch is available and properly configured.
The insert test by software is not recommended if every SMC command is logged by DEBUG_SMC > 1.
#define BASIC_INIT | ( | ) |
Port initialisation.
This macro does the basic port initialisation according to the platform's standard port usage. Anyway it has to cover the serial bootloader.
#define USE_BOOTLOADER_PRESET |
Have and use a bootloader.
This value determines the existence and usage of a bootloader:
0: no bootloader or at least no bootloader integration 1: bootloader area used / bootloader existing 2: bootloader fully integrated: application programme may use all No Read-While-Write (NRWW) flash section functions and constants.
Fully integrated (2) means that all µController resets go through the bootloader. And the bootloader will not enter the program (=x00000) without having done all basic initialisations, that hence can be omitted from system/application software. Full integration also means that the bootloader may be entered by (CLI) command.