[Rev 3] SPI Hardware NSS Pulse config issue
I maintainer di solito rispondono entro 2 giorni
@MasterUser43 ci sta già lavorando.
Dal 5/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- C
- Stelle
- 8
- Fork
- 6
- Merge medio
- 2g 17h
- PR unite (30g)
- 8
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SunDevilRocketry/Flight-Computer-Firmware
-
Sensor: Set magnetometer ODR to 30 HzForse già presa @NArmistead l’ha presa 5 giorni fa. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
SunDevilRocketry/Flight-Computer-Firmware#347 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
SunDevilRocketry/Flight-Computer-Firmware#346 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
SQA: Define high priority files with low-level requirements and higher coverage requirementForse già presa @ETSells l’ha presa 7 giorni fa. Apertaadvanced documentation enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
SunDevilRocketry/Flight-Computer-Firmware#342 · 1 assegnatario ·
I maintainer di solito rispondono entro 2 giorni
-
EPIC: v2.8.0 major refactors and breaking changesForse già presa @NArmistead l’ha presa 13 giorni fa. Apertaadvanced Epic refactor
SunDevilRocketry/Flight-Computer-Firmware#341 · 2 assegnatari ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
SunDevilRocketry/Flight-Computer-Firmware#327 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di SunDevilRocketry/Flight-Computer-Firmware
Issue simili
-
[raylib] update to 6.2Apertacategory:port-update
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 8 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
native-cpu: -Wreturn-type in skainet_row_threads.c:150 (worker fn has no return)Forse già presa @Doomguy-BFG9000 l’ha presa oggi. Apertagood first issue size:xs skill:native
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
SKaiNET-developers/SKaiNET#1358 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno