LoginSignup
0
0

More than 3 years have passed since last update.

Zephyr > microSD + FatFs > SPI > Analog Discovery 2によるSPIロジックのキャプチャ結果

Last updated at Posted at 2019-12-29
動作環境
Ubuntu 18.04 LTS
ボード: STM32L476 Nucleo_64 (以下、STM32L476)
ボード: STM32F769 Discovery Kit (以下、STM32F769)
Zephyr 2.1.0-rc1
microSDモジュール: CK-40 (サンハヤト)
ロジック確認: Analog Discovery 2 (以下、AD2)

状況

  • samples/subsys/fs/fat_fsにあるサンプルを試している
  • A. STM32L476 + SPI1: 成功
  • B. STM32L476 + SPI2: 成功
  • C. STM32F769 + SPI2: 失敗

Cに関して、どこで失敗をしているのかを知るために、Bの成功例のキャプチャをここに残しておく。

接続

接続は以下に掲載したものと同じにしている。

AD2の設定

Mode:Recordにすることでとりこぼしをしないようにしておく。

サンプルプロジェクト

zephyr/samples/subsys/fs/fat_fsに対して、main.cの69行目 fs_mount()の結果確認でブレークポイントを設定した。

main.c
    if (res == FR_OK) {

resはfs_mount()の結果。
正常なら0となる。

キャプチャ > 文字

キャプチャした結果を文字におこした。

  • 1. 80クロック (8 x 10)
  • 2.
    • MOSI: 0x40 0x00 0x00 0x00 0x00 0x94 0xFF 0xFF 0xFF
    • MISO: 0x7F 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x01 0xFF
  • 3.
    • MOSI: 0x48 0x00 0x00 0x01 0xAA 0x86 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF
    • MISO: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x01 0x00 0x00 0x01 0xAA 0xFF
  • 4.
    • MOSI: 0x7B 0x00 0x00 0x00 0x01 0x82 0xFF 0xFF 0xFF
    • MISO: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x01 0xFF
  • 5.
    • MOSI: 0x77 0x00 0x00 0x00 0x00 0x64 0xFF 0xFF 0xFF
    • MISO: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x01 0xFF
  • 6.
    • MOSI: 0x69 0x40 0x00 0x00 0x00 0x76 0xFF 0xFF 0xFF 0x77
    • MISO: 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x01 0xFF 0xFF

キャプチャ > 画像

80クロック
Screenshot from 2019-12-29 10-32-12.png

0x40コマンド
Screenshot from 2019-12-29 10-28-01.png

0x48コマンド
Screenshot from 2019-12-29 10-28-49.png

0x7Bコマンド
Screenshot from 2019-12-29 10-29-08.png

0x77コマンド
Screenshot from 2019-12-29 10-29-22.png

0x69コマンド
Screenshot from 2019-12-29 10-29-34.png

関連

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0