摘要
为解决实时操作系统μC/OS-Ⅱ串口通信设计中信号量、消息邮箱使用方法的问题,提出了一种以STM32V评估板为硬件平台和μC/OS-Ⅱ的串口通信程序设计方案。该方案采用Cortex-M3架构的ARM处理器STM32F103VB作为主控制芯片,ST3232作为串口通信电平转换器。软件设计部分描述了信号量、消息邮箱的应用场合和基本操作方法,通过信号量和消息邮箱的配合使用保证任务间的数据传输的同步性。给出了整个程序中的设计思路,程序开发使用STM32F103VB处理器自带的固件库,减少了繁琐的寄存器配置,降低了程序开发强度。实验验证了在2种不用通信速率下数据传输具有误码率低、传输稳定可靠的特点,并且若能够配合相应的数据校验算法就可将其应用于工业现场的数据通信。
To solve the problem of real-time operating system μC/OS-Ⅱ that how to use semaphores and message mailboxes in serial interface communieation,a hardware platform based on STM32V evaluation board and μC/OS-Ⅱ the serial interface communication program design is presented.The program uses the ARM Cortex-M3 processor architecture STM32F103VB as the main control chip,using the chip ST3232 to complete the level conversion serial interface communication.The applications and basic operation method of semaphores and message mailboxes are described in the part of software design,through semaphores with message mailboxes use together to ensure the synchronization of data transfer between tasks.The paper gives the whole process of design ideas,the development process used STM32F103VB processor comes with firmware library,which reduces the red tape of register configuration and the intensity of program development.Finally,experiments in the two different communicate data with bit error rates low,stable and reliable transmission characteristics,and if the corresponding data are compatible with the validation algorithm, this design can be used in industrial field of data communication.
出处
《电子设计工程》
2011年第1期42-46,共5页
Electronic Design Engineering