当前位置:网站首页>Arduino_ STM development record

Arduino_ STM development record

2022-06-11 07:27:00 Fantastical Yu ruiyin

Developed software

Arduino( No code completion , You need a connection to the related library to import the Library )
vscode-PlatformIO( Personal best recommendation , Most complete library , Code completion works best , But when importing the library, it occasionally appears BUG)
Stduino( Domestic software , The function of code completion is poor , And the import aspect of the library is not related BUG, But there are some problems in downloading the program BUG, To be updated )

Arduino-STM32 Libraries for development

LL library ( The way of development is in LL Based on the library , And in keil Use in HAL There is not much difference in the program of library development , And because of its higher encapsulation, it can greatly reduce the unpredictability of code BUG, This also means that the running efficiency of the program will be one level lower than that of register development )

Arduino-STM32 Development considerations

1、Arduino The program in the general default is UNO Waiting for the development board , Even if it is added in the description, you can give STM32 Use also requires reallocation of pins , because Arduino And STM32 There is a big difference in the pins of .
2、vscode-PlatformIO The quality of Libraries in is uneven , Some libraries are actually unusable , Testing is required before formal use , and Stduino Deleted vscode-PlatformIO Some libraries that cannot be used in .
3、Stduino It belongs to unofficial software , When a new version of the software appears , The old version will not work , If the library is modified in the program, it is better to back it up , Otherwise, it will be lost in the process of software update .

Arduino-STM32 Development

1、W5500 Module usage Library Ethernet3, Other libraries such as Ethernet2 There was no successful communication during the test , In addition to Ethernet3 Need to be practical SPI signal communication but W5500 Used by default in SPI The pin of is not suitable for STM32 Use , Need to be in W5500 Of SPI.begin() Previous calls should be reconfigured SPI The pin of .
2、 Timer interrupt use library STM32_TimerInterrupt, The library is bound TIM External interrupts implemented by .
3、FreeRTOS Use the library STM32duino FreeRTOS, The library is perfectly compatible with STM32, Note that it is best not to appear in tasks with higher priority 500ms The above delay function , Otherwise, tasks with lower priority will not be able to run .
4、 Serial communication generally does not need to add additional libraries , By default, the system is designed for STM32 The design of the HardwareSerial, Among them Serial2、Serial3 They're all default configurations STM32 Serial port pins commonly used in , If there is a problem of pin assignment conflict , You need to reconfigure the pins of the serial port , have access to HardwareSerial Re configure the pins .
5、SPI Communication uses the default library , But it is not specially designed for STM32 The design of the SPI Communication procedure , Those who use Arduino-STM32 Programming uses SPI communication , All need to be reallocated SPI The pin of .
6、LCD Screen drive , First, you need to find the correct model of the display , As long as it is not the new display vscode-PlatformIO The display driver can be found in , especially SPI The driven display is extremely easy to use .
7、 Download the program ,STM32 Download the program , The software generally defaults to stlink Download , For use STM32F103C8T6 Development like users are not very friendly good , If you need to use serial port to download software , It is best to install software Demonstrator GUI, Realization STM32 Program serial port download .

原网站

版权声明
本文为[Fantastical Yu ruiyin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020521151728.html