Follow,Star Public Account to not miss exciting content
Author: strongerHuang
Source: ST, Keil, Medtronic
Due to the COVID-19 pandemic, on March 30, 2020, Medtronic publicly released the design source files for the PB560 ventilator, including requirement schematics, BOM, source code, 3D CAD files, etc.
From the publicly available design source files, it can be seen that the CPU used is the ST10F276Z5T3, which is a product prior to the well-known STM32. Additionally, the integrated development environment is Keil C166, and if you have this IDE installed, you can directly open and compile the source code.
Next, I will discuss the entire process and introduce related content.
1. Medtronic Releases PB560 Ventilator
Many people may have seen this news; on March 30, 2020, for various reasons, Medtronic, a medical device company in the United States, publicly released the design source files for the relatively older PB560 ventilator.
News link:
http://newsroom.medtronic.com/news-releases/news-release-details/medtronic-shares-ventilation-design-specifications-accelerate
Using these source files requires adherence to a specific licensing agreement for reference and learning by peers. The public design source files can be found at:
https://www.medtronic.com/us-en/e/open-files.html
By filling out the relevant information and adhering to the licensing terms, you can directly download the publicly available design source files. As of now (April 5, 2020), four parts of the design source files have been released:
I have downloaded these four parts of the source files and uploaded them to a cloud drive. Reply with 【PB560 Ventilator Design Source Files】 to get the download link (Note: The link may expire later).
2. Open Source Schematics and PCB
From the first part downloaded, you can see a folder named: Electrical Schematics, which contains the relevant schematics, including the CPU, power supply, buzzer, and other board schematics.
The second part contains PCB files, where you will find the packaging type of the CPU:
By analyzing the schematics and PCB, combined with the publicly available source files (BOM), it can be confirmed that the specific model of the CPU is: ST10F276Z5T3.
(Of course, the open-source PB560 ventilator uses not only the ST10F276Z5T3 chip as the controller chip but also another MCU (PIC18F66) for power management control, and the CY7C67300 controller as the USB HOST.)
This is just a partial listing; please download the source files to see more content.
3. The Predecessor of STM32: ST10F276
From the above analysis, it can be concluded that the open-source PB560 ventilator uses the CPU model ST10F276Z5T3.
1. Early STM32 Products
Many readers should be familiar with STM32, but may not know about the ST10 series of MCUs. Before STM32, ST’s MCU products also had multiple series and models. Here is a diagram for better understanding:
Today’s STM32 is developed based on early products like ST10, STR7, etc. Just like the early products, today’s STM32 has developed multiple series.
I have previously discussed some early STM32 products in my articles. For example, this article:Are You Familiar with STVD and STVP Tools?
Before the STM32 products, STVD and STVP tools were used, and after the STM32 was released, they were integrated into STM32, and these products can still be seen today.
Although some early products are still available, STM32 has already replaced the early products, and some tools are no longer updated, so I do not recommend using early products now.
2. ST10 Series MCU
The ST10 series is a high-performance 16-bit CPU with DSP functionality from STMicroelectronics, using 0.18μm CMOS technology, with a maximum clock speed of 64MHz.
The ST10 series is an update compared to the previous ST6 and ST7 series MCUs, and some related materials can still be found officially.
ST10F276Z5 link:
https://www.st.com/en/microcontrollers-microprocessors/st10f276z5.html
Pin Information:
By comparing this pin information with the schematics above, it can be found that the pins correspond completely. From the block diagram above, it can be seen that the resources of the ST10 series MCU are quite rich, and the official documentation and recommended development tools are also available:
4. Keil C166 Development Environment
The source code for the PB560 ventilator (ST10F276) uses the integrated development environment Keil C166, which is similar to the Keil C51 and MDK environments. If you are familiar with one of them, using Keil C166 will not be difficult.
1. Chips Supported by Keil C166
Keil C166 is relatively less popular compared to Keil C51 and MDK, mainly supporting some 16-bit MCU products:
- Infineon’s C16x, ST10, XC16x series;
- Micronas’s C16x, ST10, XC16x series;
- ST’s C16x, ST10, XC16x series;
For details, please refer to:
http://www.keil.com/c166/chips.asp
2. Keil C166 Development Environment
Download link:
https://www.keil.com/download/product/
For related installation and usage of Keil, you can refer to my organized Keil Series Tutorials, reply with “Keil Series Tutorials” to see more content.
Of course, the ST10F276 controller can also be developed using Altium’s TASKING tool in addition to Keil.
5. Software Source Code
The publicly available source code for the PB560 ventilator is quite extensive; this project is actually quite large, occupying about 18MB and containing over 1400 files.
I believe my desktop computer configuration from last year is not bad (9th generation processor, 16GB RAM, SSD), but it took 1 minute and 53 seconds to compile (of course, this is related to the compiler, code structure, etc.):
The compiled code size is about 550K.
Main function source code:
void main(void){ XPEREMU = 0x05AC;
MAIN_Target_Init();
#ifdef MEM_TEST PUST_Checks((UBYTE)FALSE, PUST_RAM_CHECK_REQ);
PUST_Checks((UBYTE)FALSE, PUST_FLASH_CHECK_REQ); #endif
#ifndef _TASKING
PUST_Checks((UBYTE)FALSE, PUST_REF_VOLTAGE_CHECK_REQ); #endif
MAIN_End_of_init = FALSE;
MAIN_Global_Variables_Init();
IEN = 1;
MAIN_Interfaces_Second_Init = FALSE;
MAIN_Interfaces_Init();
DRV_NAND_ReadID();
MAIN_NAND_Flash_Bad_Block_Detection();
MAIN_NAND_Flash_Bad_Block_Read();
MAIN_Leds_Backlight_Buzzers_StartControl();
MAIN_Version_Error_Mngt();
MAIN_Airox_Symbol_Display();
TIM_Temporize(1000000);
MAIN_Interfaces_Second_Init = TRUE; MAIN_Interfaces_Init();
MAIN_Tasks_Init();
MAIN_End_of_init = TRUE;
if ( (INHIB_DETECTED == FALSE) && (EEP_DB_Config[VENTIL_REQ_U16] == FALSE) && (EEP_DB_Config[ADJUST_KEYLOCK_U16] == FALSE) ) { DB_EventMngt(EVENT_MAINTENANCE_MENU_ACCESS); SETUP_HMI_Start(); DB_ControlWrite(MAINTENANCE_MODE_U16, TRUE); while (1) { SCHED_Setup_Main(); } } else if ( (KEY_Touch_Detection(KEY_CODE_NAVIG) == TRUE) && (EEP_DB_Config[VENTIL_REQ_U16] == FALSE) ) { DB_EventMngt(EVENT_CIRCUIT_CHECK_MENU_ACCESS); CIRCUIT_CHECK_HMI_Start(); DB_ControlWrite(CIRCUIT_CHECK_MODE_U16, TRUE); while (1) { SCHED_Setup_Main(); } } else { VENTILATION_HMI_Start(); while (1) { SCHED_Ventilation_Main(); } }}
This is the public source code for the main function, with comments removed.
Why is the project so large? Through the source code, you will find that it includes quite a lot of content: ADC, SPI, UART, USB, TIMER, POWER, storage, display, etc.
Alright, this concludes the article. Interested friends can go to the official website to download the public source files, or reply in my backend with 【PB560 Ventilator Design Source Files】 to get the download link.
Disclaimer:This article contains some materials sourced from the internet, and the copyright belongs to the original author. If there are any copyright issues, please contact me for removal.
‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧ END ‧‧‧‧‧‧‧‧‧‧‧‧‧‧‧Recommended Reading:Selected Summary | Directory | SearchHow to Fit Hundreds of Millions of Transistors into a Chip?Important Content and Differences in Keil MDK Compiler Optimization OptionsFollowthe WeChat public account “strongerHuang”, reply with “1024” to see more content, reply with “WeChat” to add me on WeChat.
Long pressto go to the public account included in the imageto follow