run on mbed-os6.6.0
Num | SD Card pin | Module pin | Pin Name | Port Name | SPI |
---|---|---|---|---|---|
1 | CD/DAT3 | CS | D10 | PB6 | - |
2 | CMD/DI | SDI | D11 | PA_7 | MOSI |
3 | VSS1 | GND | GND | - | - |
4 | VDD | 3.3V | 3V3 | - | - |
5 | CLK | CLK | D13 | PA_5 | SCLK |
6 | VSS2 | GND | GND | - | - |
7 | DAT0/DO | SDO | D12 | PA_6 | MISO |
8 | DAT1 | - | - | - | - |
9 | DAT2 | - | - | - | - |
電源+/-を含め合計6本の結線で接続します。
Nucleoシリーズは、ボード上のLED(プログラムでLED1)がD13に接続されSPIモード設定時にSCLKとなる構成が多いので、LED1制御を止める必要があります。
For DISCO-F769NI
https://os.mbed.com/users/kenjiArai/code/DISCO-F769NI_BD_SD_Card_Control/
For DISCO-F469NI
https://os.mbed.com/users/kenjiArai/code/DISCO-F469NI_BD_SD_Card_Control/
FatFs_Mon/mon.h@6:7f8bc932cede, 2020-05-02 (annotated)
- Committer:
- kenjiArai
- Date:
- Sat May 02 03:44:56 2020 +0000
- Revision:
- 6:7f8bc932cede
- Parent:
- 4:6d6ea85642ed
- Child:
- 7:29fece78d927
updated os5. changed starting process(wait key input)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kenjiArai | 0:342895df3f8f | 1 | /* |
kenjiArai | 0:342895df3f8f | 2 | * mbed Application program for the mbed |
kenjiArai | 0:342895df3f8f | 3 | * FatFs Check program /monitor part |
kenjiArai | 0:342895df3f8f | 4 | * |
kenjiArai | 6:7f8bc932cede | 5 | * Copyright (c) 2015,'18,'19,'20 Kenji Arai / JH1PJL |
kenjiArai | 6:7f8bc932cede | 6 | * http://www7b.biglobe.ne.jp/~kenjia/ |
kenjiArai | 0:342895df3f8f | 7 | * https://os.mbed.com/users/kenjiArai/ |
kenjiArai | 0:342895df3f8f | 8 | * Created: May 5th, 2015 |
kenjiArai | 0:342895df3f8f | 9 | * Revised: June 14th, 2015 |
kenjiArai | 6:7f8bc932cede | 10 | * Revised: May 2nd, 2020 |
kenjiArai | 0:342895df3f8f | 11 | */ |
kenjiArai | 0:342895df3f8f | 12 | |
kenjiArai | 0:342895df3f8f | 13 | // Function prototypes -------------------------------------------------------- |
kenjiArai | 0:342895df3f8f | 14 | void mon(void); |
kenjiArai | 0:342895df3f8f | 15 | uint32_t get_disk_freespace(void); |
kenjiArai | 4:6d6ea85642ed | 16 | uint32_t get_data_file_size(const char *const file_name); |