Hardware configuration.
The board configuration holds all the options for configuring the bootloader and main application to run on specific hardware. The hardware configurations are maintained within subdirectories of boardcfg/. To create a new config:
Files | |
| file | app_settings.h |
| Configuration settings for the main application. | |
| file | bootloader_settings.h |
| Configuration settings for the bootloader. | |
| file | common_settings.h |
| Configuration settings by both the bootloader and the main app. | |
Board Specific Hooks | |
These hooks can be used for board specific configuration at various stages during the initialization sequence. | |
| #define | PRE_APP_INIT_HOOK Number8_PreAppHook |
| This hook is called prior to the initialization of the application modules (APP_Initialize). More... | |
Coarse Timer | |
Settings for the Coarse Timer. These are used to initialize CoarseTimer_Settings. | |
| #define | COARSE_TIMER_ID 2 |
| The timer to use for the coarse timer. | |
Transceiver | |
Settings for the Transceiver. These are used to initialize TransceiverHardwareSettings. | |
| #define | TRANSCEIVER_UART 5 |
| The USART to use for the DMX/RDM transceiver. | |
| #define | TRANSCEIVER_TIMER 3 |
| The Timer module id to use for the DMX/RDM transceiver. | |
| #define | TRANSCEIVER_IC 5 |
| The input capture module id to use for the DMX/RDM transceiver. | |
| #define | TRANSCEIVER_PORT PORT_CHANNEL_B |
| The port to use for the direction & break pins. | |
| #define | TRANSCEIVER_PORT_BIT PORTS_BIT_POS_14 |
| The bit position of the I/O pin used to create the break. | |
| #define | TRANSCEIVER_TX_ENABLE_PORT_BIT PORTS_BIT_POS_9 |
| The bit position of the TX enable pin. | |
| #define | TRANSCEIVER_RX_ENABLE_PORT_BIT PORTS_BIT_POS_10 |
| The bit position of the RX enable pin. | |
RDM Responder | |
Settings for the RDM Responder. These are used to initialize RDMResponderSettings. | |
| #define | RDM_RESPONDER_IDENTIFY_PORT PORT_CHANNEL_D |
| The port containing the RDM identify LED. | |
| #define | RDM_RESPONDER_IDENTIFY_PORT_BIT PORTS_BIT_POS_11 |
| The bit position of the RDM identify LED. | |
| #define | RDM_RESPONDER_MUTE_PORT PORT_CHANNEL_D |
| The port containing the RDM mute status LED. | |
| #define | RDM_RESPONDER_MUTE_PORT_BIT PORTS_BIT_POS_0 |
| The bit position of the RDM mute status LED. | |
| #define | RDM_RESPONDER_TEMPERATURE_SENSOR ADC_INPUT_POSITIVE_AN2 |
| The pin to use for the RDM temperature sensor. More... | |
SPI DMX | |
Settings for the SPI Pixel Controller. These are used to initialize SPIRGBConfiguration. | |
| #define | SPI_MODULE_ID SPI_ID_2 |
| The SPI module to use for output. | |
| #define | SPI_BAUD_RATE 1000000u |
| The baud rate of the SPI output. | |
| #define | SPI_USE_ENHANCED_BUFFERING true |
| Use enhanced buffering. | |
Bootloader Settings | |
| const Bootloader_LEDs | BOOTLOADER_LEDS |
| The LEDS to flash in bootloader mode. | |
| #define | APPLICATION_RESET_ADDRESS 0x9d008000 |
| The reset address of the application. | |
| #define | FLASH_PAGE_SIZE 0x1000 |
| The size of a flash page. | |
| #define | FLASH_WORD_SIZE 4 |
| The size of the words used for flash programming. | |
| #define | CFG_ALLOW_DFU_UID_UPDATES |
| Enables updating the flash based UID using DFU. | |
| #define | SWITCH_PORT_CHANNEL PORT_CHANNEL_D |
| The port channel of the switch that controls bootloader mode. | |
| #define | SWITCH_PORT_BIT PORTS_BIT_POS_2 |
| The port pin of the switch that controls bootloader mode. | |
| #define | SWITCH_ACTIVE_HIGH false |
| True if the switch is active high, false if active low. | |
USB | |
| #define | USB_POWER_CONSUMPTION 100 |
| The power consumption of the USB device. More... | |
RDM Identification | |
| #define | CFG_MANUFACTURER_ID 0x7a70 |
| The RDM manufacturer ID. | |
| #define | CFG_UID_SOURCE CFG_OPT_UID_FROM_MAC |
| The source of the device's UID. More... | |
| #define | HARDWARE_MODEL MODEL_UNDEFINED |
| The hardware model. More... | |
Developer Settings | |
| #define | CFG_NO_BOOTLOADER_OPTION |
| Controls if we use the magic bootloader symbol from the linker script. More... | |
| #define CFG_NO_BOOTLOADER_OPTION |
Controls if we use the magic bootloader symbol from the linker script.
This can be used to avoid linker errors when running without a bootloader.
| #define CFG_UID_SOURCE CFG_OPT_UID_FROM_MAC |
The source of the device's UID.
| #define HARDWARE_MODEL MODEL_UNDEFINED |
The hardware model.
| #define PRE_APP_INIT_HOOK Number8_PreAppHook |
This hook is called prior to the initialization of the application modules (APP_Initialize).
Remember that pins will default to analog if they share a function with the A/D Converter. If any of your pins share with the ADC, you'll need to change them to digital mode. This should be done using this hook.
| #define RDM_RESPONDER_TEMPERATURE_SENSOR ADC_INPUT_POSITIVE_AN2 |
The pin to use for the RDM temperature sensor.
If undefined, we use a 'dummy' sensor that generates random values.
| #define USB_POWER_CONSUMPTION 100 |
The power consumption of the USB device.
Per the USB spec, this is multiplied by 2 to give the current in mA. e.g. 50 = 100mA, 100 = 200mA