annotate wiki/Hardware Ressources.md @ 60:96026ba1834f

more language updates
author heinrichsweikamp
date Fri, 10 Aug 2018 19:40:55 +0200
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 # OSTC4 Resources #
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 ## Hardware ##
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 There are two processors in the OSTC4:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * an [STM32F427IIT6](http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32-high-performance-mcus/stm32f4-series/stm32f427-437/stm32f427ii.html) as main processor. It is a Cortex-M4 processor with FPU, running at 180 MHz.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 It crunches most of the decompression code, the graphic display operations and the user interface.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 * an [STM32F411RET6](http://www.st.com/en/microcontrollers/stm32f411re.html) as the RTE (Real-Time-Environment) processor.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 This is another processor of the ARM Cortex M4 family, but with extremely low power modes and plenty of communication ports.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 It runs real-time gas exchange simulation during dive, and interface to most peripherals.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 Various peripherals are connected to them:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 - A 800x480 pixels _LCD_ screen, with a live stream of color pixels send by an auto-refresh SDRAM.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 - A pressure sensor.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 - A magnetic compass.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 - An ambient light sensor.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 - Three buttons.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 - A battery, and a battery gauge.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 _OSTC4_ programming is based on the _HAL_ (for _Hardware Abstraction Layer_) provided by _ST_.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 This allows to have a more readable C code, and to evolve more easily to another processors of the same familly.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 ## Drivers Used by the Main CPU - aka CPU1-Discovery ##
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 The main _ARM-Cortex 4_ CPU uses the following resources provided by the
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 _HAL_ (_Hardware Abstraction Layer_)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 provided by the processors makers _ST_ to ease code developement, security and portability:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 - **HAL_DMA** _Direct Memory Accelerator_: automated memory transfers, used to manage SPI reception and transmission channels.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 - **HAL_DMA2D** : a _specialized DMA dedicated to images manipulation_, used by `gfx_engine`to clear screens.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 - **HAL_FMC** _Flexible Memory Controller_ to drice the external SDRAM used for display.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 - **HAL_GPIO** _General Purpose Input/Output_: this is the programmable pins of the chip, used to connect nearly evrything.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 - **HAL_LTDC** _LCD TFT Display Controller_: to transfer images to the screen memory ?
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37 - **HAL_NVIC** _Nested Vector Interrupt Controller_: CORTEX IRQs used in `base.c` to handle buttons interrupts, in `gfx_engine.c` to manage VSYNC (screen's vertical sync) and in `stm32f4xx_hal_msp_hw2.c` to manage all other interrupts (ticks, DMA, DMA2D, TIM and USART).
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 - **HAL_RCC** _Reset and Clock Control_: used in `base.c` to setup system, PLL and screen clocks.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 - **HAL_SDRAM** RAM controller used in `stm32f4xx_hal_msp_hw2.c` and in `base.c` to interface the external memory used by the screen.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 - **HAL_SPI** _Serial Peripheral Interface_: implement the [standard SPI protocol](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus). Used to do full duplex communication between the two CPU in `data_exchange_main.c` to exchange dive settings and state, and in `externCPU2bootloader.c` to send firmware to _CPU2-RTE_.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41 - **HAL_TIM** basic _Timers_ used in `base.c` and PWM (_Pulse Width Modulation_) used to control backlight intensity.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 - **HAL_UART** _Universal Asynchronous Receiver Transmitter_: serial communications used in `bonnexConnect.c`, `ostc.c`, `stm32f4xx_hal_msp_hw2.c`, `tCCR.c`, `tCpmm.c` and `tDebug.c`
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 ## Drivers Used by the Secondary CPU - aka CPU2-RTE ##
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 - **HAL_ADC** _Analog to Digital Converter_ channel 1 is used in `adc.c` for the ambient light sensor.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 - **HAL_DMA** _Direct Memory Accelerator_: automated memory transfers, used to manage SPI reception and transmission channels when communicating to main CPU.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48 - **HAL_FLASH** allow erasing, programming, and managing read/write protection mechanisms of the internal FLASH memory.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 - **HAL_GPIO** _General Purpose Input/Output_: this is the programmable pins of the chip, used to connect nearly evrything.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 - **HAL_I2C** _Inter-Integrated Circuit_ [bus controller](https://en.wikipedia.org/wiki/I2C) is another standard bus, used to connect the pressure sensor in `pressure.c`, the magnetic compass in `compass.c` and the battery state in `batteryGauge.c`. Initialisations are in `baseCPU2.c` and `stm32f4xx_hal_msp_v3.c`.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 - **HAL_NVIC** _Nested Vector Interrupt Controller_: CORTEX IRQs used in `baseCPU2.c` to handle clock ticks, buttons and wireless state. In `spi.c` to know end of SPI transmissions. And in `stm32f4xx_hal_msp_v3.c` to setup various _I2C_ interupts.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52 - **HAL_PWR** _Power Controller_: to manage sleep mode, low power and wakeup. And in `rtc.c` to manage FLASH power down.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 - **HAL_RCC** _Reset and Clock Control_: used in `baseCPU2.c` to setup system, PLL clocks for ...
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 - **HAL_RTC** _Real Time Clock_ to handle date and time in `scheduler.c`
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 - **HAL_SPI** _Serial Peripheral Interface_: implement the [standard protocol](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus). Used to do full duplex communication between the two CPUs. In `spi.c`, SPI1 is used to communicate to the maon CPU, and SPI3 to commicate to buttons.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 - **HAL_UART** _Universal Asynchronous Receiver Transmitter_: serial communications used in `uart.c`