1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Zephyr > microSD(SPIモード接続) + FAT > STM32L476で成功、STM32F769で失敗 > ロジックのモニタ

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

概要

  • STM32L476においてmicroSDでFAT読取りに成功 (ファイル名とディレクトリ)
    • samples/subsys/fs/fat_fs
  • STM32F769において同じプロジェクトは失敗する

両者の何が違うのか。
AD2を用いてロジックの確認をしている。

STM32L476での波形モニタ

  • SPI1で使用

Screenshot from 2019-12-23 20-34-32.png

Screenshot from 2019-12-23 20-34-41.png

Screenshot from 2019-12-23 20-34-51.png

Screenshot from 2019-12-23 20-35-00.png

Screenshot from 2019-12-23 20-35-51.png

Screenshot from 2019-12-23 20-36-00.png

Screenshot from 2019-12-23 20-36-12.png

Screenshot from 2019-12-23 20-36-35.png

Screenshot from 2019-12-23 20-36-46.png

疑問点

  • SPIモード開始用クロック(74クロック)がない

STM32F769のロジック

  • SPI2で使用
stm32f769i_disco.overlay
/*
2019-12-15
branched from [nrf52840_blip.overlay]
*/

/*
 * Copyright (c) 2019 Tavish Naruka <tavishnaruka@gmail.com>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

&spi2 {
        status = "okay";
        cs-gpios = <&gpioh 6 0>;

        sdhc0: sdhc@0 {
                compatible = "zephyr,mmc-spi-slot";
                reg = <0>;
                status = "okay";
                label = "SDHC0";
                spi-max-frequency = <24000000>;
        };
};

Screenshot from 2019-12-23 21-05-58.png

Screenshot from 2019-12-23 21-06-08.png

Screenshot from 2019-12-23 21-06-22.png

Screenshot from 2019-12-23 21-06-30.png

Screenshot from 2019-12-23 21-06-41.png

備考

  • STM32F769のロジックの方はSPIモード開始の74クロックがある
  • STM32F476とのロジックとは根本的に違う
  • STM32F769の処理は途中で失敗している

gdbで確認中であるが、STM32F769はdisk_spi_sdhc_access_init()からコールされるsdhc_spi_detect()にて失敗しているようだ。

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?