Prusa MINI Firmware overview
config_a3ides2209_02.h
Go to the documentation of this file.
1 //config_a3ides2209.h - configuration file for 2209 variant (rev02)
2 #ifndef _CONFIG_A3IDES2209_02_H
3 #define _CONFIG_A3IDES2209_02_H
4 
5 //--------------------------------------
6 //DBG - debug/trace configuration
7 #define DBG_RTOS // use FreeRTOS (semaphore and osDelay instead of HAL_Delay)
8 #ifdef _DEBUG
9  #define DBG_SWO // trace to swo port
10  //#define DBG_UART 6 // trace to uart6 port
11  //#define DBG_CDC // trace to cdc port
12  #define DBG_LEVEL 1 // debug level (0..3)
13 #else
14 //#define DBG_SWO // trace to swo port
15 #endif //_DEBUG
16 
17 //--------------------------------------
18 //ADC configuration
19 //channels:
20 // log pin phy pri function
21 // 0 PA3 3 1 HW_IDENTIFY
22 // 1 PA4 4 6 THERM1 (bed)
23 // 2 PA5 5 1 THERM2
24 // 3 PA6 6 1 THERM_PINDA
25 // 4 PC0 10 9 THERM0 (nozzle)
26 //--------------------------------------
27 // bit fedc ba98 7654 3210
28 // mask 0000 0100 0111 1000 == 0x0478
29 #define ADC_CHAN_MSK 0x0478 //used physical AD channels bit mask (3,4,5,6,10)
30 #define ADC_CHAN_CNT 5 //number of used channels
31 #define ADC_OVRSAMPL 4 //oversampling multiplier (common for all channels)
32 #define ADC_SEQ_LEN 18 //sampling sequence length
33 #define ADC_SEQ2IDX adc_seq2idx //callback function (convert seq to channel index)
34 #define ADC_READY adc_ready //callback function (value for any channel is ready)
35 #define ADC_VREF 5010 //reference voltage [mV]
36 //simulated values
37 #define ADC_SIM_VAL0 512 * 4 //HW_IDENTIFY
38 #define ADC_SIM_VAL1 966 * 4 //THERM1 (bed) means 30C
39 #define ADC_SIM_VAL2 512 * 4 //THERM2
40 #define ADC_SIM_VAL3 512 * 4 //THERM_PINDA
41 #define ADC_SIM_VAL4 977 * 4 //THERM0 (nozzle) means 25C
42 //
43 //old seq for three channels (len = 12):
44 //012345678901
45 //220220221220
46 //
47 //new seq for five channels (len = 18):
48 //012345678901234567
49 //414140414142414143
50 
51 //--------------------------------------
52 //Graphical display ST7789v configuration
53 #define ST7789V_PIN_CS PC9 // CS signal pin
54 #define ST7789V_PIN_RS PD11 // RS signal pin
55 #define ST7789V_PIN_RST PC8 // RESET signal pin
56 
57 //--------------------------------------
58 //Jogwheel configuration
59 #define JOGWHEEL_PIN_EN1 PE15 // encoder signal 1 pin
60 #define JOGWHEEL_PIN_EN2 PE13 // encoder signal 2 pin
61 #define JOGWHEEL_PIN_ENC PE12 // button pin
62 
63 //Simulator configuration
64 //#define SIM_HEATER
65 //#define SIM_MOTION
66 
67 #ifdef SIM_HEATER
68  #define ADC_SIM_MSK 0x0012 //simulated logical AD channels bit mask (1,4)
69  #define SIM_HEATER_NOZZLE_ADC 4 //
70  #define SIM_HEATER_BED_ADC 1 //
71 #endif //SIM_HEATER
72 
73 #ifdef SIM_MOTION
74 //#define SIM_MOTION_TRACE_X
75 //#define SIM_MOTION_TRACE_Y
76 //#define SIM_MOTION_TRACE_Z
77 #endif //SIM_MOTION
78 
79 #endif //_CONFIG_A3IDES2209_02_H