Search found 26 matches

by Signal32
Tue Sep 13, 2016 5:53 am
Forum: STM32F103 Boards
Topic: Can't toggle PA15 ?
Replies: 6
Views: 1272

Re: Can't toggle PA15 ?

It's alive! Thanks. // Timer 2 partial remapping 1 (CH1 and ETR on PA15, CH2 on PB3, CH3 on PA2, CH4 on PA3) afio_remap(AFIO_REMAP_TIM2_PARTIAL_1); // Set PA15 as PWM pinMode(PA15, PWM); // By default PA0 is mapped to TIM2_CH1_ETR. After remap, TIM2_CH1_ETR is on PA15 // So we have to pwmWrite to PA...
by Signal32
Mon Sep 12, 2016 7:47 am
Forum: STM32F103 Boards
Topic: Can't toggle PA15 ?
Replies: 6
Views: 1272

Re: Can't toggle PA15 ?

I understad, I saw a timer entry under "Remap" in the datasheet and assumed that it would work.

Image

Is there any way to have PWM on PA15 ?
by Signal32
Mon Sep 12, 2016 7:13 am
Forum: STM32F103 Boards
Topic: Can't toggle PA15 ?
Replies: 6
Views: 1272

Re: Can't toggle PA15 ?

Thanks! That did it.
EDIT: Follow up question, is PA15 not a PWM pin ? digitalWrite is working on it but "analogWrite(PA15, 255);" does not work.
by Signal32
Mon Sep 12, 2016 12:08 am
Forum: STM32F103 Boards
Topic: Can't toggle PA15 ?
Replies: 6
Views: 1272

Can't toggle PA15 ?

Hello, I have the following code #define pin PA15 void setup() {} void loop() { pinMode(pin, OUTPUT); digitalWrite(pin, LOW); delay(1); digitalWrite(pin, HIGH); delay(1); } I've tried running it on a Baite Maple Mini clone and on a custom STM32F103T8U6 board with the same result : PA15 remains perma...
by Signal32
Sat Sep 10, 2016 4:35 pm
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

Double check what the datasheet says - page 11 - reading the temperature.. I do understand that. However, the way that I approached this issue is not "what is the correct protocol for talking to a DS1624" but "Why is the same code generating different behavior on Arduino vs on STM32". I was more in...
by Signal32
Sat Sep 10, 2016 8:18 am
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

Found the issue. It was not the initialization sequence. There seems to be a bug in the wire code ... perhaps ? The following code is the one that has the issue: Wire.beginTransmission(0x4F); Wire.write(0xAA); Wire.requestFrom(0x4F, 2); tempmsb = Wire.read(); templsb = Wire.read(); Wire.endTransmiss...
by Signal32
Tue Sep 06, 2016 7:15 am
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

When the readings are identical, the difference can only be the interpretation of the read data, just like edogaldo said. Endianess? What I meant to say is that - on the Arduino :Reading1 is 25.5 Reading2 is 25.8 Reading3 is 26.0 ...... - on the STM32: :Reading1 is 0xFF80 Reading2 is 0xFF80 Reading...
by Signal32
Tue Sep 06, 2016 7:05 am
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

please print out on both platforms (AVR and STM32) the MSB and LSB values separately. I suspect the error here. I can see the data on the scope + logic analyzer traces. On the Arduino the data looks valid (it changes with the temperature). Plus the temperature is displayed correctly ( around 25C at...
by Signal32
Tue Sep 06, 2016 3:52 am
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

your #define wire hwire is really odd. in the i2c library folder there are two example codes one for hwire and one for softwire you should have a look at them. The hwire define is not active, I removed it and did more tests, same result. I also tried with a baite maple mini clone with same result, ...
by Signal32
Mon Sep 05, 2016 4:04 pm
Forum: STM32F103 Boards
Topic: I2C Issues with STM32F103
Replies: 25
Views: 3977

Re: I2C Issues with STM32F103

I'll give the maple mini clone a shot. As for the LED, that's not the issue. I'm sure that's the #ifdef __STM32F1__ is taken (i inserted random text inside to see if it causes errors) plus I've tried several variants without LED code and without serial. If I do a loop of InitDS1624, the spikes are i...