Search found 38 matches

by MGeo
Wed Mar 24, 2021 10:42 am
Forum: General discussion
Topic: Precompiled HAL/LL files possible?
Replies: 23
Views: 9007

Precompiled HAL/LL files possible?

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/lib...
by MGeo
Sat Feb 27, 2021 9:41 am
Forum: General discussion
Topic: Getting USART instance from HardwareSerial?
Replies: 2
Views: 1886

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_TypeDef *)...
by MGeo
Fri Feb 26, 2021 10:34 am
Forum: General discussion
Topic: Getting USART instance from HardwareSerial?
Replies: 2
Views: 1886

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 case...
by MGeo
Fri Oct 30, 2020 10:14 pm
Forum: General discussion
Topic: WHICH CORE?!
Topic: WHICH CORE?!
Replies: 20
Views: 11385

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, progr...
by MGeo
Sun Oct 25, 2020 5:18 pm
Forum: General discussion
Topic: Variant.h pin definitions unclear?
Replies: 9
Views: 5505

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. Thanks...
by MGeo
Sun Oct 25, 2020 11:52 am
Forum: General discussion
Topic: Variant.h pin definitions unclear?
Replies: 9
Views: 5505

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 gives 48, not 55.
by MGeo
Sun Oct 25, 2020 10:15 am
Forum: General discussion
Topic: Variant.h pin definitions unclear?
Replies: 9
Views: 5505

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_PINS s...
by MGeo
Sun Oct 25, 2020 2:46 am
Forum: General discussion
Topic: Variant.h pin definitions unclear?
Replies: 9
Views: 5505

Re: Variant.h pin definitions unclear?

mrburnette wrote: Sat Oct 24, 2020 11:39 pm The variant file you linked to defines A2

Code: Select all

#define PA4  A2
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.

Thanks,
George
by MGeo
Sat Oct 24, 2020 11:04 pm
Forum: General discussion
Topic: Variant.h pin definitions unclear?
Replies: 9
Views: 5505

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 mys...
by MGeo
Wed Sep 16, 2020 9:07 am
Forum: Ideas & suggestions
Topic: Bare metal STM32 programming
Replies: 26
Views: 45317

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 implementation...

Go to advanced search