Skip to content

Instantly share code, notes, and snippets.

@Fxlr8
Created July 4, 2018 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Fxlr8/990b6d74f6575cb59bf20502411d3744 to your computer and use it in GitHub Desktop.
Save Fxlr8/990b6d74f6575cb59bf20502411d3744 to your computer and use it in GitHub Desktop.
// Automatically generated header file for STM32F100CB
// Generated by scripts/build_platform_config.py
#ifndef _PLATFORM_CONFIG_H
#define _PLATFORM_CONFIG_H
#define PC_BOARD_ID "STM32F100CB"
#define PC_BOARD_CHIP "STM32F100RBT6"
#define PC_BOARD_CHIP_FAMILY "STM32F1"
#include "stm32f10x.h"
#define LINKER_END_VAR _end
#define LINKER_ETEXT_VAR _etext
// SYSTICK is the counter that counts up and that we use as the real-time clock
// The smaller this is, the longer we spend in interrupts, but also the more we can sleep!
#define SYSTICK_RANGE 0x1000000 // the Maximum (it is a 24 bit counter) - on Olimexino this is about 0.6 sec
#define SYSTICKS_BEFORE_USB_DISCONNECT 2
#define DEFAULT_BUSY_PIN_INDICATOR (Pin)-1 // no indicator
#define DEFAULT_SLEEP_PIN_INDICATOR (Pin)-1 // no indicator
// When to send the message that the IO buffer is getting full
#define IOBUFFER_XOFF ((TXBUFFERMASK)*6/8)
// When to send the message that we can start receiving again
#define IOBUFFER_XON ((TXBUFFERMASK)*3/8)
// frustratingly the 103_MD (non-VL) chips in Olimexino don't have any timers other than 1-4
#define UTIL_TIMER TIM4
#define UTIL_TIMER_IRQn TIM4_IRQn
#define UTIL_TIMER_IRQHandler TIM4_IRQHandler
#define UTIL_TIMER_APB1 RCC_APB1Periph_TIM4
#define RAM_TOTAL (8*1024)
#define FLASH_TOTAL (128*1024)
#define JSVAR_CACHE_SIZE 400 // Number of JavaScript variables in RAM
#define FLASH_AVAILABLE_FOR_CODE 124928
#define FLASH_PAGE_SIZE 1024
#define FLASH_START 0x8000000
#define FLASH_SAVED_CODE_START (FLASH_START + FLASH_TOTAL - FLASH_SAVED_CODE_LENGTH)
#define FLASH_SAVED_CODE_LENGTH 6144
#define CLOCK_SPEED_MHZ 24
#define USART_COUNT 3
#define SPI_COUNT 2
#define I2C_COUNT 2
#define ADC_COUNT 3
#define DAC_COUNT 0
#define EXTI_COUNT 16
#define DEFAULT_CONSOLE_DEVICE EV_SERIAL1
#define DEFAULT_CONSOLE_TX_PIN 9/* A9 */
#define DEFAULT_CONSOLE_RX_PIN 10/* A10 */
#define IOBUFFERMASK 63 // (max 255) amount of items in event buffer - events take 5 bytes each
#define TXBUFFERMASK 31 // (max 255) amount of items in the transmit buffer - 2 bytes each
#define UTILTIMERTASK_TASKS (4) // Must be power of 2 - and max 256
#define LED1_PININDEX 13/* A13 */
#define LED1_ONSTATE 1
// definition to avoid compilation when Pin/platform config is not defined
#define IS_PIN_USED_INTERNALLY(PIN) ((false))
#define IS_PIN_A_LED(PIN) ((false)||((PIN)==13/* A13 */))
#define IS_PIN_A_BUTTON(PIN) ((false))
#endif // _PLATFORM_CONFIG_H
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment