STMicroelectronics UM3469 X-CUBE-ISO1 Ékspansi Software

Bubuka
The X-CUBE-ISO1 expansion software package for STM32Cube runs on the STM32 and includes firmware for the X-NUCLEO-ISO1A1. The software provides an easy-to-use solution for the development of a basic PLC device provided by the X-NUCLEO. The expansion is built on STM32Cube software technology to ease portability across different STM32 microcontrollers.
The software comes with an implementation running on the X-NUCLEO-ISO1A1 expansion board connected to a NUCLEO-G071RB development board (or either a NUCLEO-G0B1RE or a NUCLEO-G070RB). From now on, in the document only the NUCLEO-G071RB will be mentioned for simplicity.
The X-NUCLEO-ISO1A1 board is designed to support the stacking of two boards with appropriate jumper settings to extend the input and output capabilities.
Akronim jeung singgetan
Tabél 1. Daptar akronim
| Akronim | Katerangan |
| PLC | Programmable logika controller |
| API | panganteur programming aplikasi |
| PWM | Modulasi lebar pulsa |
| GPIO | Input / kaluaran tujuan umum. |
| HAL | Lapisan abstraksi hardware |
| PC | komputer pribadi |
| FW | Firmware |
Naon STM32Cube?
STM32Cube™ represents the STMicroelectronics initiative to make developers’ lives easier by reducing development effort, time, and cost. STM32Cube covers the STM32 portfolio.
STM32Cube Vérsi 1.x ngawengku:
- STM32CubeMX, a graphical software configuration tool that allows the generation of C initialization code using graphical wizards.
- A comprehensive embedded software platform specific to each series (such as the STM32CubeG0 for the STM32G0 series), which includes:
- the STM32Cube HAL embedded abstraction-layer software, ensuring maximized portability across the STM32 portfolio
- a consistent set of middleware components such as RTOS, USB, TCP/IP, and graphics
- all embedded software utilities with a full set of examples.
Arsitéktur STM32Cube
Solusi firmware STM32Cube diwangun sabudeureun tilu tingkat bebas nu bisa kalayan gampang berinteraksi sareng nu sejen, sakumaha dijelaskeun dina diagram di handap.

ékspansi software X-CUBE-ISO1 pikeun STM32Cube
Leuwihview
Firmware pikeun X-NUCLEO-ISO1A1, papan ékspansi input / output terasing industri, dikembangkeun di sabudeureun lingkungan sareng perpustakaan STM32, ngamangpaatkeun MCU berprestasi tinggi tina papan STM32 Nucleo pikeun ngatur input digital, kaluaran sareng diagnostik terpadu sareng wates arus dinamis, sareng generasi sinyal PWM. Éta gaduh konfigurasi sareng kontrol dewan komprehensif, kalebet kerangka pikeun kaayaan standar sareng alternatif, makro pikeun netepkeun nilai pre-scaler, sareng definisi pikeun palabuhan sareng pin GPIO.
Ieu ngarojong rupa sample aplikasi kasus pamakéan kayaning input digital kana kaluaran mirroring, komunikasi UART ngaliwatan dewan Nucleo, deteksi sesar, test kasus, sarta generasi PWM nu bisa langsung dipaké sarta bisa gampang ngaropéa tur dimekarkeun.
API nyadiakeun sakumpulan fungsi anu kuat pikeun kontrol input/output digital, deteksi kasalahan, sareng apdet status dewan, sareng setelan konfigurasi pikeun ngajalankeun dua papan sakaligus dina modeu anu béda. Fungsi API husus sadia pikeun initializing, ngamimitian, eureun, sarta Konfigurasi sinyal PWM pikeun saluran kaluaran digital.
Paket rojongan dewan ngawengku fungsi pikeun ngadalikeun sarta ngawas pin GPIO interfaced kalawan IPS1025H-32 sarta maca kaayaan tina pin GPIO interfaced kalawan CLT03-2Q3 via isolator digital.
Konfigurasi sareng inisialisasi dumasar kana STM32CubeMX, kalayan pamekaran sareng debugging dirojong ku STM32CubeIDE, Sistem IAR, sareng alat Keil®.
Arsitéktur
Firmware pikeun X-NUCLEO-ISO1A1 tiasa dibagi kana sababaraha blok fungsional anu béda, masing-masing tanggung jawab kana sagala rupa aspék operasi sistem:

- Konfigurasi sareng Kontrol Dewan:
- The board_config.h file ngandung makro pikeun ngonpigurasikeun dewan pikeun ngajalankeun dina kaayaan standar atawa alternatif, atawa duanana. Éta ogé kalebet definisi pikeun nilai pre-scaler sareng palabuhan GPIO sareng pin.
- This block ensures that the board is set up correctly for the desired operating conditions and that all necessary hardware configurations are in place.
- Kasus Pamakéan Aplikasi:
- The st_iso_app.h and st_iso_app.c files ngandung kasus pamakéan aplikasi dirancang pikeun nguji rupa fungsionalitas dewan.
- These use cases include digital input to output mirroring, fault detection tests, and PWM signal generation.
- Example konfigurasi disadiakeun pikeun ngajalankeun dua dewan sakaligus dina modeu béda, demonstrating versatility sarta kalenturan of firmware nu.
- Fungsi API:
- The iso1a1.h and iso1a1.c files nyadiakeun set komprehensif API pikeun ngarojong rupa fungsi.
- These APIs include functions for digital input/output control, fault detection, and board status updates.
- The APIs are designed to be simple and intuitive, making it easy for users to interact with the board and perform necessary operations.
- Kontrol Sinyal PWM:
- The pwm_api.h and pwm_api.c files ngandung fungsi API husus patali generasi sinyal PWM.
- These functions allow for initializing, configuring, starting, and stopping PWM signals for digital output channels.
- The PWM functionality is not default choice. Board configuration has be modified to enable these. Refer to Section 3.5: APIs for more details.
- Paket Rojongan Dewan:
- The board support package includes files pikeun ngadalikeun sarta ngawas pin GPIO interfaced kalawan IPS1025H-32 jeung maca kaayaan tina pin GPIO interfaced kalawan CLT03-2Q3.
- The ips1025h_32.h jeung ips1025h_32.c files nyadiakeun fungsi pikeun nyetél, mupus, sarta ngadeteksi faults dina pin GPIO interfaced kalawan IPS1025H-32.
- The clt03_2q3.h jeung clt03_2q3.c files nyadiakeun fungsi pikeun maca kaayaan tina pin GPIO interfaced kalawan CLT03-2Q3.
Firmware démo ngalaksanakeun sababaraha kasus pamakean saderhana pikeun nunjukkeun kamampuan sistem. Kasus pamakean sareng API pangguna ieu dieksekusi sacara terkoordinasi pikeun mastikeun operasi lancar sareng hasil anu akurat. Arsitéktur dirancang pikeun gampang dilegakeun, ngamungkinkeun pangguna pikeun nambihan fungsionalitas anyar sareng kasus panggunaan upami diperyogikeun. Konfigurasi standar disadiakeun pikeun ngajalankeun hiji dewan jeung IOs industri digital. Setélan jumper ogé diperlukeun dina modeu standar sakumaha ditétélakeun dina Table 2. Input digital Digital kaluar mirroring (DIDO) teh usecase aplikasi firmware standar.
Struktur folder

Polder di handap ieu kalebet dina pakét parangkat lunak:
- Dokuméntasi ngandung HTML anu disusun file dihasilkeun tina kode sumber, detailing komponén software jeung API.
- Supir ngandung:
- an STM32Cube HAL folder, located in the subfolders STM32G0xx_HAL_Driver. These files are not described here as they are not specific to the X-CUBE-ISO1 software but come directly from the STM32Cube framework.
- polder CMSIS anu ngandung standar antarmuka parangkat lunak mikrokontroler Cortex® files ti Arm. Ieu files are vendor-independent hardware abstraction layer for the Cortex®-M processor series. This folder also comes unchanged from the STM32Cube framework.
- a BSP folder containing the codes for the components IPS1025H-32 and CLT03-2Q3 and APIs related to X-NUCLEO-ISO1A1.
- Aplikasi ngandung folder pamaké nu ngandung main.c file, kasus pamakéan aplikasi file, st_iso_app.c and the board_config.h file, disadiakeun pikeun platform NUCLEO-G071RB.
folder BSP
The X-CUBE-ISO1 software uses two different component files, anu aya di jero BSP/Komponén:
IPS1025
The ips1025h_32.h jeung ips1025h_32.c files nyadiakeun palaksanaan supir komprehensif pikeun pin GPIO interfaced kalawan IPS1025H-32, kaasup fungsionalitas lengkep pikeun ngadalikeun sagala pin na detecting faults. Ieu files ngalaksanakeun fungsi pikeun initializing alat, setelan na clearing status channel, detecting kaayaan sesar, sarta ngatur fungsionalitas PWM. Supir ngadukung sababaraha alat sareng saluran, kalayan kamampuan lengkep pikeun saluran individu atanapi salaku grup.
CLT03
The clt03_2q3.h jeung clt03_2q3.c files ngalaksanakeun supir pinuh-diulas pikeun pin GPIO interfaced kalawan CLT03-2Q3, kalawan kamampuhan lengkep pikeun maca sakabéh nagara bagian pin. Supir nyayogikeun fungsi pikeun ngamimitian alat, maca status saluran individu, sareng kéngingkeun inpormasi status pikeun sadaya saluran sakaligus. Éta ngadukung sababaraha konfigurasi alat sareng ngajaga kaayaan internal pikeun manajemén saluran anu efektif.
API software X-CUBE-ISO1 dibagi jadi dua sumber utama files, anu aya di jero subfolder ISO1A1:
ISO1A1
ISO1A1 files ngawengku hiji set komprehensif fungsi API dirancang pikeun konfigurasi dewan, interaksi komponén, sarta manajemén sesar. Pungsi ieu ngagampangkeun operasi maca jeung nulis, deteksi sesar jeung apdet, sarta ngawengku rupa-rupa utilitas helper pikeun ngarojong fungsi API primér. Salaku tambahan, éta files nyadiakeun fungsionalitas pikeun kontrol LED, initialization GPIO, penanganan interupsi, sarta komunikasi UART.
API PWM
API PWM nyadiakeun fungsi pikeun initializing, ngonpigurasikeun, ngamimitian, jeung ngeureunkeun sinyal PWM. Éta ngamungkinkeun nyetel frékuénsi PWM sareng siklus tugas pikeun pin timer anu ditangtukeun, mastikeun kontrol anu tepat dina operasi PWM.
Polder aplikasi
Folder Aplikasi ngandung file utama files diperlukeun pikeun firmware nu, kaasup headers jeung sumber files. Di handap ieu pedaran lengkep ngeunaan files dina folder ieu:
- board_config.h: Konfigurasi macros pikeun dewan.
- main.c: Program utama (kode example nu dumasar kana perpustakaan pikeun ISO1A1).
- st_iso_app.c: Fungsi aplikasi pikeun nguji dewan jeung konfigurasi.
- stm32g0xx_hal_msp.c: HAL initialization rutin.
- stm32g0xx_it.c: Ngaganggu panangan.
- syscalls.c: System panggero implementations.
- sysmem.c: Manajemén memori Sistim.
- system_stm32g0xx.c: System initialization.
Software diperlukeun sumberdaya
The Nucleo device controls and communicates with the X-NUCLEO-ISO1A1 board via GPIOs. This requires the use of several GPIOs for input, output, and fault detection of the industrial IO devices contained in the X-NUCLEO-ISO1A1 board. Refer to the Hardware user manual UM3483 for more details and the jumper configurations.
Board configuration (board_config.h)
The board_config.h file ngahartikeun sumberdaya dipaké sarta macros konfigurasi pikeun ngonpigurasikeun software nu nurutkeun konfigurasi dewan. Éta nanganan dugi ka dua papan (sapertos tumpukan dua papan).
Konfigurasi DEFAULT parangkat lunak dijajarkeun sareng papan ékspansi X-NUCLEO-ISO1A1 sareng jumperna dina posisi standar. Pikeun ngonpigurasikeun software pikeun X-NUCLEO-ISO1A1 dina setelan standar na, uncomment BOARD_ID_DEFAULT makro dina board_config.h file.
Konfigurasi ALTERNATE software diatur ku uncommenting makro BOARD_ID_ALTERNATE dina board_config.h file sarta ngarobah posisi jumper dina dewan.
Pikeun make dua dewan sakaligus dina konfigurasi tumpukan-up, uncomment duanana BOARD_ID_DEFAULT na BOARD_ID_ALTERNATE macros sarta mastikeun jumper hiji dewan urang aya dina posisi standar sarta séjén dina posisi séjén. Catet yén gaduh duanana papan dina konfigurasi anu sami (boh boh sacara standar atanapi duanana sacara alternatip) henteu disarankeun sareng tiasa nyababkeun kabiasaan anu teu dipikahoyong.
Lamun ngajalankeun ngan hiji dewan, mastikeun yén software kasebut ngonpigurasi pikeun ngan hiji konfigurasi jeung makro pakait jeung konfigurasi séjén commented.

Pra-scalers
Urang bisa ngonpigurasikeun nilai pre-scaler di board_config.h pikeun ngahontal rentang frékuénsi béda pikeun kaluaran PWM ku netepkeun macros luyu. Pikeun ngagunakeun nilai pra-skalar, cabut koméntar kana makro anu cocog sareng koméntar anu sanés. Sacara standar, DEFAULT_PRESCALAR dianggo.
- PRESCALER_1
- PRESCALER_2
- DEFAULT_PRESCALER
Nilai prescaler ngan ukur dianggo nalika timer dianggo, sareng henteu diperyogikeun pikeun operasi I/O dasar. Nilai-nilai makro pra-skalar sareng rentang frekuensi anu saluyu tiasa ditingali dina dokuméntasi kode atanapi dina kode sorangan.
Keteg jajantung LED
We can configure the green user LED, D7 to blink in a heartbeat fashion as a test for proper connection to the NUCLEO-G071RB board. The macro, HEARTBEAT_LED when uncommented, blinks the green LED on X-NUCLEO-ISO1A1 when it is connected to the NUCLEO. It remains on for 1 second and off for 2 seconds, with the timing taken care of by timers. When it is not used or any function involving LEDs being called, the macro should be uncommented.
Input jeung kaluaran konfigurasi GPIO
Unggal dewan X-NUCLEO-ISO1A1 dilengkepan dua palabuhan input sareng dua palabuhan kaluaran. Kamampuhan dewan bisa dilegaan ku tumpukan dua papan X-NUCLEO-ISO1A1 di luhur silih, sahingga ngamungkinkeun pamakéan opat palabuhan input digital sarta opat palabuhan kaluaran digital. Parangkat lunak anu disayogikeun kalebet API komprehensif anu ngagampangkeun maca, netepkeun, sareng ngabersihan palabuhan. Salaku tambahan, API ngamungkinkeun pikeun nyetél sakaligus, maca, atanapi ngabersihan sadaya palabuhan. Inpormasi lengkep ngeunaan fungsi API sayogi dina dokuméntasi kode ogé dina bagian API tina dokumén ieu.

Di dieu awalan DI nunjukkeun port input digital sarta DO nunjukkeun port kaluaran digital. Pikeun konfigurasi alternatip, parangkat lunak ngagunakeun konvénsi ngaran anu sami sareng ahiran _alt napel.
Tabel di handap ieu ngajéntrékeun makro GPIO anu ditetepkeun dina parangkat lunak anu cocog sareng sababaraha palabuhan IO:
meja 2. GPIOs disadiakeun pikeun Default sarta konfigurasi software alternatif
| Ngaran | Fungsi | Konfigurasi standar | Konfigurasi alternatip |
| INPUT PIN | Input pin 1 | GPIOC, IA0_IN_1_PIN | GPIOD, IA0_IN_1_PIN |
| Input pin 2 | GPIOD, IA1_IN_2_PIN | GPIOC, IA1_IN_1_PIN | |
| OUTPUT PIN | Output pin 1 | GPIOC, QA0_CNTRL_1_PIN | GPIOD, QA0_CNTRL_1_PIN |
| Output pin 2 | GPIOC, QA1_CNTRL_2_PIN | GPIOC, QA1_CNTRL_2_PIN | |
| FAULT PIN | Fault pin 1 | GPIOC, FLT1_QA0_2_OT_PIN | GPIOD, FLT1_QA0_1_OT_PIN |
| Fault pin 2 | GPIOC, FLT2_QA0_2_OL_PIN | GPIOD, FLT2_QA0_1_OL_PIN | |
| Fault pin 3 | GPIOC, FLT1_QA1_2_OT_PIN | GPIOC, FLT1_QA1_1_OT_PIN | |
| Fault pin 4 | GPIOC, FLT2_QA1_1_OL_PIN | GPIOD, FLT2_QA1_2_OL_PIN | |
| KONFIGURASI MAKRO | BOARD_ID_DEFAULT | BOARD_ID_ALTERNATE |
Timers and PWM
Timers can be used in the X-CUBE-ISO1 firmware to generate PWM signals for specific pins. By default, timers are not initialized except TIM3. The respective timers should be initialized before generating the PWM signals and the respective output ports must be initialized in the PWM mode.
Pikeun operasi input/output GPIO normal, teu perlu ngonpigurasikeun timer atawa port kaluaran, sabab diurus sacara standar. Sanajan kitu, lamun sakali pin kaluaran diatur dina modeu PWM, urang kudu reconfigure aranjeunna dina modeu GPIO pikeun dipaké salaku pin GPIO.
Catetan: Nalika pin kaluaran dianggo pikeun generasi PWM, kaluaran GPIO ditumpurkeun, duanana fungsionalitas henteu tiasa dilaksanakeun sakaligus. Pikeun ngaktipkeun deui GPIO sanggeus pamakéan PWM, bisa nelepon fungsi API ST_ISO_BoardConfigureDefault () atanapi ST_ISO_InitGPIO () pikeun ngonpigurasikeun sakabéh palabuhan sakumaha GPIO sakaligus atawa ST_ISO_Init_GPIO () kalawan port GPIO tinangtu sarta pin.
Sakumaha didadarkeun di luhur, parangkat lunak ogé nganggo hiji otomatis sacara standar, TIM3, anu dianggo pikeun palaksanaan waktos LED pangguna, jam, sareng palaksanaan waktos UART. Éta dikonpigurasi salami 1 detik sacara standar.
Tabel di handap ieu rinci ngeunaan timer anu sayogi pikeun unggal pin dina kode kami:
meja 3. Timers sadia pikeun tiap pin
| Ngaran pin | Software representation | Timer | Timer channel | Fungsi alternatip |
| QA0_CNTRL_1_PIN | QA_0 | TIM2 | TIM_CHANNEL_4 | GPIO_AF2_TIM2 |
| QA1_CNTRL_2_PIN | QA_1 | TIM1 | TIM_CHANNEL_3 | GPIO_AF2_TIM1 |
| QA0_CNTRL_2_PIN | QA_0_ALT | TIM1 | TIM_CHANNEL_4 | GPIO_AF2_TIM1 |
| QA1_CNTRL_1_PIN | QA_1_ALT | TIM17 | TIM_CHANNEL_1 | GPIO_AF2_TIM17 |
Additional utilities of the firmware
The firmware includes additional utilities to enhance the functionality of the X-NUCLEO-ISO1A1 evaluation board. Some of which are described below.
UART
The UART communication feature allows for real-time monitoring and debugging of the board status through PC utilities such as TeraTerm, PuTTY and other similar applications. The software enables the UART data transmission through the UART present in the NUCLEO-G071RB board. The `ST_ISO_UART` function sends detailed board status information over UART, including system uptime, firmware configuration, and fault status. This data can be viewed ngagunakeun sagala aplikasi port serial, kayaning TeraTerm. Fungsi `ST_ISO_APP_DIDOandUART` ngagabungkeun operasi input/output digital jeung komunikasi UART, ngirimkeun status sadaya saluran input jeung output dina interval nu tangtu. Di handap ieu setélan konfigurasi jeung salakuample kumaha data muncul dina TeraTerm. Ngaran port bisa rupa-rupa dumasar kana sistem jeung port serial dipaké.


Konfigurasi mode pin IO
Utilitas konfigurasi mode pin IO ngamungkinkeun pamaké pikeun ngeset port input jeung kaluaran dewan ngagunakeun fungsi ST_ISO_BoardConfigure (). Pungsi ieu ngarojong ngonpigurasikeun dua palabuhan kaluaran (QA0, QA1) jeung dua palabuhan input (IA0, IA1) kana modeu Input/Output, modeu kaluaran PWM, atawa mode input Interrupt. Ku nyaluyukeun parameter jeung nelepon fungsi ieu, pamaké bisa kalayan gampang ngaluyukeun konfigurasi IO dewan pikeun minuhan kabutuhan husus.
Mode Input/Output, utilitas ngamimitian pin GPIO pikeun operasi digital tujuan umum. Dina modeu kaluaran PWM, éta nyetél timer pikeun kontrol sinyal PWM tepat. Nalika dina modeu input Interrupt, utilitas ngonpigurasikeun pin pikeun nanganan interrupts, ngamungkinkeun program anu didorong acara responsif.
Ngaganggu penanganan
For handling FAULT signals, the software enables the associated interrupt lines, allowing for responsive event-driven programming. A customized handler can be associated with these interrupts via the
HAL_GPIO_EXTI_Rising_Callback function defined in the API. The software includes features for initializing GPIO pins in interrupt mode via ST_ISO_BoardConfigure function and configuring specific actions in the EXTI IRQ handlers. This allows users to customize how the board responds to external events, ensuring it can effectively manage various fault conditions and triggers.
API
The X-CUBE-ISO1 software API provides a comprehensive set of functions to control and monitor the X-NUCLEO-ISO1A1 board, including PWM signal generation and GPIO operations. The API is designed to be easy to use and integrate into various applications, providing flexibility and control over the board’s functionality.
API software X-CUBE-ISO1 didefinisikeun dina folder BSP/ISO1A1. Fungsina diawalan ku ST_ISO. API nu katingali ku aplikasi ngaliwatan iso1a1.c jeung pwm_api.c files mangrupakeun kombinasi konstanta, struktur data, jeung fungsi.
Sample aplikasi firmware utilizes API ieu pikeun nembongkeun sababaraha kamungkinan pamakéan fungsi ieu.
Paket parangkat lunak X-CUBE-ISO1 nyayogikeun dua sét API:
- ISO1A1 API
- API PWM
ISO1A1 API
API ISO1A1 dihartikeun dina iso1a1.h jeung iso1a1.c files. Éta nyayogikeun fungsi pikeun ngonpigurasikeun sareng ngontrol dewan ISO1A1, kalebet operasi input / output GPIO sareng deteksi sesar.
Fungsi konci
- ST_ISO_BoardConfigureDefault: Ngonpigurasikeun palabuhan IO dewan sareng konfigurasi GPIO standar.
- ST_ISO_BoardConfigure: Ngonpigurasikeun modeu port input sareng output pikeun dewan.
- ST_ISO_BoardInit: Initializes hardware dewan.
- ST_ISO_BoardMapInit: Initializes fungsionalitas dewan dumasar kana saluran handles konfigurasi.
- ST_ISO_GetFWVersion: Ngabalikeun versi firmware ayeuna.
- ST_ISO_GetChannelHandle: Retrieves cecekelan saluran pikeun ngaran channel husus.
- ST_ISO_InitGPIO: Initializes pin GPIO dieusian ku ID modul dibikeun.
- ST_ISO_InitInterrupt: Initializes pin GPIO dieusian salaku interupsi jeung ID modul dibikeun.
- ST_ISO_EnableFaultInterrupt: Inisialisasi pin GPIO sesar dina mode interupsi.
- ST_ISO_SetChannelStatus: Nyetél status saluran anu ditangtukeun.
- ST_ISO_SetOne_DO: Nyetél saluran kaluaran digital tunggal.
- ST_ISO_ClearOne_DO: Ngabersihan saluran kaluaran digital tunggal.
- ST_ISO_WriteAllChannels: Nulis data ka sadaya saluran kaluaran digital.
- ST_ISO_GetOne_DI: Meunangkeun status saluran input digital tunggal.
- ST_ISO_ReadAllChannel: Maca status sadaya saluran input.
- ST_ISO_ReadAllOutputChannel: Maca status sadaya saluran kaluaran.
- ST_ISO_ReadFaultStatus: Maca status kasalahan tina sadaya palabuhan deteksi kasalahan.
- ST_ISO_ReadFaultStatusPolling: Nguji deteksi kasalahan dewan dina modeu polling.
- ST_ISO_DisableOutputChannel: Nonaktipkeun kaluaran pikeun saluran éta.
- ST_ISO_UpdateBoardStatusInfo: Ngamutahirkeun inpormasi status dewan.
- ST_ISO_UpdateFaultStatus: Ngamutahirkeun status kasalahan pikeun saluran khusus.
- ST_ISO_BlinkLed: Kedip-kedip LED anu ditetepkeun kalayan reureuh anu ditangtukeun sareng cacah ulang.
- ST_ISO_UART: Ngirim informasi status dewan ngaliwatan UART.
- ST_ISO_SwitchInit: Initializes komponén switch.
- ST_ISO_SwitchDeInit: De-initializes conto switch.
- ST_ISO_DigitalInputInit: Initializes komponén input digital.
- ST_ISO_DigitalInputDeInit: De-initializes conto input digital.
API PWM
API PWM dihartikeun dina pwm_api.h jeung pwm_api.c files. Eta nyadiakeun fungsi handap pikeun initialize jeung kontrol sinyal PWM pikeun pin husus.
- ST_ISO_Init_PWM_Signal: Initializes timers jeung pin husus pikeun sinyal PWM.
- ST_ISO_Set_PWM_Frequency: Nyetél frékuénsi PWM pikeun pin husus.
- ST_ISO_Set_PWM_Duty_Cycle: Nyetél siklus tugas PWM pikeun pin husus.
- ST_ISO_Start_PWM_Signal: Mimitian sinyal PWM dina pin husus.
- ST_ISO_Stop_PWM_Signal: Ngeureunkeun sinyal PWM dina pin husus.
To start a PWM signal on a respective channel, firstly call the ST_ISO_Init_PWM_Signal function, then set the desired frequency and duty cycle by calling the ST_ISO_Set_PWM_Frequency and
ST_ISO_Set_PWM_Duty_Cycle functions respectively and then you can start the PWM signal by calling the ST_ISO_Start_PWM_Signal function and stop by calling ST_ISO_Stop_PWM_Signal.
fungsi nu perlu disebut kalawan ngaran pin pakait jeung timers sadia, rinci ngeunaan nu geus disadiakeun dina tabel 3. saluran kaluaran béda bisa nyetél jeung frékuénsi béda jeung siklus tugas; ngarobah frékuénsi atawa siklus tugas teu mangaruhan séjén, eta tetep sarua.
Inpormasi téknis anu lengkep ngeunaan API anu sayogi pikeun pangguna tiasa dipendakan dina HTML anu disusun file lokasina di jero folder "Dokuméntasi" tina pakét parangkat lunak dimana sadaya fungsi sareng parameter dijelaskeun sapinuhna.
Katerangan aplikasi
Aplikasi démo ngalaksanakeun sababaraha kasus pamakean saderhana. The st_iso_app na board_config files maénkeun peran krusial dina nyetel tur ngagunakeun dewan jeung fungsi aplikasi na. Sateuacan nganggo pungsi-pungsi ieu, pastikeun papan sareng konfigurasi parangkat lunak disinkronkeun.
Fungsi Aplikasi (st_iso_app.h sareng st_iso_app.c)
Pungsi aplikasi diawalan ku ST_ISO_APP; aranjeunna mangrupikeun fungsi tingkat luhur anu katingali ku pangguna anu nyauran fungsi API pikeun palaksanaanna. Fungsi aplikasi bisa disebut dina utama.c file pikeun fungsi maranéhanana.
- Paké Pamilihan Case: Pamaké bisa uncomment makro pamakéan kasus nu dipikahoyong dina st_iso_app.c file. The function ST_ISO_APP_SelectUseCaseMacro(), called in main.c, initializes that use case, and the function ST_ISO_APP_SelectedFunction() implements it in main.c. This approach allows for easy configuration of the operational mode by simply modifying the macro definitions, ensuring that the appropriate functionality is executed based on the selected use case. By default, the use case DIDO is selected, and the user does not have to make any changes to the code to implement it.
- Digital Input to Digital Output Mirroring (ST_ISO_APP_UsecaseDIDO): This function reads the status of all input channels and writes the same status to all output channels. It is useful for mirroring digital inputs to digital outputs.
- Digital Input to Digital Output Mirroring with UART (ST_ISO_APP_DIDOandUART): This function mirrors the digital inputs to digital outputs, similar to the ST_ISO_APP_UsecaseDIDO function. Additionally, it transmits the board status through the UART interface on the Nucleo device, allowing the status to be viewed dina port serial ngagunakeun aplikasi kawas Tera Term.
- Test Case Function (ST_ISO_APP_TestCase): This function performs a series of tests and actions based on the board configuration. It checks the fault status, reads the status of two digital input channels, and performs actions based on their values. This function helps in evaluating the board’s performance and functionality quickly and getting visual feedback through different LED patterns. Ensure the HEARTBEAT_LED macro in the board_config.h file ieu commented pikeun niténan pola LED ditangtoskeun.
- PWM Generation (ST_ISO_APP_PWM _OFFSET): This function starts the PWM signal on both output channels with a frequency of 1 Hz and duty cycle 50%. It initializes the PWM signal, sets the frequency and duty cycle, and starts the PWM signal for the specified board ID. The PWM signal is generated with an offset between both channels and thus they are not in phase.
- Fault Detection Test (ST_ISO_APP_FaultTest): This function evaluates the fault detection by motoring inbuilt diagnostic pins of smart output module IPS1025. in either polling or interrupt mode. It configures the fault detection mode, initializes fault detection, and updates the fault status structure based on the selected mode. This function is crucial for ensuring the reliability and safety of the board by detecting and handling faults effectively. When it is in polling mode, the fault status is updated every second with the help of a timer and is reflected in the structure defaultBoardFaultStatus or alternateBoardFaultStatus. When it is in the interrupt mode, the fault status is updated only when the fault occurs, and it triggers the software to clear the corresponding output port.
- PWM Variation Test (ST_ISO_APP_PwmVariationTest): This function is designed to test the variation of PWM (Pulse Width Modulation) signals on different output channels based on the board configuration. It initializes the PWM signals for both default and alternate board configurations, setting their frequency to 100 Hz and the initial duty cycle to 0%. The function then varies the duty cycle from 0% to 100% in increments of 5%, and back from 100% to 0% in decrements of 5%, with a 2-second delay between each step. This controlled variation allows for the observation and evaluation of the PWM signal behavior on channels QA_0 and QA_1 for the default board, and QA_0_ALT and QA_1_ALT for the alternate board.
Ku nuturkeun konfigurasi ieu sareng ngamangpaatkeun fungsi aplikasi anu disayogikeun, anjeun tiasa sacara efektif nyetél sareng nganggo papan X-NUCLEO-ISO1A1 pikeun sagala rupa kasus panggunaan démo.
Pituduh setelan sistem
Katerangan hardware
STM32 Nucleo platform
Papan pangembangan STM32 Nucleo nyayogikeun cara anu hargana sareng fleksibel pikeun pangguna pikeun nguji solusi sareng ngawangun prototipe nganggo garis mikrokontroler STM32.
The Arduino® connectivity support and ST morpho connectors make it easy to expand the functionality of the STM32 Nucleo open development platform with a wide range of specialized expansion boards to choose from.
STM32 Nucleo dewan teu merlukeun panyilidikan misah sabab integrates ST-link / V2-1 debugger / programmer.
Papan STM32 Nucleo hadir sareng perpustakaan HAL software STM32 komprehensif sareng sababaraha parangkat lunak anu rangkep.amples.

Information regarding the STM32 Nucleo board is available at www.st.com/stm32nucleo
X-NUCLEO-ISO1A1 expansion board
The X-NUCLEO-ISO1A1 is an evaluation board with isolated industrial input/output designed to expand the STM32 Nucleo board and provide micro-PLC functionality. Two of the X-NUCLEO-ISO1A1 boards can be stacked together on top of an STM32 Nucleo board with the appropriate selection of jumpers on the expansion board to avoid conflict in GPIO interfaces. The UL1577 certified digital isolators STISO620 and STISO621 provide isolation between logic and process side components. Two current limited high-side inputs from the process side are realized through CLT03-2Q3. The CLT03-2Q3 provides protection, isolation, and energy-less status indication for industrial conditions, designed to meet standards such as IEC61000-4-2, IEC61000-4-4, and IEC61000-4-5. One each of the high-side switches IPS1025H-32/HQ-32 provides protected output up to 5.6 A with diagnostics and smart driving features. These can drive capacitive, resistive, or inductive loads. The X-NUCLEO-ISO1A1 allows rapid evaluation of the onboard ICs using the X-CUBE-ISO1 software package.

Setélan hardware
Komponén hardware di handap ieu diperlukeun:
- One STM32 Nucleo development platform (suggested order code: NUCLEO-GO71RB)
- One industrial digital output expansion board (order code: X-NUCLEO-ISO1A1)
- One USB type A to Micro USB cable to connect the STM32 Nucleo to the PC
- An external power supply (24 V) and the associated wires to supply the X-NUCLEO-ISO1A1 expansion board.
Setup parangkat lunak
Komponén parangkat lunak di handap ieu diperyogikeun pikeun nyetél lingkungan pangembangan anu cocog pikeun nyiptakeun aplikasi pikeun STM32 Nucleo anu dilengkepan papan ékspansi X-NUCLEO-ISO1A1:
- X-CUBE-ISO1: an expansion for STM32Cube dedicated to application development which requires the use of the X-NUCLEO-ISO1A1 board. The X-CUBE-ISO1 firmware and related documentation is available on www.st.com
- Development toolchain and Compiler: the STM32Cube expansion software supports the three following environments:
- IAR Embedded Workbench for ARM® (IAR-EWARM) toolchain
- NyataView Microcontroller Development Kit (MDK-ARM-STM32) toolchain
- STM32CubeIDE.
Setélan dewan
dewan kudu ngonpigurasi kalawan setelan jumper luyu sakumaha dieusian dina manual pamaké Hardware (UM3483). Nuturkeun tungtunan ieu sacara saksama penting pikeun mastikeun fungsionalitas anu leres sareng ngahindarkeun masalah anu mungkin.
Pituduh setelan sistem
Bagian ieu ngajelaskeun kumaha carana nyetél bagian hardware béda saméméh ngembangkeun sarta executing hiji aplikasi dina STM32 Nucleo , NUCLEO-G071RB dewan jeung dewan ékspansi X-NUCLEO-ISO1A1.


Setup for X-CUBE-ISO1 expansion package
The X-NUCLEO-ISO1A1 mustbe configured with the specific jumper positions based on which configuration you are running the board. The details of which can we further looked in the hardware manual.
- Lengkah 1. Plug the X-NUCLEO-ISO1A1 expansion board on top of the STM32 Nucleo via the morphoconnectors.
Upami Anjeun keur make dua papan di luhur silih, tumpukan aranjeunna saperti dina Gambar 11. - Lengkah 2. Connect the STM32 Nucleo board to a PC with the USB cable through USB connector CN1 to powerthe board.
- Lengkah 3. Power the X-NUCLEO-ISO1A1 expansion board(s) on by connecting J1 to the 24V DC power supply. If using stacked boards, ensure both boards are powered.
- Lengkah 4. Open your preferred toolchain (MDK-ARM from Keil, EWARM from IAR, or STM32CubeIDE).
- Lengkah 5. Open the software project and make the necessary changes to the board_config.h file nurutkeun konfigurasi dewan(s) dipaké.
- Lengkah 6. Set the appropriate use case macro in st_iso_app.c file atawa nelepon kasus pamakéan diperlukeun ngagunakeun fungsi ST_ISO_APP_SelectUseCase dina main.c file babarengan jeung sagala fungsi nu dipikahoyong.
- Lengkah 7. Build the project to compile all files sarta beban kode disusun kana mémori dewan STM32 Nucleo urang.
- Lengkah 8. Run the code on the STM32 Nucleo board and verify the expected behavior.
Riwayat révisi
Méja 4. Sajarah révisi dokumén
| titimangsa | Révisi | Parobahan |
| 14-Mei-2025 | 1 | Pelepasan awal. |
PERHATOSAN PENTING – BACA TELITI
STMicroelectronics NV sareng anak perusahaanna ("ST") ngagaduhan hak pikeun ngarobih, koréksi, perbaikan, modifikasi, sareng perbaikan produk ST sareng / atanapi dokumen ieu iraha waé tanpa aya bewara. Purchasers kudu ménta inpo relevan panganyarna dina produk ST saméméh nempatkeun pesenan. Produk ST dijual dumasar kana sarat sareng kaayaan penjualan ST di tempat nalika pangakuan pesenan.
Purchasers téh solely jawab pilihan, seleksi, sarta pamakéan produk ST sarta ST nganggap euweuh liability pikeun bantuan aplikasi atawa desain produk purchasers '.
Henteu aya lisénsi, terang atanapi tersirat, kana hak cipta intelektual anu dipasihkeun ku ST di dieu.
Dijual deui produk ST kalayan katangtuan anu béda ti inpormasi anu dijelaskeun di dieu bakal ngabatalkeun jaminan anu dipasihkeun ku ST pikeun produk sapertos kitu.
ST jeung logo ST mangrupakeun mérek dagang ti ST. Pikeun émbaran tambahan ngeunaan mérek dagang ST, tingal www.st.com/trademarks. Sadaya nami produk atanapi jasa sanés mangrupikeun milik anu gaduhna.
Inpormasi dina dokumén ieu ngagentos sareng ngagentos inpormasi anu disayogikeun saacanna dina versi sateuacanna tina dokumén ieu.
© 2025 STMicroelectronics – Sadaya hak ditangtayungan
Dokumén / Sumberdaya
![]() |
STMicroelectronics UM3469 X-CUBE-ISO1 Ékspansi Software [pdf] Manual pamaké X-NUCLEO-ISO1A1, NUCLEO-G071RB, UM3469 X-CUBE-ISO1 Ékspansi Parangkat Lunak, UM3469, X-CUBE-ISO1 Ékspansi Parangkat Lunak, Ékspansi Parangkat Lunak |

