BARTH STG with STM32F091xC

Post here first, or if you can't find a relevant section!
User avatar
thebeadster
Posts: 5
Joined: Wed Jun 24, 2020 1:05 pm

BARTH STG with STM32F091xC

Post by thebeadster »

Hi
new on here and can't find any info on this.
The BARTH documentation recommends this forum so here goes …

The newer BARTH PLC uses an STM32 if you haven't looked at them for real world applications its worth a look they work up to 7-32V + CAN
https://uk.rs-online.com/web/p/logic-modules/1348863/
I use them for off road cars and they are very tough and a great price.
functions like flashing brake lights and also indicators like you see on the latest cars also input/outputs to datalogging systems over CAN BUS.

The older models used PIC's and I have worked with PIC for decades ( I am old )

I am using the STG-800 and the Arduino IDE to test
two issues
1. getting WS2812 LED to work , I cannot figure out how to get Fastled to work, is there a config file I can use? or anyone know how I can amend one
Note , the output ports on the Barth have lots of extra circuitry that stop fast comms, however they have the TTL rs232 pins made available and these appear to be direct to the CPU pin. they are Arduino pin 9 & 10. I have used them like this on the older PIC versions.

2. CAN bus library , tried the standard ST library and the exoCAn but no luck, anyone any other ideas?

I spent a lot of time getting the PIC CAN versions to work with BMW ecu's and would rather not face that uphill slog again . I really want to stay with BARTH because of the reliability and simplicity of the package.


any help/suggestions would be great. ( I am not well practised at the Arduino enviroment mainly use UNO, nano and some teensy's)



thanks
bd

mrburnette
Posts: 156
Joined: Thu Dec 19, 2019 1:23 am

Re: BARTH STG with STM32F091xC

Post by mrburnette »

Welcome to the forum.

If you have used 32-bit Teensy, STM32duino is not radically different. Old AVR Arduino ran at 5V logic but STM32 is 3.3 Volt logic.

As for the LED, this is the only forum post I could find
viewtopic.php?t=493

But other members may chime-in soon.

Ray

User avatar
thebeadster
Posts: 5
Joined: Wed Jun 24, 2020 1:05 pm

Re: BARTH STG with STM32F091xC

Post by thebeadster »

Thanks for that,
somehow I didn't spot that thread
from that post, I revisited the Adafruit Neopixel library to try and get it to work.
I get the error ...
LL_GPIO_ResetOutputPin' was not declared in this scope and a few more relating to the GPIO pin settings.

In trying to fix those errors, installed the STM32 cores, I already had the BARTH core installed in the IDE.

both cores appear to be named the same and conflict in IDE board manager, I can only see stm32cores in the board's manager but when selecting the board only the BARTH board is available.

Image


Image


Now it may be easier to fix the Neopixel compile errors, but I think the boards issue new fixing first.

Is this something the community here can fix or is this something to raise with BARTH?

bd

mrburnette
Posts: 156
Joined: Thu Dec 19, 2019 1:23 am

Re: BARTH STG with STM32F091xC

Post by mrburnette »

thebeadster wrote:
Mon Jun 29, 2020 11:07 am
...
In trying to fix those errors, installed the STM32 cores, I already had the BARTH core installed in the IDE.

both cores appear to be named the same and conflict in IDE board manager, I can only see stm32cores in the board's manager but when selecting the board only the BARTH board is available.
...
Now it may be easier to fix the Neopixel compile errors, but I think the boards issue new fixing first.

Is this something the community here can fix or is this something to raise with BARTH?

bd
Honestly, I have never seen the IDE act that way. With Roger's core, one gets:
Image

Have you "walked" the board selection menu, by groups? Sometimes I have to use 'Up-arrow' or 'Down-Arrow' to make the selection list scroll properly. The board groupings lists should not interact. But, to answer your specific question, address the issue to BARTH, if required.

Ray

fredbox
Posts: 66
Joined: Thu Dec 19, 2019 3:05 am
Answers: 2

Re: BARTH STG with STM32F091xC

Post by fredbox »

The boards menu is improved with Arduino 1.8.13. Arduino and STM32 boards each have their own menu.
A1.8.13_pq.png
A1.8.13_pq.png (10.98 KiB) Viewed 158 times

User avatar
thebeadster
Posts: 5
Joined: Wed Jun 24, 2020 1:05 pm

Re: BARTH STG with STM32F091xC

Post by thebeadster »

So it gets stranger...
when I first go into board manager.. I see the BARTH STG mini PLC controller listed.
Image

the moment I click the box the screen changes to this

Image

I tried to remove the STM32 cores. but it will not go,

Image

If I try to delete it again it complains it is not there , but clearly shows it when browsing the boards manager

I installed the STM32 cores on my main PC and they have the correct name in the library

Image

This is a BARTH problem,
I will contact them and update here when I know more
thanks for the help..

User avatar
fpiSTM
Posts: 542
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 20
Location: Le Mans
Contact:

Re: BARTH STG with STM32F091xC

Post by fpiSTM »

I'm wondering why you get this menu as it is not included in the STM32 core.
I found the answer, it was package in a standalone package which is very old.

https://github.com/jasysdotde/STG-8xx

This can explain why you got some trouble btw the STM32 core and this one.

User avatar
thebeadster
Posts: 5
Joined: Wed Jun 24, 2020 1:05 pm

Re: BARTH STG with STM32F091xC

Post by thebeadster »

that is correct,
it is in the install instructions for the STG
I got it by adding this
https://raw.githubusercontent.com/jasys ... index.json
then
Tools → Board: … → Boards Manager… and set type to “Contributed”. Select “BARTH MiniPLC by BARTH elektronik”

so am I the first to use the BARTH with Arduino ...surely not

If so , then does it want adding into the normal method of install?
these are a great bit of kit and would be good for the Arduino community to know about.

In the instructions is this thank you

1 Thanks BARTH MiniPLC STG-8xx Arduiono support is based on the Arduino for STM32 project. Special thanks to Roger Clark, Laurent Meunier and Frederic Pillon from http://www.stm32duino.com/ and https://github.com/stm32duino.

so maybe one of them may know more about it if they are still about.

mike

User avatar
fpiSTM
Posts: 542
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 20
Location: Le Mans
Contact:

Re: BARTH STG with STM32F091xC

Post by fpiSTM »

I'm Frederic Pillon ;)

and honestly, I didn't aware of this or maybe I've forgot (more than 2 years).
Since that the STM32 core has changed a lot. the variant definition is not compatible with the latest core as several enhancements and features were added even the toolchains and tools have been updated a lot.

The best way to integrate it would be to use this method: https://github.com/stm32duino/wiki/wiki ... -on-a-core
Or simply add as a generic F0.

The way used is simply to zip the core and replace all default variants by the STG one.

User avatar
thebeadster
Posts: 5
Joined: Wed Jun 24, 2020 1:05 pm

Re: BARTH STG with STM32F091xC

Post by thebeadster »

fantastic Frederic , thanks for that,

I will have a look at making a Custom board based on a core and using a generic F0

and hopefully post some useful info for those following in my footsteps.


Mike

Post Reply

Return to “General discussion”