Skip to content

Commit 7535fb7

Browse files
mcudevprusnak
authored andcommitted
fix minor compile time bug and update docs
1 parent d72f026 commit 7535fb7

File tree

3 files changed

+27
-25
lines changed

3 files changed

+27
-25
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ cd trezor-core
2828
sudo dpkg --add-architecture i386
2929
sudo apt-get update
3030
sudo apt-get install scons libsdl2-dev:i386 libsdl2-image-dev:i386 gcc-multilib
31+
pip install ed25519 pyblake2
3132
make build_unix
3233
```
3334

docs/hardware.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,9 @@ TODO
1919

2020
## Developer Kit
2121

22-
* 1 x [Waveshare Core405R Dev Board](http://www.waveshare.com/core405r.htm)
22+
* 1 x [STM32F407G-DISC1](http://www.st.com/en/evaluation-tools/stm32f4discovery.html)
2323
* 1 x USB Cable Type A Plug/Male to Type Mini-B Plug/Male
24-
* 1 x ST-LINK V2 STM32 USB Debug Adapter
25-
* Female to female jumper wires with 0.1" header contacts
24+
* 1 x USB Cable Type A Plug/Male to Type Micro-B Plug/Male
2625
* 1 x Display
2726
* 1 x Capacitive Touch Panel / Sensor
2827
* 1 x microSD Socket
@@ -38,27 +37,27 @@ TODO
3837

3938
##### Pinout
4039

41-
|Description|MCU Pin|
42-
|-----------|-------|
43-
|LCD_RST|PC14|
44-
|LCD_FMARK|PD12 [TODO: what is this for?]|
45-
|LCD_PWM|PB13 [TODO: what is this for?]|
46-
|LCD_CS|PD7|
47-
|LCD_RS|PD11|
48-
|LCD_RD|PD4|
49-
|LCD_WR|PD5|
50-
|LCD_D0|PD14|
51-
|LCD_D1|PD15|
52-
|LCD_D2|PD0|
53-
|LCD_D3|PD1|
54-
|LCD_D4|PE7|
55-
|LCD_D5|PE8|
56-
|LCD_D6|PE9|
57-
|LCD_D7|PE10|
40+
|Description|MCU Pin|Notes|
41+
|-----------|-------|-----|
42+
|LCD_RST|PC14||
43+
|LCD_FMARK|PD12|tearing effect input|
44+
|LCD_PWM|PB13|backlight control (brightness)|
45+
|LCD_CS|PD7||
46+
|LCD_RS|PD11|register select aka command/data|
47+
|LCD_RD|PD4||
48+
|LCD_WR|PD5||
49+
|LCD_D0|PD14||
50+
|LCD_D1|PD15||
51+
|LCD_D2|PD0||
52+
|LCD_D3|PD1||
53+
|LCD_D4|PE7||
54+
|LCD_D5|PE8||
55+
|LCD_D6|PE9||
56+
|LCD_D7|PE10||
5857

5958
#### Capacitive Touch Panel / Sensor
6059
* Bus/Interface: I2C
61-
* Driver IC: FT6206 [TODO: does this matter]
60+
* Driver IC: FT6206 [TODO: does this matter?]
6261
* single touch
6362

6463
##### Pinout
@@ -97,6 +96,7 @@ TODO
9796

9897
#### Dev Board
9998
* [Schematic](http://www.waveshare.com/w/upload/0/05/CorexxxR-Schematic.pdf)
100-
* [STM32F405RGT6](http://www.st.com/en/microcontrollers/stm32f405rg.html)
99+
* [STM32F407VGT6](http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f4-series/stm32f407-417/stm32f407vg.html)
101100
* HSE / High-Speed External Crystal: 8 MHz
101+
* Integrated STMicroelectronics ST-LINK/V2.1 debugger
102102

embed/extmod/modtrezorui/display-stm32.h

+4-3
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ int display_init(void) {
134134
HAL_GPIO_Init(GPIOC, &GPIO_InitStructure);
135135
HAL_GPIO_WritePin(GPIOC, GPIO_PIN_14, GPIO_PIN_SET);
136136

137-
// LCD_FMARK/PD12
137+
// LCD_FMARK/PD12 (tearing effect)
138138
GPIO_InitStructure.Pin = GPIO_PIN_12;
139139
GPIO_InitStructure.Mode = GPIO_MODE_INPUT;
140140
GPIO_InitStructure.Pull = GPIO_NOPULL;
141141
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
142142
HAL_GPIO_Init(GPIOD, &GPIO_InitStructure);
143143

144-
// LCD_PWM/PB13
144+
// LCD_PWM/PB13 (backlight control)
145145
GPIO_InitStructure.Mode = GPIO_MODE_AF_PP;
146146
GPIO_InitStructure.Pull = GPIO_NOPULL;
147147
GPIO_InitStructure.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
@@ -224,7 +224,7 @@ int display_init(void) {
224224
CMD(0x01); // software reset
225225
HAL_Delay(20);
226226
CMD(0x28); // display off
227-
CMD(0xCF); DATA(0x00); DATA(0xC1); DATA(0x30;
227+
CMD(0xCF); DATA(0x00); DATA(0xC1); DATA(0x30);
228228
CMD(0xED); DATA(0x64); DATA(0x03); DATA(0x12); DATA(0x81);
229229
CMD(0xE8); DATA(0x85); DATA(0x10); DATA(0x7A);
230230
CMD(0xCB); DATA(0x39); DATA(0x2C); DATA(0x00); DATA(0x34); DATA(0x02);
@@ -288,6 +288,7 @@ static void display_set_window(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y
288288
}
289289

290290
void display_refresh(void) {
291+
// synchronize with the panel synchronization signal in order to avoid visual tearing effects
291292
while (GPIO_PIN_RESET == HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_12)) { }
292293
while (GPIO_PIN_SET == HAL_GPIO_ReadPin(GPIOD, GPIO_PIN_12)) { }
293294
}

0 commit comments

Comments
 (0)