• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#include "default_device_info.hcs"
2root {
3    platform {
4        gpio_config {
5            match_attr = "gpio_config";
6            pin = [0, 1, 2, 3, 4, 5]; // pin index when register to hdf framework 0-3 spi flash gpio 4-5 uart1
7            realPin = [ 5, 5, 4, 15, 6, 7]; // pin number in stm32 led2 pe5, led3 pe6,
8            group = [  0, 1, 1, 0, 1, 1]; // group of gpio 0:GPIOA 1:GPIOB 2:GPIOC 3:GPIOD 4:GPIOE 5: GPIOF 6:GPIOG 7:GPIOH 8:GPIOI
9            mode = [  2, 2, 2 ,1, 2, 2]; // 0: input 1: output 2:alternate 3:analog
10            speed = [  3, 3, 3, 3, 3, 3]; // 0: low 1: middle 2:high 3:very_high
11            pull = [  0, 0, 0, 0, 1, 1]; // 0: nopull 1:up 2:down
12            pinNum = 6;
13            output = [ 0, 0, 0, 0, 0, 0]; // 0:pushpull 1:opendrain
14            alternate = [ 5, 5, 5, 0, 7, 7];
15        }
16        spi_config {
17			spi_config1 {
18	            match_attr = "spi_w25q_config";
19	            busNum = 0;
20	            csNum = 0;
21	            transDir = 0; // 0: TW_HAL_SPI_FULL_DUPLEX 1: TW_HAL_SPI_SIMPLEX_RX 2: TW_HAL_SPI_HALF_DUPLEX_RX 3: TW_HAL_SPI_HALF_DUPLEX_TX
22	            transMode = 1; // 1: normal 0:dma
23	            smMode = 1; // 0: slave 1: master
24	            dataWidth = 0; // 0:8bit 1:16bit
25	            clkMode = 0; // 0: cpol 0 cpha 0  1:CPOL = 1; CPHA = 0 2:CPOL = 0; CPHA = 1 3:CPOL = 1; CPHA = 1
26	            nss = 0; // 0:NSS SOFT 1: NSS HARDWARE INPUT 2: NSS HARDWARE OUTPUT
27	            baudRate = 1; // 0:div2 1:div4 2:div8 3:div16 4:div32 5:div64 6:div128 6:div256
28	            bitOrder = 0; // 0: MSB first 1: LSB first
29	            crcEnable = 0; // 0: crc disable 1: crc enable
30	            crcPoly = 10; // Min_Data = 0x00 and Max_Data = 0xFFFF
31	            spix = 0;   // 0: spi1  1: spi2  2:spi3
32	            csPin = 15;
33	            csGpiox = 0;
34	            standard = 0; // 0:motorola 1: ti
35	            dummyByte = 255;
36       	    }
37        }
38        uart_config {
39            uart1_config {
40                match_attr = "uart_config1";
41                num = 1; // 1 :usart1 2: USART2 3:USART3 4:UART4 5:UART5 6:USART6
42                baudRate = 115200; // baudrate
43                dataWidth =  0; // 0:8bit 1:9bit
44                stopBit = 1; // 0:0.5stop bits  1:1 stop bit 2:1.5 stop bits 2:2 stop bits
45                parity = 0; // 0: none 1: event 2:odd
46                transDir = 3; // 0: dir none  1: rx  2: tx 3:tx and rx
47                flowCtrl = 0; // 0: no flowcontrl  1: flowContorl RTS  2: flowControl CTS 3: flowControl RTS AND CTS
48                overSimpling = 0; // 0: overSimpling 16bits  1: overSimpling 8bits
49                transMode = 0; // 0:block 1:noblock 2:TX DMA RX NORMAL  3:TX NORMAL  RX DMA 4: USART_TRANS_TX_RX_DMA
50                uartType = 0; // 0 : 232 1: 485
51                uartDePin = 0; // usart 485 pin
52                uartDeGroup = 0; // usart 485 control line
53            }
54        }
55    }
56    misc {
57        fs_config {
58	        littlefs_config {
59	            match_attr = "littlefs_config";
60	            mount_points = ["/talkweb"];
61	            partitions = [0x800000];
62	            block_size = [4096];
63	            block_count = [256];
64	        }
65        }
66    }
67}
68
69