cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RG Nucleo-64 SPI Transmission Problem

Stm325
Associate III

Hi, ı am trying to send some buffered data via SPI but it doesnt work. PA5-6-7 are automatically set by SPI and I also enabled PB6 for CS. Normally my algorithm needs to:

1) Send 3 HF pulses to low and start interleaved ADC simultaneously.

2) Take 1400 samples by DMA ADC(ADC Buf is 700 but it is interleaved so 1400 samples)

3) Buffer this data and when DMA finishes, send it via SPI DMA

4) Wait around 40ms and repeat

 

You can find my main.c below.

Also in logic analyzer that ı set for spi, I can kind of see the pulses but they and also CS pin are very unstable.

Stm325_0-1750272066314.png

 

1 REPLY 1
Stm325
Associate III

Update: I was running spi at 10MHz to be able to measure logic pins(Analyzer can go 24Msps max). When I took SPI to 20MHz, the CS line is stable but there is a chance that I am not able to capture it because of insufficient Msps.

This is the data to be sent from spi(3 Pulses):

Stm325_0-1750275621358.png

This is its SPI transmission:

Stm325_1-1750275650140.png

Is there a way to plot the data being sent because I am not sure if this is correct.