Search found 862 matches

by Rick Kimball
Sun Jun 25, 2017 3:29 pm
Forum: STM Nucleo boards
Topic: STM Nucleo F103RB - please read the docs!
Replies: 17
Views: 4475

Re: STM Nucleo F103RB - please read the docs!

I know this is an old topic, however I just had to deal with this type of issue with an older NUCLEO-STM32F030R8 board. It doesn't provide an external XTAL and I wanted to get an accurate clock. To achieve this without an external XTAL, you can change some solder bridges and get an accurate 8MHz clo...
by Rick Kimball
Sun Jun 25, 2017 3:01 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

GianniDPC wrote:
Sun Jun 25, 2017 2:52 pm
Thanks for pointing that out! I'm really stupid doing things before even reading through the data sheet. At least everything still works and I didn't see any smoke haha.
That's what people from the 60's said about LSD :) Just wait ...
by Rick Kimball
Sun Jun 25, 2017 2:28 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

If they are 5V tolerant (remember the STM32F103 is a 3.3V device, not a 5V one), then they will stay at the maximum value, and when you rotate the wiper back towards gnd, the value will start to drop again. If they are not 5V tolerant, there will be a lot of heat, perhaps some smoke, and you will e...
by Rick Kimball
Sun Jun 25, 2017 2:21 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

But when I disconnect the 5V from A0 and connect it to A1 the serial monitor still shows me the same result so 4095. I don't expect this as I defined A0 as my analog pin in the code and not A1. Also, you shouldn't be connecting 5v to any analog pin. When used as an analog input the max voltage is 3...
by Rick Kimball
Sun Jun 25, 2017 1:35 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

I'm pretty sure you should be using A0 not 0 and A1 not 1, that is how I have been testing. Otherwise it isn't going to do the right thing: Read A0: void setup() { Serial.begin(9600); analogReadResolution(12); } void loop() { long sensorValue = analogRead(A0); Serial.println(sensorValue); } Read A1:...
by Rick Kimball
Sun Jun 25, 2017 1:01 pm
Forum: STM Core
Topic: Using Scheduler Library
Replies: 9
Views: 117

Re: Using Scheduler Library

... I'm not sure if the code as written is enough to support a cortex-m4 chip that has hardware floating point enabled. You might have to push and pop those registers too. I haven't dug in as I don't have any stm32 f4 supported boards. ... Looking at some FreeRTOS code it seems to make provisions f...
by Rick Kimball
Sun Jun 25, 2017 12:48 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

NOTE: Looking at the API documentation, it seems that changing the resolution using analogReadResolution(X) merely changes the resolution of the result. A 12 bit read will still be performed, in the case of the STM32FXXX ADCs. In other words, lowering the resolution will not result in faster analog...
by Rick Kimball
Sun Jun 25, 2017 12:40 pm
Forum: STM Nucleo boards
Topic: STM32F091 ADC resolution 10 bit instead of 12 bit
Replies: 17
Views: 149

Re: STM32F091 ADC resolution 10 bit instead of 12 bit

One more question, I defined the ADC on port A0 in my code, and it works fine when I connect a voltage to A0. But if I plug my wire into A1 for example it also shows me that ADC value even when I didn't tell my code to do that. Is this normal behaviour? I don't understand the question. It "shows yo...
by Rick Kimball
Sun Jun 25, 2017 12:15 pm
Forum: STM Core
Topic: Using Scheduler Library
Replies: 9
Views: 117

Re: Using Scheduler Library

Umm. Rick wrote You can make this library work with the stm32 chips with a few simple changes. I did not check if it worked already, as it seemed Rick was saying some changes were needed (hence perhaps it would not work without changes) I modified my first posting to make it more clear I'm only tal...
by Rick Kimball
Sun Jun 25, 2017 11:54 am
Forum: STM Core
Topic: Using Scheduler Library
Replies: 9
Views: 117

Re: Using Scheduler Library

Yes, for libmaple and the stm32 f1 chips you can get away without changing anything because the code is written for the cortex-m3. However, the Arduino IDE will still whine telling you the architecture is not supported, as it only names sam and samd as valid architectures. The Scheduler library code...