# System Architecture
The embedded is the hardware system in which the software resides in the system. The embedded system can be considered as the microprocessor that can be used to perform some specific task.
The embedded system has basically three types of components:
- **MCAL** (Microcontroller Abstraction Layer)
- **HAL** (Hardware Abstraction Layer)
- **Service Layer**
- **RTOS** (Real Time Operating System)
- **Application Layer**
<p align="center">
<img width="650" src="/assets/Diagrams/System Architecture.drawio.png ">
</p>
## MCAL
MCAL is a software module that has direct access to all the on-chip MCU peripheral modules , In this project there are:
- **RCC** (Reset and Clock Control) : Control the clock that enters into peripheral.
- **GPIO** (General Purpose Input Output): Configure the Pins in MCU.
- **NVIC** (Nested Vector Interrupt Control) : Configure the interrupt that is outside the processor in MCU.
- **EXTI** (External Interrupt/event Controller ) : Configure the external interrupt pins in MCU.
- **USART** (Universal Synchronous/Asynchronous Receiver/Transmitter) : Access the USART communication protocol peripheral.
- **CAN** (Controller Area Network) : Access the CAN communication protocol peripheral.
- **STK** (System Ticks) : Access the internal timer in processor.
- **FPEC** (Flash memory program/erase controller): Access the flash memory to write and erase the page on it.
- **ADC** (Analog to digital converter) : Access the Analog to digital converter peripheral to read the data from analog sensor.
- **DMA** (Direct Memory Access) : Access the DMA peripheral to send data between peripheral and memory without interfering the MCU.
## HAL
HAL is a layer of programming that allows a computer OS to interact with a hardware device at a general or abstract level rather than at a detailed hardware level, In this project there are:
- **LED** : ON and OFF control on specific LED.
- **DCM** : ON, OFF and Change the speed on the DC motor.
- **BZR** : ON and OFF control on Buzzer.
- **TMP** : Read from the Temperature Sensor.
- **USN** : Read from the Ultrasonic Sensor.
- **SW** : Configure the switches on specific pins and read its value.
- **FAN** : ON, OFF and Change the speed on the FAN.
- **COM** :
- Customize communication protocol Like as the parallel communication protocol.
- It is based on external interrupt.
- It communicates between the user ECU and Raspberry pi by using pins that responsible about the update and diagnostic.
## Service Layer
The system service layer is the service interface that the OS provides to the application, In this project there are:
- **Sys**(System) : Initialize Applications, USER, Main ECU and Bootloader.
- **PARSING** : Filter the Hex file to extract the information that will be used in uploading the file in Application ECU.
## RTOS
- RTOS is an operating system that is used in scheduling tasks by using priority based, and using the **FCFS** (First Come First Serve).
- The Functionality:
- Create task.
- Delete task.
- Change state of task.
- scheduling between tasks.
## Application Layer
### Main ECU
- It used to control and facilitate communication between ECUs.
- When the updated file is uploaded to the server, it receives the notification and sends it to User ECUs.
- It receives the Approve and reject flag from User ECUs.
- It sends the permission of update to application ECUs.
- It receives the diagnostics request from user and sends it to application to scan for diagnostics.
- It receives the diagnostics data from application ECUs.
- It sends any faults in the system that is in the user and sends it to server.
### APP ECU 1
- Application one has 3 tasks:
- It reads the temperature by using temperature sensor.
- System check that has two modes:
- Periodic mode: checks the reading of temperature that is within range in this mode, if there is an error send the status of the check, otherwise it does not send anything to user.
- User request mode: checks the reading of temperature that is within range in this mode, either there is an error or not, it sends fault to the user.
- Executes action on the Fan when there is high reading of temperature and the OEM send update.
### APP ECU 2
- Application one has 6 tasks:
- Read the direction of vehicle.
- If the direction is backward (Enable parking checking mode, this mode checks the ultrasonic module) then alert and read distance tasks are resumed.
- When the vehicle moves backward, check the distance between it and any obstacle, if the distance is less than the threshold distance, the buzzer is switched ON.
- Upon the direction of vehicle, Move vehicle task make decision movement of vehicle.
- System check that has two modes:
- Periodic mode: checks the reading of Ultrasonic sensor that is within range and checks the reading of encoder of DCM in this mode, if there is an error send the status of the check, otherwise it does not send anything to user.
- User request mode: checks the reading of Ultrasonic sensor that is within range and checks the reading of encoder of DCM in this mode, either there is an error or not, it sends fault to the user.
### User Interface
User interface contain two Component :
- Raspberry pi: its the user interface that receives any notification and sends any decision about any application.
- User ECU: this is gateway that used to convert the customize communication between raspberry pi and User ECU to the CAN communication protocol to send any message to main ECU
### Bootloader
The bootloader is the first code to run after power up or reset, and runs before any other software starts on a processor, including an operating system (OS).
#### Memory Hierarchy
Design the flash Memory into three Partition :
- Bootloader: it contain two partition
- Preload
- Bootloader code
- Application 1: it is first version of application, any update has been occurred, it upload in this partition
- Application 2 : it is the second version from the application
- Flag request: it is states of MCU within and after update :
- No update
- Update
- Data corruption
<p align="center">
<img width="650" src="/assets/Diagrams/Bootloader Addresses.png ">
</p>
#### Scenarios during update
##### Update complete
<p align="center">
<img width="650" src="/assets/Diagrams/Bootloader Flow_Case1.png ">
</p>
##### Data corruption
<p align="center">
<img width="650" src="/assets/Diagrams/Bootloader Flow_Case2.png ">
</p>
##### Shutdown during update
<p align="center">
<img width="650" src="/assets/Diagrams/Bootloader Flow_Case3.png ">
</p>
没有合适的资源?快使用搜索试试~ 我知道了~
c-c++无线上传固件来更新汽车ECU
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共322个文件
h:134个
png:77个
c:54个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 85 浏览量
2024-04-02
21:57:50
上传
评论
收藏 55.41MB ZIP 举报
温馨提示
无线固件 (FOTA) 是一种移动软件管理 (MSM) 技术,其中设备的操作固件由其制造商无线升级和更新。 固件在后台运行,无需用户输入任何输入,并确保设备的硬件正常运行。无线下载这些更新的过程通常花费很少的时间,具体取决于连接速度和更新的大小。这为企业节省了派遣技术人员对其每个蜂窝设备进行物理升级或更新所花费的时间和金钱。 Bugfix 允许制造商修复故障设备并远程更新软件更新。这种方法通常涉及消费者通过制造商的网站或服务器下载和更新移动设备固件。FOTA更新通常可以通过设备菜单或软件或固件更新进行访问。 制造商不断发布安全更新,其中包括一个列表
资源推荐
资源详情
资源评论
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![exe](https://img-home.csdnimg.cn/images/20210720083343.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![EXE](https://img-home.csdnimg.cn/images/20210720083646.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 322 条
- 1
- 2
- 3
- 4
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/50e9360b1bb54455b5b2c910618cff07_u013083044.jpg!1)
进击的大海贼
- 粉丝: 1w+
- 资源: 196
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)