I've been playing around with this somewhat out of date core based on libopencm3 project here https://github.com/Serasidis/arduino_opencm3
It relies on precompiled archive files for the libopencm3 library files (found here https://github.com/Serasidis/arduino_opencm3/tree/master/stm32/libopencm3 ...
Search found 38 matches
- Wed Mar 24, 2021 10:42 am
- Forum: General discussion
- Topic: Precompiled HAL/LL files possible?
- Replies: 23
- Views: 18828
- Sat Feb 27, 2021 9:41 am
- Forum: General discussion
- Topic: Getting USART instance from HardwareSerial?
- Replies: 2
- Views: 2820
Re: Getting USART instance from HardwareSerial?
Perfect, thanks Frederic.
For anyone finding this thread I found that in C++/ino you need to cast the return pointer to avoid an invalid conversion from 'void*' error (works as is in C).
#if defined(SBUS_INVERT)
// derive USART instance from pin definitions
USART_TypeDef *uart_tx = (USART ...
For anyone finding this thread I found that in C++/ino you need to cast the return pointer to avoid an invalid conversion from 'void*' error (works as is in C).
#if defined(SBUS_INVERT)
// derive USART instance from pin definitions
USART_TypeDef *uart_tx = (USART ...
- Fri Feb 26, 2021 10:34 am
- Forum: General discussion
- Topic: Getting USART instance from HardwareSerial?
- Replies: 2
- Views: 2820
Getting USART instance from HardwareSerial?
Hi,
I am using an F303K8, and hoping to use the F3's built in USART pin inversion capabilities to avoid extra external hardware inverters.
I have found the LL functions to do this and it works (see minimal sketch below), but it requires me to explicitly define the USART instance (USART1 in this ...
I am using an F303K8, and hoping to use the F3's built in USART pin inversion capabilities to avoid extra external hardware inverters.
I have found the LL functions to do this and it works (see minimal sketch below), but it requires me to explicitly define the USART instance (USART1 in this ...
- Fri Oct 30, 2020 10:14 pm
- Forum: General discussion
- Topic: WHICH CORE?!
- Replies: 20
- Views: 19370
Re: WHICH CORE?!
Worth assessing the 'Bus Factor' https://en.wikipedia.org/wiki/Bus_factor when considering where to invest your time and effort in open source efforts. Times change, individual priorities change, as they should. A project or core associated with a specific individual has a very low Bus Factor ...
- Sun Oct 25, 2020 5:18 pm
- Forum: General discussion
- Topic: Variant.h pin definitions unclear?
- Replies: 9
- Views: 8194
Re: Variant.h pin definitions unclear?
Wow, that was fast! Seems to be working for me.
I sounds like I need to study up on pin number (PA4) vs PinName (PA_4) form to better understand which to use when. Up until now I've always been using pin number form and things have worked as expected, but I can see advantages of PinName enum ...
I sounds like I need to study up on pin number (PA4) vs PinName (PA_4) form to better understand which to use when. Up until now I've always been using pin number form and things have worked as expected, but I can see advantages of PinName enum ...
- Sun Oct 25, 2020 11:52 am
- Forum: General discussion
- Topic: Variant.h pin definitions unclear?
- Replies: 9
- Views: 8194
Re: Variant.h pin definitions unclear?
A quick test sketch:
uint32_t PA_4_PinNum = pinNametoDigitalPin(PA_4);
PinName A2_PinName = analogInputToPinName(A2);
PinName PA4_PinName = analogInputToPinName(PA4);
Serial.println(PA_4_PinNum);
Serial.println(A2_PinName);
Serial.println(PA4_PinName);
Prints out:
48
4
4
PA_4 then ...
uint32_t PA_4_PinNum = pinNametoDigitalPin(PA_4);
PinName A2_PinName = analogInputToPinName(A2);
PinName PA4_PinName = analogInputToPinName(PA4);
Serial.println(PA_4_PinNum);
Serial.println(A2_PinName);
Serial.println(PA4_PinName);
Prints out:
48
4
4
PA_4 then ...
- Sun Oct 25, 2020 10:15 am
- Forum: General discussion
- Topic: Variant.h pin definitions unclear?
- Replies: 9
- Views: 8194
Re: Variant.h pin definitions unclear?
Apologies, I should have clarified why I am raising the question. I am working with an SPI device with CS pin as PA4. I call to SPI.begin with (optional) PA4 pin as a parameter.
// initialize SPI:
SPI.begin(PA4);
SPI.cpp has numerous checks to test if _pin argument is greater than NUM_DIGITAL ...
// initialize SPI:
SPI.begin(PA4);
SPI.cpp has numerous checks to test if _pin argument is greater than NUM_DIGITAL ...
- Sun Oct 25, 2020 2:46 am
- Forum: General discussion
- Topic: Variant.h pin definitions unclear?
- Replies: 9
- Views: 8194
Re: Variant.h pin definitions unclear?
Umm, thanks. I think you got it backwards. The variant file defines PA4 as A2. The definition of A2 is the item in question. Also, this is regarding an existing Nucleo variant.mrburnette wrote: Sat Oct 24, 2020 11:39 pm The variant file you linked to defines A2Code: Select all
#define PA4 A2
Thanks,
George
- Sat Oct 24, 2020 11:04 pm
- Forum: General discussion
- Topic: Variant.h pin definitions unclear?
- Replies: 9
- Views: 8194
Variant.h pin definitions unclear?
I'm running into trouble with invalid digital pin definition values from variant.h on a Nucleo-F401RE. I am using PA4 as a digital output pin. PA4 is returned as a uint value of 55, when I am expecting some value below NUM_DIGITAL_PINS of 52. Looking at variant.h it is now defined as A2. It is a ...
- Wed Sep 16, 2020 9:07 am
- Forum: Ideas & suggestions
- Topic: Bare metal STM32 programming
- Replies: 26
- Views: 140953
Re: Bare metal STM32 programming
Nothing stopping you, go ahead and do it.
The challenges I've run into with bare metal (which I think of as CMSIS / LL / c and asm register access to hardware as opposed to using Arduino higher level functions) is name collisions, multiple definitions and hard coded interrupts in core ...
The challenges I've run into with bare metal (which I think of as CMSIS / LL / c and asm register access to hardware as opposed to using Arduino higher level functions) is name collisions, multiple definitions and hard coded interrupts in core ...