Crazyflie2 can finally connect to the PC client, crazyflie2client
Today, I finally successfully connected to the crazyflie PC client. Many bugs have been fixed along the way. The following summarizes the difficulties:
1. Welding Problems
When welding, you must add more soldering tin to prevent virtual soldering. Do not reduce soldering tin to make it beautiful. Otherwise, there will be many virtual soldering pins, wasting debugging time.
2. Download the program
When I first started using jlink for download, I found that jlink does not have good support through the official makefile file. By default, I used st-link v2. Fortunately, I bought a STM32F4DISCOVERY board, the above comes with the st-link v2 simulator, so we started to download it. The STM32F4DISCOVERY just reserved the SWD pin, So we connected the line with the dubang line. Note that the line must be correctly connected:
(1) download 2 3 4 pins of the SWD pin on the STM32F4DISCOVERY board.
(2) download the stm32f405RG and use the 2, 4, 5, and 6 pins of the SWD pin on the STM32F4DISCOVERY board. That is to say, neither of them will use one pin.
3. The EEPROM cannot read data.
According to the official EEPROM driver, I transplanted it to a simple bare metal program and tested MPU9250 and EEPROM. MPU9250 can work well, but the EEPROM can never read data, which is strange, later it was found that it was caused by the absence of a pulling resistance between the SCL and SDA. After adding a 1 K pulling resistance, it could work normally.
4. The connection status of the PC client is not visible because crazyflieradio cannot receive the wireless data sent by nrf51822.
First, it proves that there is no problem to connect the stm32 to the nrf51822 through the serial port. carefully measure the Three pins of the uart, there is no problem, and then modify the nrf51822 program. When receiving the data sent by the stm32, the Blue LED flash is controlled by the nrf51822. After the proof is obtained, the wireless transmission circuit is used. First, the BALUN chip is displayed. After comparing it with the JTI_2450BM15A0002 datasheet, in datasheet, pin 5 is GND, while the principle picture is DC, which is connected to VDD_PA. Therefore, VDD_PA is always low, which leads to the failure of sending nrf51822, which is a difficult bug.
The figure below shows the original method. If the BALUN chip JTI_2450BM15A0002 is used, the 5-pin grounding is required.
A total of two boards were welded. The first board burned out the circuit of the power source and STM32 due to improper power supply. The second board was normal, indicating a souvenir:
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.