RN8209+stm32+spi communication always receives 0xff

Publisher:chunliLatest update time:2015-08-25 Source: eefocusKeywords:RN8209 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
We must develop the habit of summarizing in time! ! ! Leave behind important experiences!

Lesson for next time: Before making a finished board, it is recommended to make a demo board first. The bigger it is, the more time it saves. As long as it is within 10*10, it is the same price. But it must be the most complete version of this chip or function, and the interface must be reserved for debugging!

This time the rn8209-demo board:

1After the PCB layout is completed, you can add more interfaces.

2spi/serial port conversion switch

3 pulse output pins

Of course, unless you are very sure about this circuit, there is no need to make this demo board. ​

RT (as the title says), the information about RN8209 is very detailed, but there are only two programs. I encountered a problem during debugging and couldn't find the solution after searching for a long time. I always suspected that there was something wrong with the program, but there were no other ready-made programs to refer to. I had no choice but to find the problem bit by bit.

Finally, I found some other clues in a post I searched on Google:

Filter capacitor: existence is important, and value is also important http://xzpeter.org/?p=98

Following this life-saving straw, I debugged the hardware and suspected that the filter capacitor was too small and the voltage fluctuation was too large (the official user manual said that the fluctuation must be around +-30mv), causing the chip to not work. I used my hand to press the power supply pins of the chip, avcc and vss, dvcc and vss (the human body is a huge capacitor). It worked, and the chip ID returned 8209 when it was read! Victory! Then I moved my hand and pressed it on the chip, and it worked! ??? Then it was not a problem with the filter capacitor, but a cold solder joint! Finally found the problem!

It turned out that there was not enough solder on the new PCB board, and the chip pins were poorly soldered! The chip did not work at all! The program also ran normally!

Keywords:RN8209 Reference address:RN8209+stm32+spi communication always receives 0xff

Previous article:STM32 UID global unique identification code summary
Next article:Detailed description of the two pins BOOT0 and BOOT1 of the STM32 microcontroller

Recommended ReadingLatest update time:2024-11-23 11:22

The concept of dead zone in the advanced timer of STM32
The concept of "dead zone" PWM pulse width modulation is most commonly used in power electronics for rectification and inversion. This requires the use of rectifier bridges and inverter bridges. Taking two-level as an example, there are two power electronic devices, such as IGBTs, on each bridge arm. These two IGBTs c
[Microcontroller]
STM32 hardware SPI driver LCD example
Preface: Every time I learn a new knowledge, I will make a lot of mistakes. I can't find it even on Baidu, which takes a lot of time. The main reason is that I don't understand the underlying principles, don't have much time to understand, and am under pressure. As for SPI, everyone knows what it is used for. I don't
[Microcontroller]
STM32 IWDG settings
STM32 internal watchdog settings STM32 has two watchdogs, the one introduced here is the IWDG internal watchdog. Clock source: internal 40KHz clock, unrelated to system clock! As follows: The fsoc here is the real clock of IWDG! (IWDG_Prescaler_XX refers to XX division). IWDG reload value register: RLR is a 16-bit r
[Microcontroller]
STM32 serial port communication settings (query mode)
The first step is to configure the UART GPIO port void UART1_GPIO_Configuration(void) {     GPIO_InitTypeDef GPIO_InitStructure;     // Configure USART1_Tx as alternate push-pull     GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;     GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;     GPIO_InitStructure.GPIO_Mode
[Microcontroller]
STM32 Learning Notes ①-GPIO input, output, and detection
/**************************************************************************** * * File name: main.c * Description: This example demonstrates how to operate GPIO input and output. * By detecting the status of USER1 and USER2 buttons, different LEDs are lit and the key values ​​are output to serial port 1 * * Butt
[Microcontroller]
Configuration method of using printf to send data in STM32 serial communication
Development environment: Keil  RVMDK It is very convenient to use printf to send data in the STM32 serial communication program. However, there are always problems when using it for the first time. The most common problem is that the main function cannot be entered during hardware access. In fact, it only needs a sim
[Microcontroller]
Configuration method of using printf to send data in STM32 serial communication
STM32 window watchdog program
The window watchdog (WWDG) is often used to monitor software failures caused by external interference or unforeseen logic conditions that cause the application to deviate from the normal operating sequence. Unless the down counter value is refreshed before the T6 bit (the sixth bit of WWDG->CR) becomes 0, the watchdog
[Microcontroller]
STM32 window watchdog program
How to define variables in flash in stm32
Purpose: Define variables in flash Actually, writing this is just a record. Suddenly, I was working on the font display problem. I thought that if the font data is put in the memory, it will inevitably cause problems. It is better to put it in the flash so that it does not need to be changed. int a; a in memory cons
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号