[Rev 3] SPI Hardware NSS Pulse config issue
メンテナーはふだん 3 日以内に返信
@MasterUser43 がすでに取り組んでいます。
2026年8月5日 から。
評価
この issue はまだ評価されていません。
説明
Version/Project: Flight Computer rev3
Describe the bug
Currently, SPI1 (IMU) and SPI3 (LoRa) are configured in CubeMX to use Hardware NSS management.
Looking at main.c, this results in the following configurations:
hspi.Init.NSS = SPI_NSS_HARD_OUTPUT;hspi.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
Given LoRa and IMU approach to DMA w.r.t. how Chip Select is handled, current .ioc NSS Pulse Mode automatically drives the Chip Select line HIGH for one clock cycle between every single transmitted byte. Respective DMA implementations were intended to follow datasheet guidelines for each developed file:
- The LSM6DSV320X (IMU) datasheet requires CS to be held low for the entire duration of a multi-byte FIFO read.
- The RFM95 (LoRa) datasheet (Page 75) explicitly states: "The NSS pin goes low at the beginning of the frame and stays low between each byte."
Because of this hardware pulsing, we cannot use DMA to burst-read the IMU or LoRa FIFOs. The peripherals will see the CS pulse, assume the transaction was aborted, and return garbage data.
Luckily, this is an easy fix to be implemented/considered during integration phases of drivers. It is simple .ioc edit. Only holding off this personally b/c aforementioned integration concerns.
- Connectivity -> SPI1 and SPI3.
- Change Hardware NSS Signal to
Disable. - In the Pinout View, make physical pins currently assigned to the IMU and LoRa Chip Selects and change them to standard
GPIO_Output. - In System Core -> GPIO, configure these two pins as:
- Output Level: High (to keep the chips off at boot)
- Mode: Output Push Pull
- Pull-up/Pull-down: Pull-up
- Maximum output speed: Very High
This will return Init.NSS to SPI_NSS_SOFT in main.c, allowing driver callbacks (HAL_GPIO_WritePin) to properly hold the Chip Select low during multi-byte DMA transfers.
To Reproduce
Not applicable
Expected behavior
Prevent junk data from false Chip Select config
Screenshots/Pictures/Video
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Points of Contact
@MasterUser43
Add a tag for the component owners, leads, and/or a senior engineer to serve as primary point of contact.
- 主要言語
- C
- スター
- 8
- フォーク
- 6
- 平均マージ
- 5日 6時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SunDevilRocketry/Flight-Computer-Firmware のほかの issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
SunDevilRocketry/Flight-Computer-Firmware#347 ·
メンテナーはふだん 3 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
SunDevilRocketry/Flight-Computer-Firmware#339 ·
メンテナーはふだん 3 日以内に返信
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
SunDevilRocketry/Flight-Computer-Firmware#346 ·
メンテナーはふだん 3 日以内に返信
-
advanced documentation enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
SunDevilRocketry/Flight-Computer-Firmware#342 ·
メンテナーはふだん 3 日以内に返信
-
EPIC: v2.8.0 major refactors and breaking changes対応中かも @NArmistead が 5 日前に担当しました。 オープンadvanced Epic refactor
SunDevilRocketry/Flight-Computer-Firmware#341 · 担当者 2 名 ·
メンテナーはふだん 3 日以内に返信
SunDevilRocketry/Flight-Computer-Firmware の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
OpenPrinting/cups#1751 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
compile: jv_mem_calloc assertion abort after "too many function parameters" error in a nested function対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Policy query leaks host primary block (BSL_PrimaryBlock_deinit skipped) on two early-exit pathsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NASA-AMMOS/BSL#355 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
arancormonk/dsd-neo#660 ·
メンテナーはふだん 1 日以内に返信