Commit Graph

41 Commits

Author SHA1 Message Date
stevstrong 0db43ae36f SPI clean up + add 16 bit access functions in 8 bit mode 2017-07-28 17:51:54 +02:00
victorpv 910072c7db Changes tabs for spaces. 2017-07-10 12:08:59 -05:00
victorpv b892004cc2 Add files via upload 2017-07-10 12:00:29 -05:00
Roger Clark 0444a36527 Added an additional SPI API function dmaSendAsync which will start the a DMA send of a buffer and return immediately. The next time dmaSendAsync is called it waits if the previous transfer is not complete. Note the buffer is not copied, so ddouble buffering is needed to use this function 2017-06-11 15:35:14 +10:00
stevstrong f1608abe0b SPI update
- cleaned up commented out lines
- run-time optimized write and transfer functions
- run-time optimized non-DMA block read routine
- function call order within DMA routines tied to F4 structure - in line
with AN4031, chapter 4.3
- reworked send functions (currently not used, deprecated, but still)
2017-05-22 21:09:12 +02:00
stevstrong fb823b6929 remove unused code & bugfixes
- setDataSize shall first disable the SPI before writing new value
- dmaTransfer adapted for TFT library usage
2016-12-26 15:26:51 +01:00
stevstrong e7456e1916 further optimizations
- extend read function to 16bit
- add repeated write the same byte/word a specified number of time
- revert increment option to dmaSend
2016-12-10 22:36:21 +01:00
stevstrong b2e349ca36 Revert "Revert "improve SPI low level functions""
This reverts commit 3469ef291b.
2016-11-11 22:12:13 +01:00
stevstrong 3469ef291b Revert "improve SPI low level functions"
This reverts commit 5db2523284.
2016-11-11 22:04:16 +01:00
stevstrong 5db2523284 improve SPI low level functions
- optimize code and run-time
2016-10-31 22:29:40 +01:00
Roger Clark e1e2cac780 renamed 16 bit version of transfer() to transfer16() as per the Arduino API 2016-10-16 13:34:09 +11:00
stevstrong a079114bdc added transaction in slave mode, and 16 bit data transfer 2016-07-26 20:36:39 +02:00
stevstrong efbbe6a4be Merge remote-tracking branch 'refs/remotes/rogerclarkmelbourne/master' 2016-07-25 23:22:02 +02:00
Roger Clark 76157ad751 Updated 'category' in library.properties files, to shop the IDE complaining that this key is missing 2016-05-03 20:44:18 +10:00
stevstrong 9fe188a901 added SPI data size management to allow true 16 bit transfer 2015-12-26 18:39:28 +01:00
stevstrong 4932a309f2 reworked update SPI settings
remove entirely the disturbing glitches on SCK line
2015-12-06 16:15:00 +01:00
Jean-Claude Wippler 91014b40a8 fixes #125 2015-11-05 16:27:24 +01:00
stevstrong b81d7b7334 removed unwanted dashes which caused compiling error 2015-11-04 08:08:21 +01:00
stevstrong 3ef9112870 additional function updateSettings() to replace the call to begin().
removes unwanted glitches before getting SCK active caused by setting parameters after begin().
2015-10-26 12:58:22 +01:00
stevstrong f87b4adda8 additional function updateSettings() to replace the call to begin().
removes unwanted glitches before getting SCK active caused by setting parameters after begin().
2015-10-26 12:52:45 +01:00
stevstrong 37fbb642ea added part from SD fat lib which enables SPI 2 device write access
taken from SdSpiSTM32F1.cpp - Victor's lib, and adapted to support device selection.
To be checked with other libs which are using the SPI lib.
2015-10-26 11:36:24 +01:00
rogerclarkmelbourne 536cec8f5d Various changes to boards.txt and some libraries, so that things will compile under IDE 1.6.6 Note. There are still loads of warnings when you compile - which look like they may be caused by the IDE using a new version of GCC, but at least it now compiles 2015-10-09 17:18:38 +11:00
Roger Clark 0ec837f08c Fix for uninitialised vars in dmaTransfer and dmaSend (as detailed by victor_pv) 2015-07-28 12:00:16 +10:00
Roger Clark 07ba8f279a Updaded SPI with update from VictorPV 2015-07-26 04:58:12 +10:00
Roger Clark fc50831843 Continued with SPI setModule - still doesnt work when I tried setModule(2); 2015-07-08 11:14:57 +10:00
Roger Clark 20a9214291 Some fixes. Works for SD example SPI 1, not tested with anything else. setModule not tested 2015-07-07 20:59:33 +10:00
Roger Clark 2e13a1d57e Initial attempt at SPI setModule - but it doesn't seem to work for SPI2 etc, even when not using setModule to select the SPI channel, when I tested with a VS1053 board attached to SPI2 and SD on SPI1 2015-07-07 07:27:09 +10:00
Roger Clark 501da92986 Added a line in SPI.cpp to default the bitOrder to MSBFIRST 2015-06-25 09:36:23 +10:00
rogerclarkmelbourne 7d7f113f63 improved vasillis's SPI 2 demo 2015-06-12 09:49:00 +10:00
Vassilis Serasidis 1a676200f7 Example of using the SPI_1 and SPI_2 ports on STM32F103. 2015-06-11 15:01:45 +03:00
Roger Clark 657d6dae02 Alternative / better fix provided by @pico based on work by @victor_pv. Commented out AF REMAP of NSS in spi_f1.c 2015-06-10 10:33:13 +10:00
rogerclarkmelbourne ece9c3681d Added code to 'get' the gpio mode of a pin, and have used it in SPIClass::begin() to store and reinstate the pin mode of the SPI NSS pin. This is a work around for 'features' in the STM32 silicon, which seem to change the GPIO mode of the SPI NSS (hardware - 'Software Select' pin) 2015-06-10 10:25:22 +10:00
Roger Clark 2797907221 Added support for SPI 2 to VS1003 library, and made a change to SPI to support other libs being able to select which SPI they want to use (issue with const in transfer() 2015-06-06 07:46:42 +10:00
victorpv d165e4d013 SPI updated to eliminate warnings
The same write function works for both 8bit and 16bit transfers, so
eliminated the 8bit one and that takes out warnings when the compiler is
not sure of the width. Tested with both ILI libraries (_STM and not STM)
2015-05-27 20:16:15 -05:00
victorpv e13b9a0709 SPI DMA functions.
Adds 6 new functions: DMA Transfer, DMA 8bit send, DMA 16bit send, write
16 bit int. and mode change to change between 8bit and 16 bit transfer.
2015-05-21 22:35:40 -05:00
Roger Clark 664e1c88ac Second attempt at SPI::DMATransfer. Now uses separate tx and rx buffers, and I also added code to wait for tx to complete and SPI to not be busy before exiting the function. Note. Operation of rx buffer has not been tested 2015-03-30 06:47:26 +11:00
Roger Clark 5f9e8a04dd Added first pas at SPI::DMATransfer(byte *buf, int length) - and updated ILI9341 lib to use DMA Transfer for fill rect 2015-03-30 03:31:41 +11:00
Roger Clark e9f67b2f63 Added accessor function for the spi device to spi.h 2015-03-18 20:32:56 +11:00
Roger Clark ac742edbd7 Improved speed of SPI::write(byte) 2015-03-06 22:40:53 +11:00
Roger Clark 29ddd3beef Update SPI library properties file to fix issue caused by changing folder namne from STM32F1XX to STM32F1 2015-02-26 07:45:16 +11:00
Roger Clark 5f83c13285 renamed top level folder STM32F1XX to STM32F1 to correspond to other top level folder names e.g. STM32F3 and STM32F4 2015-02-24 20:13:04 +11:00