Search found 730 matches

by stevestrong
Tue Mar 28, 2017 9:04 am
Forum: Maple mini
Topic: How to witch from HardwareSPI lib to SPI lib ?
Replies: 5
Views: 41

Re: How to witch from HardwareSPI lib to SPI lib ?

I would rather use the simplified form:

Code: Select all

spi.beginTransaction(SPISettings(1000000, SPI_MODE3, LSBFIRST));

Here you can use the frequency in clear text, so don't bother with dividers. I used 1 MHZ in the example above, but you can use any other value you want.
by stevestrong
Tue Mar 28, 2017 8:54 am
Forum: IDE's
Topic: STM32F103C won't retain program, is it loading into RAM
Replies: 10
Views: 86

Re: STM32F103C won't retain program, is it loading into RAM

//+++++++++++++++++++++++++++++++++++++++++++++++++setup++++++++++++++++++++++++++++++ void setup() { for(int i=0;i<=31;i++) { pinMode(i,PWM); pwmWrite(i,0); } }//------------------end of setup-------------- This is a very dangerous setup of the GPIOs, you overwrite the basic functions of the pins,...
by stevestrong
Mon Mar 27, 2017 8:35 am
Forum: Libraries & Hardware
Topic: Bluepill and PB1
Replies: 5
Views: 86

Re: Bluepill and PB1

You didn't say first for which board was the extract.

But now it is clear, and I think you are right, it should be added for generic C8.
Prepare a PR and post it.
by stevestrong
Mon Mar 27, 2017 8:29 am
Forum: IDE's
Topic: STM32F103C won't retain program, is it loading into RAM
Replies: 10
Views: 86

Re: STM32F103C won't retain program, is it loading into RAM

The serial map depends on the upload method as following: [*] bootloader & st-link: Serial = USBSerial Serial1 = USART1 Serial2 = USART2 Serial3 = USART3 [*] serial: Serial = USART1 Serial1 = USART2 Serial2 = USART3 See http://www.stm32duino.com/viewtopic.php?f=28&t=1915&p=25462#p25373.
by stevestrong
Mon Mar 27, 2017 8:25 am
Forum: Libraries & Hardware
Topic: Bluepill and PB1
Replies: 5
Views: 86

Re: Bluepill and PB1

One of the reasons is that on the maple mini clone board PB1 is the LED pin, and it is not available on the board pins.
by stevestrong
Fri Mar 24, 2017 6:36 pm
Forum: Projects
Topic: STM32F103 minimal synth
Replies: 15
Views: 191

Re: STM32F103 minimal synth

Isn't actually Tone lib better suited?
by stevestrong
Fri Mar 24, 2017 10:30 am
Forum: Generic STM32F103
Topic: RF24 Library on hardware SPI2
Replies: 8
Views: 116

Re: RF24 Library on hardware SPI2

To use SPI2, you should declare in RF24_STM.cpp:

Code: Select all

SPIClass SPI_2(2);

and replace all SPI instances by SPI_2.
by stevestrong
Tue Mar 21, 2017 1:49 pm
Forum: General discussion
Topic: SPI Pin mapping????
Replies: 4
Views: 55

Re: SPI Pin mapping????

Add

Code: Select all

#include "libmaple/gpio.h"
...
afio_remap(AFIO_REMAP_SPI1);

in setup before generating anything on other GPIO.
by stevestrong
Tue Mar 21, 2017 1:30 pm
Forum: General discussion
Topic: SPI Pin mapping????
Replies: 4
Views: 55

Re: SPI Pin mapping????

Nutsy wrote:SPI1 can be on 2 sets of pins 4 5 6 7 or 17 18 19 20...
Is this true?

Yes, see chapter 9.3.10 of RM0008.

Go to advanced search