Search found 5 matches

by tyguy2
Sat Aug 01, 2020 12:38 am
Forum: General discussion
Topic: Painfully slow SPI on STM32F405
Replies: 11
Views: 8361

Re: Painfully slow SPI on STM32F405

I finally found solution. After dive into CMSIS definitions of the core, and testing it on logic analyzer with STM32F401CC (84MHz) , i found that error was on my part, because in my case, i had CE not going high after transfer (i had some more stuff execution) , and in this case CE will go high whi...
by tyguy2
Fri Jul 31, 2020 11:25 pm
Forum: General discussion
Topic: Painfully slow SPI on STM32F405
Replies: 11
Views: 8361

Re: Painfully slow SPI on STM32F405

EDIT: Tried the above code, didn't work. What am I doing wrong? Well, I can't say what is wrong, that code worked for me. Only difference is that I called SPI.beginTransaction after SPI.begin in setup and I never used SPI.endTransaction. I use it to drive some 595 shift registers with stm32f103c8. ...
by tyguy2
Fri Jul 31, 2020 7:35 am
Forum: General discussion
Topic: Painfully slow SPI on STM32F405
Replies: 11
Views: 8361

Re: Painfully slow SPI on STM32F405

I'll do some more tinkering to see if that gets it working, but I think there's a bigger problem to tackle, and that's the bus speed. I did more probing, and found that the CS line on the chip is low for 5.27 microseconds. Since 24 bits are being sent over the bus in this 5.27 microseconds, I can ta...
by tyguy2
Fri Jul 31, 2020 5:36 am
Forum: General discussion
Topic: Painfully slow SPI on STM32F405
Replies: 11
Views: 8361

Re: Painfully slow SPI on STM32F405

So would this act as a direct replacement to SPI.transfer? I'm guessing I would still need to drive the Chip Select pin using either port manipulation or digitalWrite, correct? What about the SPIsettings I used previously? Would my code look like this now: #include <SPI.h> #define CS 7 int i = 0; vo...
by tyguy2
Thu Jul 30, 2020 7:14 pm
Forum: General discussion
Topic: Painfully slow SPI on STM32F405
Replies: 11
Views: 8361

Painfully slow SPI on STM32F405

Hello all! I've been working on building a project based on the Adafruit STM32F405 Feather Express. My main goal is to be able to control an 8 channel DAC, with each channel being able to put out at maximum a 4 kHz sawtooth wave independently of each other (i.e. channel 1 outputs a 255 Hz sawtooth, ...

Go to advanced search