Design mm32f3277 micro Python experimental board with SD card

Zhuo Qing 2021-11-25 11:01:51
design mm32f3277 mm micro python

Jane Medium : This paper tests the results based on MM32F3277 Under the MicroPython Circuit board design . It includes SD Card interface , Common peripheral interfaces, etc . Verified the current transplant MicroPython The basic operation functions of files .

key word MM32F3277,MicroPython,SD card

 

§01 set up Background


One 、MM32F3277 MicroPython

utilize MicroPython Developing embedded systems , It increases the flexibility of development at the expense of certain performance .MicroPython Explain the execution code , The hardware differences of the embedded bottom layer can be shielded .

stay Production test MM32F3277-MicroPython Minimum circuit board Designed based on MM32F3277 Of MicroPython It's a test board . From smart (MindMotion) Of MM32F3277 With rich resources . After testing two different MicroPython Migration version of , Can run well .

The above two MicroPython Version of , All need the help of external SD Card to store the final execution MicroPython Program :main.py. There is no external SD In the case of cards , They can only pass through REPL (Read Evaluate Print Loop) Debug the program . This article will be in MM32F3277 Experiment board Add... To that SD Card interface part .

Two 、SD Card interface

1、SD Card socket

according to pyBoard v1.1-CN STM32F405RG MCU development board MicroPython Programming Configuration on board , It has been used. MICRO SD cassette Mini short TF cassette Memory card slot with detection pin 8P high H2.6/3.0MM . This kind of SD The card pack is available in three sizes :

  • Short body H2.6MM Without detection foot ;
  • Short body H3.0MM With detection feet ;
  • Short body H3.75MM With detection feet ;

▲ chart 1.2.1 Short body H2.6MM Size of card holder

▲ chart 1.2.1 Short body H2.6MM Size of card holder

2、SD Card interface

according to OneOS( From SeekFree) On the evaluation board SD Card interface design , To design based on MM32F3277 Of SD Card interface .

Because of the... On this motherboard SD The card is already The previous two versions MicroPython The verification obtained in .

▲ chart 1.2.2 SD Card interface definition

▲ chart 1.2.2 SD Card interface definition

According to the definition of card slot above , You can know SD The pin definition sequence of the card is shown in the following figure :

▲ chart 1.2.3 SD Pin sequence definition of card and card slot

▲ chart 1.2.3 SD Pin sequence definition of card and card slot

according to MM32F3277 User's Manual Definition of pins in , You can see ,SD The interface of the card uses MCU Of SDIO( Secure digital I / O interface ), compatible SD/SDIO/MMC Device controller , As an external control SD/SDIO/MMC Cartoon letter interface .

▲ chart 1.2.4 MM32F3277 Port function definition

▲ chart 1.2.4 MM32F3277 Port function definition

3、 ... and 、 establish AD Component library

According to the above SD Card slot data , stay AltumDesign Check the corresponding component library in . according to MICRO SD cassette Basic geometric parameters given on the web page , Design AD Component library in . The size of the fixed pad of the metal shell on both sides is unknown , Measure the specific size of each part through the picture .

1、 Device size

▲ chart 1.3.1 Measure the geometric position on the drawing

▲ chart 1.3.1 Measure the geometric position on the drawing

2、 Device packaging

PCB Package name :SD-H26MM
▲ chart 1.3.2 Component packaging

▲ chart 1.3.2 Component packaging

3、 Device schematic diagram

Schematic device name :MINI-SD

▲ chart 1.3.3 Schematic device definition

▲ chart 1.3.3 Schematic device definition

 

§02 set up Meter test


One 、 Design circuit board

stay MM32F3277 MicroPython Experimental board design and software testing On the basis of , increase SD Card seat circuit , Design test circuit .

1、 Schematic diagram

▲ chart 2.1.1 The circuit principle diagram

▲ chart 2.1.1 The circuit principle diagram
eee

2、 Fast plate making PCB

In order to fit A minute Plate making , The following designs are suitable for the production of single panel PCB.

▲ chart 2.1.2 Design fast plate making PCB

▲ chart 2.1.2 Design fast plate making PCB

3、 Solder circuit board

Here is a one minute plate making , Solder to form a test circuit board .

▲ chart 2.1.3 After one minute plate making , Solder to form a test circuit board

▲ chart 2.1.3 After one minute plate making , Solder to form a test circuit board

Two 、 Test circuit board

1、 Power on test

exert +5V Work point , Measure the... On the circuit board 3.3V Regulated output 3.3V. The static power consumption is about :6mA about .

2、 download MicroPython

Use MM32-LINK It will come from Su Yong MicroPython(2021-11-5 edition ) Download to MM32F3277 in .

▲ chart 2.2.1 download MicroPython The process

▲ chart 2.2.1 download MicroPython The process

3、 test MicroPython Whether the work

(1) Test the crystal signal

From Su Yong MicroPython Use an external crystal clock , So it should be possible to measure on the external crystal 8MHz Crystal oscillation signal .

▲ chart 2.2.2 Oscillation signal on external crystal

▲ chart 2.2.2 Oscillation signal on external crystal

(2) measurement REPL Power on serial port signal

because MicroPython After the start , Will be in REPL Port output version information , Therefore, it should be able to UART1 Of TX Measure the output signal .

▲ chart 2.2.3 After power on UART1 Of TX Measured output signal

▲ chart 2.2.3 After power on UART1 Of TX Measured output signal

(3) measurement REPL

Use STM32-Bootloader Connect to REPL port , test REPL Mutual operation .

▲ chart 2.2.4 stay STM32-BOOLOADER The received REPL Prompt

▲ chart 2.2.4 stay STM32-BOOLOADER The received REPL Prompt

3、 ... and 、 test SD card

1、 Store and read files

stay SD Pre stored in the card “test1.py” text file . And then in MicroPython To read .

The following is Su Yong's demonstration of the sample process of reading and writing files .

▲ chart 2.3.1 Demonstration example program given by Su Yong

▲ chart 2.3.1 Demonstration example program given by Su Yong

(1) The test program

from machine import Pin
import utime
with open('test.txt', 'w') as f:
f.write('Hello SD file.')
with open('test.txt', 'r') as f:
print(f.read())

(2) test result

Program download and execution process ,REPL The interface is as follows :

Reset MicroPython...
Wait for MicroPython come back...
Download MicroPython : 24 lines/576 characters.
Begin to download program...
-------------------------------------------------------------------------
14
Hello SD file.
>>>

Write... Is shown above SD file: 14 Bytes , Corresponding test.txt The length is 14. Then read the content and display it .

(3) stay Windows The read SD card

Use SD Reader writer , You can see SD There are just MicroPython Written file .

▲ chart 2.3.2 Windows Check out SD What's inside the card

▲ chart 2.3.2 Windows Check out SD What's inside the card

2、 Test other SD card

Use another one only 512MB Of SD card , Test in MicroPython Whether you can read the contents of the card .

▲ chart 2.3.3 Test one 512M Of SD card

▲ chart 2.3.3 Test one 512M Of SD card

Use the same procedure ,MicroPython Display the following information :

Reset MicroPython...
Wait for MicroPython come back...
Download MicroPython : 24 lines/576 characters.
Begin to download program...
-------------------------------------------------------------------------
Traceback (most recent call last):
File "<stdin>", line 13, in <module>
OSError: 19
>>>

3、 write in main.py

stay SD Storage main.py,MicroPython After power on, first execute main.py Program .

Here is main.py The content of the test :

from machine import Pin
import utime
for _ in range(10):
print(_)
utime.sleep_ms(100)

write in SD Kanazhong . take SD Card insertion test MicroPython Microplate :

▲ chart 2.3.4 stay SD The card stores main.py

▲ chart 2.3.4 stay SD The card stores main.py

After power on , Program output :

[Y] sdcard ready.
[Y] file system on sdcard ready.
[Y] run the main.py on disk ...
0
1
2
3
4
5
6
7
8
9
[Y] done. 1
MicroPython v1.16 on 2021-11-05; MB_F3270 with MM32F3277G7P
>>>

 

measuring Try to summarize ※


Ben This paper tests the results based on MM32F3277 Under the MicroPython Circuit board design . It includes SD Card interface , Common peripheral interfaces, etc . Verified the current transplant MicroPython The basic operation functions of files .


■ Links to related literature :

● Related chart Links :

The official account message

  • Xiao Chen wants to get a master's degree : Ask no questions , Smart cars this year 32 Are you going to omnidirectional beacon
    • author : Let's wait until tomorrow's meeting . Now the preliminary plan , Smart 32 Not used in beacons .
  • G·RID er·Skye. D : How about the performance , What basically landed is still c and cpp Well , A little chicken ribs , But be an introduction , Or do an algorithm verification , If you pursue performance , Or write honestly c Well
  • Poan : I've seen Mr. Zhuo make plates in one minute , I still remember . It is suggested that Mr. Zhuo make a video about one minute plate making / article
  • Yuanjie :micropy It's really friendly for novices , Maybe it's a new creative direction , A sound platform is needed for the platform BSP Support , Otherwise, you need to connect yourself c-module 了 , It's not very friendly to novices .
  • Hi : In pursuit of performance, you should write assembly directly
  • : Today's game rules , Let's start the video game slowly
  • MOS.2SC3306 : In pursuit of performance, you should write machine code directly
  • Power : What kind of product to use mcro Python Development ?
    • author : The competition system is made up of MicroPython Developed : https://zhuoqing.blog.csdn.net/article/details/116399989
  • To the drizzly evening rain : So will there be rules tomorrow ?
  • forward : It is suggested to expand CH32V103 Application scope of
  • Roll baked cakes, roll steamed bread, roll everything : Zhuo Da Which will be used for wireless charging this year MCU ah
    • Roll baked cakes, roll steamed bread, roll everything : And four wheelsets These two groups MCU Are you sure
  • Thousands of handrails :python Development is very good , But without the embedded soul ,python Language is also unfavorable to the cultivation of programming norms , If you want to stay in this business , I can't use it python
  • Amateur : Mr. Zhuo ,micropython and arduino What is the difference in development , Can you tell me something ?
    • author : The main difference :MicroPython Is an interpretation and execution language , There is no need to install special compilation environment and debugger during use , Only one serial port is needed for debugging , Debugging and development are very convenient , Relatively inefficient execution ;Arduino Is the compilation and execution language , During use, you need to install a special compilation environment and download ; Execution efficiency and C Language programming is the same .
  • dust : Will there be rules for the 17th session today
    • author : The third meeting will be held tomorrow morning 17 Enlarged meeting of the Organizing Committee of the th smart car competition . One of the topics is to discuss and determine the rules of the game .
    • dust : I still want to cooperate with more than four people
    • author : well .
  • GH : Mr. Zhuo , When will the drone go out
    • author : So far, there is no plan for unmanned aircrafts .
  • Chen Shaochang : Teacher Su Gongyu has been demonstrating , Today, I will learn more about Mr. Zhuo's official account. , Will also take my students about to do so . Development is becoming more and more convenient , I feel the progress of the times and the convenience of technology . Think back to the last century 80 In the s, compile the underlying program , Single task single environment , Not much memory is arranged by ourselves , a pile EPROM For debugging ,……, Professor Tong Shibai's inspirational class , Mr. Hu Dongcheng, who wears high myopia glasses, still remembers the first lesson of modeling electricity , be visible before the eyes ,… While lamenting the rapid development of technology , At the same time, I am constantly thinking , As a teacher of today's electronic technology course , What is unchangeable ? What should I teach the children ?
  • L Jianhao A kind of YH : The next one will do this , I really want to play . use c No layman can understand the language , use python It can also be loaded, and the program is more flexible .
  • Ye guanyong : First , Bare chips generally refer to cut die, You are using finished plastic packaging devices , Will this title cause misunderstanding , And then this PCB The design is really unspeakable
  • In the spring : Zhuo dada , There will be three cars this year
    • author : Right . The car model shall be self-made .
    • In the spring : Can there be five people in those three cars
  • HHW : Zhuo dada , There's still omnidirectional this year
  • West East . :mp The development method is absolutely the most friendly . It can be developed quickly , You don't need to know the bottom . Debug is convenient . It can quickly realize project functions . Although some performance is sacrificed , But the benefits outweigh the losses . At present, the library file is not as good as arduino Sufficient , Hope is growing
  • Mu Er Lei Zi : Is Infineon still used for the fourth round this year
  • Great Xia long : The key to this thing is to have a library , Otherwise, you can't meet your special needs
  • Red : My personal feeling , There's no need to separate it now C Language and microPython Which is better or worse? , Both sides have their own strengths , It will take time to test who is the one with more great vitality . Like I prefer to explore the principle ,C Closer to the underlying logic , It's easy to use , But there are also some people who pay more attention to results , Hope to use mpy Quick start , It's OK, too . But to tell you the truth, , As long as the structure and principle of computer composition have not made a major breakthrough , I don't think a better packaged language can fundamentally change .
  • Galaxy : Zhuo Da , I'd like to ask one 12V When the power supply supplies power to a switching power supply chip and a motor drive chip at the same time , How to determine the input capacitance here , Because both chips said to add their own specified capacitance
  • Boguan appointment : It is suggested to expand CH32V103 Application scope of
版权声明
本文为[Zhuo Qing]所创,转载请带上原文链接,感谢
https://pythonmana.com/2021/11/20211109010513840t.html

  1. Python basic syntax -- Boolean operation, break, continue, pass
  2. Python basic syntax -- loop
  3. Python first experience - efficient office, data analysis, crawler
  4. Modulenotfounderror: no module named 'Django summernote details
  5. Key points for Django to make personal blog website
  6. Path setting of templates in Django settings
  7. Leetcode 1611. Minimum one bit operations to make integers Zero (Python)
  8. Directory C: \ users \ a \ desktop \ Django_ The blog master is registered as the GIT root, but no git repository details are found there
  9. Django. Core. Exceptions. Improveconfigured: application labels aren't unique, duplicates: admin
  10. How to verify that Django has created the project details correctly
  11. How to create a database when using Django to construct a website
  12. The solution of using Django framework to create project in Windows system
  13. Running Python virtual environment on win10 system to execute ll_ Env \ scripts \ activate: unable to load file elaboration scheme
  14. Detailed explanation of constructing virtual environment with Django in Python 3
  15. Python implementation of affine cipher
  16. RC4 Python implementation
  17. Simple: Python_ Automatic body temperature clock
  18. 用python把两个csv中的日期的列提出年,做出新的一列,再把两个csv表格按照新做出的日期这列和ID号合并为一个表。
  19. python中类实例化后,其对象无法被其他模块调用方法
  20. [JSON] - Python creates JSON file format
  21. Utilisez Python pour proposer l'année de la colonne de date dans les deux CSV, faire une nouvelle colonne, puis combiner les deux tableaux CSV en un seul tableau avec la colonne de date et le numéro d'identification.
  22. 关于#python#的问题,请各位专家解答!
  23. ***
  24. ***
  25. 關於#python#的問題,請各比特專家解答!
  26. S'il vous plaît répondre aux questions de Python!
  27. About the import of Python class
  28. Magic Python property decorator: 1 line of code makes Python methods become properties in seconds
  29. Python 音频调整音量(附代码) | Python工具
  30. Python programming ideas [series of articles]
  31. Python crawler programming idea (67): modify nodes using pyquery
  32. Python crawler programming idea (66): using pyquery to obtain node information
  33. Python crawler programming idea (65): find nodes using pyquery
  34. Python crawler programming idea (64): using CSS selectors in pyquery
  35. Python crawler programming idea (63): basic knowledge of pyquery
  36. Python crawler programming idea (62): project practice: capturing cool dog online red song list
  37. Python crawler programming idea (61): project practice: capturing rental information
  38. Python crawler programming idea (60): get CSS selector code through browser
  39. Python爬虫编程思想(85):在Python中使用非关系型数据库
  40. Volume de réglage audio Python (avec Code) | outils Python
  41. Python crawler programming idea (59): get attribute value and text with beautiful soup CSS selector
  42. Python crawler programming idea (58): nested selection nodes with beautiful soup CSS selectors
  43. Python crawler programming idea (57): basic usage of CSS selector in beautiful soup
  44. Python crawler programming idea (56): find method of beautiful soup method selector
  45. Python crawler programming idea (55): find of beautiful soup method selector_ All method
  46. Python crawler programming idea (54): use beautiful soup to select sibling nodes
  47. Python crawler programming idea (53): use beautiful soup to select the parent node
  48. Django3.0 solves the problem of error reporting in reverse parsing
  49. Precautions for Python crawler
  50. Python 3 crawler series (1) -- climbing blind date websites
  51. Python到底是什么?为什么要学Python?
  52. #yyds干货盘点#Pandas数据清洗实用指南
  53. Python打包exe文件无法运行
  54. Two common ways to save files in Python
  55. #yyds幹貨盤點#Pandas數據清洗實用指南
  56. Yyds Dry Inventory pandas Data Cleaning Practical Guide
  57. PYTHON用LSTM长短期记忆神经网络的参数优化方法预测时间序列洗发水销售数据
  58. Python集成学习:自己编写构建AdaBoost分类模型可视化决策边界及sklearn包调用比较
  59. Python 3 makes a search software
  60. Python 3 simulated microblog login