Search found 866 matches

by Pito
Sun Apr 30, 2017 10:37 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

SPI always sends and receives in parallel.
by Pito
Sun Apr 30, 2017 10:27 pm
Forum: Cores
Topic: STM32GENERIC, my arduino implementation
Replies: 136
Views: 1469

Re: STM32GENERIC, my arduino implementation

You must compile and flash a sketch with SerialUSB.begin(); SerialUSB.println("Hello");, then it enumerates..
by Pito
Sun Apr 30, 2017 5:40 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

SdCard latencies - you can check the latencies with SDbench. As the micros() work well today you will see the numbers - maxLatency, min, average, while you write/read say a 5MB large file. The bigger file you write the longest latencies you may encounter. The Write latencies are huge, as the Sdcard ...
by Pito
Sun Apr 30, 2017 3:54 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

My wav player only reads, I don't think there is much latency in reads, right? Write latencies with SDcards are huge, 5-250ms, typically 3-50ms all the time, random occurrence.. With my above experiments I did not touch the SdFat's SdSpiSTM32F1 driver file (even I've spent few hours with it..). I s...
by Pito
Sun Apr 30, 2017 2:40 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

If the sdfat library was modified to switch thread for a ms when waiting due to latency I would guess that could give another good chunk of cpu time back to sketches that write. My wav player only reads, I don't think there is much latency in reads, right? Do you need to test SDBench on F1? I can d...
by Pito
Sun Apr 30, 2017 2:13 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

@victor, OK, changed here, and it works. Updated above chart as the read speed is much higher now :) +20%
BTW what is the MINC=1 in
SPI.dmaSend(const_cast<uint8_t*>(buf), n, 1);

Memory Increment??
by Pito
Sun Apr 30, 2017 1:31 pm
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

I updated the results.. About 2x faster wr/rd. Yes, we need the NULL buffer :) This is a F407 SDbench measurement (168MHz, BlackZE) for record - SPI1 freq vs. rdwr speed (Sammy EVO 8GB, CL10), SdFatEX, buffer size 512bytes: SPI vs rdwr speed.JPG The size of the buffer has minimal impact on the DMA s...
by Pito
Sun Apr 30, 2017 11:05 am
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

21Mb / 8977.136uS / 3127.777uS The theoretical DMA transfer time for an 8192 bytes large buffer at 21MHz SPI speed is 3120.762uS :) Hmm, I want as a test, to replace the receive in SdFat's SdSPiDriver.h with dmaTransfer uint8_t receive(uint8_t* buf, size_t n) { SPI.dmaTransfer( buf, buf, n); // SPI...
by Pito
Sun Apr 30, 2017 12:26 am
Forum: Generic bootloader
Topic: Linux: flashing own STM32F103C8T6 generic USB bootloader not much luck
Replies: 12
Views: 108

Re: Linux: flashing own STM32F103C8T6 generic USB bootloader not much luck

There is a binary for bootloader with 12MHz Xtal - try it
#elif defined TARGET_STBEE
https://github.com/rogerclarkmelbourne/ ... 1/binaries
by Pito
Sun Apr 30, 2017 12:06 am
Forum: CubeMX and HAL
Topic: [STM32GENERIC] SPI DMA
Replies: 29
Views: 209

Re: [STM32GENERIC] SPI DMA

This is a F407 SDbench measurement (168MHz, BlackZE) for record - SPI1 freq vs. rdwr speed (Sammy EVO 8GB, CL10), SdFatEX, buff size 512b: SPI no DMA rdwr speed.JPG Double-checked the SPI clocks with LA. PS: I think this in SPI.cpp if (settings.clock > apb_freq / 2) { spiHandle.Init.BaudRatePrescale...

Go to advanced search