FAQ of smart micro mm32f103

Time:2021-5-11

Smart microMm32f103 series products use 32-bit microcontroller with high-performance core m3, with typical working frequency up to 144mhz, built-in high-speed memory, rich enhanced I / O ports and peripherals connected to the external bus. Five packages are available, including   Lqfp100, lqfp64, lqfp48, lqfp32 and qfn32 are five packaging forms. According to different packaging forms, the configuration of peripherals in the device is different. The product is suitable for use in motor drive and application control, medical and handheld devices, industrial applications and alarm systems. The following is the answer to some frequently asked questions about mm32f103 products by Yingshang micro agent.

SPI
1. Which modes does SPI support
By transmission direction
1) Full duplex mode, sending and receiving data at the same time, enabling TX and Rx at the same time;
2) Half duplex, read and write in different time periods, disable RX when enable TX, disable TX when enable RX;
According to sampling time sequence
1) Mode 0, when idle, the clock is low, and the first clock is sampled along the edge;
2) In mode 1, the clock is low when idle, and the second clock is sampled along the edge;
3) In mode 2, when idle, the clock is high and the first clock is sampled along the edge;
4) In mode 3, when idle, the clock is high and the second clock is sampled along the edge;

2. What are the reasons for abnormal SPI host communication
Common causes:
1) If the configuration is not correct, there is no clock output;
2) The mode configuration is incorrect, which shows that the sampling point is inconsistent with the expectation (SPI)_ Cctl bit0 = 0 is the second clock edge sampling);
3) If the speed configuration is too fast, the waveform is abnormal;
4) The data bit configuration is inconsistent with device, which shows that the number of CLK is incorrect
5) The CS signal is incorrect, which shows that the CS signal does not correspond to the device timing;

What are the requirements of Vbat power access;
If there is no external battery in the application, it is recommended that Vbat be connected to VDD externally through a 100nF ceramic capacitor. If the external connection is battery, it is recommended to connect a low voltage drop diode between the external Vbat and the power supply to ensure no damage. If there is no external battery, even if the RTC function is not used, the Vbat needs to be powered;

Possible causes of Keil routine compilation failure
Common causes:
1) No compatible package of keil4 is installed. The software name is mdkcm516_ Legacysupportmdk4 (most problems)
2) The Keil project file was moved, so that the file with relative path could not be found
3) Program too large, more than flash orSRAMcapacity
terms of settlement
For the problems of 1 and 2, connect boot0 and boot1 to the high level, reset or power on again, and then read the ID. If the ID can be read, erase the program in this mode, and then connect boot0 and boot1 to the low level. At this time, the ID can be read.

Keil program compiled through, but failed to download the program
Common causes:
1) If the hardware circuit is not connected properly, check whether the debug tool is connected to JTAG or SWD in the board, and whether the chip idcode can be read.
2) If the debug tool can read the chip ID, but cannot download it, the reason is that the description model is not selected. The specific configuration selection is shown in the figure below.

FAQ of smart micro mm32f103

External high speed clock connection
The external passive crystal oscillator circuit is shown in the figure below. The two pins of the crystal oscillator are connected with about 22pf capacitor and 1m feedback resistor. Because there is no integrated feedback resistor in the chip, 1m ohm resistor must be connected to ensure XTAL vibration;

FAQ of smart micro mm32f103

Common causes of abnormal external clock
The running program usually uses the external high-speed clock as the system clock source, and sometimes the system clock exception will cause the program to stop running during debugging. The following are the possible reasons:
1) The external crystal oscillator has no feedback resistance, which leads to no stable clock input;
2) The range of external crystal oscillator is 8 ~ 24MHz;
3) Open circuit between crystal oscillator and chip pin;
4) Crystal quality problems lead to abnormal vibration;
5) Chip system clock configuration process error and so on