annotate wiki/Hardware Resources.md @ 822:dff26bf4b542

User Test
author heinrichsweikamp
date Mon, 09 Oct 2023 11:23:27 +0200
parents 0e7c16dd774d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
489
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
1 # OSTC4 Resources #
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
2
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
3 ## Hardware ##
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
4
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
5 There are two processors in the OSTC4:
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
6
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
8 It crunches most of the decompression code, the graphic display operations and the user interface.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
9
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
10 * an [STM32F411RET6](http://www.st.com/en/microcontrollers/stm32f411re.html) as the RTE (Real-Time-Environment) processor.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
12 It runs real-time gas exchange simulation during dive, and interface to most peripherals.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
13
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
14 Various peripherals are connected to them:
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
15
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
16 - A 800x480 pixels _LCD_ screen, with a live stream of color pixels send by an auto-refresh SDRAM.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
17 - A pressure sensor.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
18 - A magnetic compass.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
19 - An ambient light sensor.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
20 - Three buttons.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
21 - A battery, and a battery gauge.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
22
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
23 _OSTC4_ programming is based on the _HAL_ (for _Hardware Abstraction Layer_) provided by _ST_.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
25
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
26 ## Drivers Used by the Main CPU - aka CPU1-Discovery ##
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
27
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
28 The main _ARM-Cortex 4_ CPU uses the following resources provided by the
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
29 _HAL_ (_Hardware Abstraction Layer_)
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
30 provided by the processors makers _ST_ to ease code developement, security and portability:
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
31
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
32 - **HAL_DMA** _Direct Memory Accelerator_: automated memory transfers, used to manage SPI reception and transmission channels.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
33 - **HAL_DMA2D** : a _specialized DMA dedicated to images manipulation_, used by `gfx_engine`to clear screens.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
34 - **HAL_FMC** _Flexible Memory Controller_ to drice the external SDRAM used for display.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
35 - **HAL_GPIO** _General Purpose Input/Output_: this is the programmable pins of the chip, used to connect nearly evrything.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
36 - **HAL_LTDC** _LCD TFT Display Controller_: to transfer images to the screen memory ?
0e7c16dd774d add wiki sub-directory
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).
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
38 - **HAL_RCC** _Reset and Clock Control_: used in `base.c` to setup system, PLL and screen clocks.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
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_.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
41 - **HAL_TIM** basic _Timers_ used in `base.c` and PWM (_Pulse Width Modulation_) used to control backlight intensity.
0e7c16dd774d add wiki sub-directory
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`
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
43
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
44 ## Drivers Used by the Secondary CPU - aka CPU2-RTE ##
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
45
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
46 - **HAL_ADC** _Analog to Digital Converter_ channel 1 is used in `adc.c` for the ambient light sensor.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
48 - **HAL_FLASH** allow erasing, programming, and managing read/write protection mechanisms of the internal FLASH memory.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
49 - **HAL_GPIO** _General Purpose Input/Output_: this is the programmable pins of the chip, used to connect nearly evrything.
0e7c16dd774d add wiki sub-directory
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`.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
53 - **HAL_RCC** _Reset and Clock Control_: used in `baseCPU2.c` to setup system, PLL clocks for ...
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
54 - **HAL_RTC** _Real Time Clock_ to handle date and time in `scheduler.c`
0e7c16dd774d add wiki sub-directory
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.
0e7c16dd774d add wiki sub-directory
heinrichsweikamp
parents:
diff changeset
56 - **HAL_UART** _Universal Asynchronous Receiver Transmitter_: serial communications used in `uart.c`