Value Line Discovery Board

Any other STM32 based boards
Phisatho
Posts: 16
Joined: Fri Oct 28, 2016 1:24 pm

Re: Value Line Discovery Board

Post by Phisatho » Tue Nov 15, 2016 7:01 am

If you meant Arduino_STM32, yes.

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Tue Nov 15, 2016 7:44 am


Phisatho
Posts: 16
Joined: Fri Oct 28, 2016 1:24 pm

Re: Value Line Discovery Board

Post by Phisatho » Tue Nov 15, 2016 8:18 am

No, I did not.
I took the files from Maxxir's link, and stitched up an ldscript using files from two different sources.

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Tue Nov 15, 2016 8:33 am

OK

Rick Kimball has the same board and did some initial tests using the new repo (modified version of STM's own official code), and he reported that it worked OK

I'd recommend you give the official repo a try.

Instructions to install are here

viewtopic.php?f=16&t=1553

Phisatho
Posts: 16
Joined: Fri Oct 28, 2016 1:24 pm

Re: Value Line Discovery Board

Post by Phisatho » Thu Nov 17, 2016 9:36 pm

I faced a few problems with it.
1) The port-pin way of addressing is not available. Pins are addressed the Arduino way (1,2,3..).
2) Even with Pin# way, all pins are not included.
3) Some of the pins are marked as ARDUINO_PIN_EXT / GPIO_PIN_MORPHO_ONLY. I don't know how to access these pins.
4) MAX_DIGITAL_IOS is defined as 22 which is incorrect. (actual count is 51).
5) LED_BUILTIN is defined as 13 which is incorrect. (this board has 2 LEDs - PC8 and PC9).
6) The board pins are marked in the PXYY format and it does not have the arduino way of pin labeling. Hence Port/pin way of addressing (PA1, PA2..) would make more sense.

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Thu Nov 17, 2016 9:40 pm

1) The port-pin way of addressing is not available. Pins are addressed the Arduino way (1,2,3..).

When did you download the core ? The pin mapping was updated yesterday

2) Even with Pin# way, all pins are not included.
See answer to 4

3) Some of the pins are marked as ARDUINO_PIN_EXT / GPIO_PIN_MORPHO_ONLY. I don't know how to access these pins.
See answer to 4

4) MAX_DIGITAL_IOS is defined as 22 which is incorrect. (actual count is 51).

OK. Looks like this is a mistake in both the BluePill and the Value Line, however we can't simply change this number, because of the way Wi6Labs wrote the code it is very wasteful and puts loads of constant data into RAM, and changing that count from 22 to 51 would mean it consumes more RAM than is available in the F100

We already have an issue logged for this, but its not that easy to fix, as it requires a lot of changes to the code :-(

5) LED_BUILTIN is defined as 13 which is incorrect. (this board has 2 LEDs - PC8 and PC9).
Easy to fix. I'll push a fix for this now.

6) The board pins are marked in the PXYY format and it does not have the arduino way of pin labeling. Hence Port/pin way of addressing (PA1, PA2..) would make more sense.
See answer to question 1 (fixed already)
Last edited by RogerClark on Thu Nov 17, 2016 10:21 pm, edited 1 time in total.

Phisatho
Posts: 16
Joined: Fri Oct 28, 2016 1:24 pm

Re: Value Line Discovery Board

Post by Phisatho » Thu Nov 17, 2016 10:21 pm

I made the variant for the legacy(?) version of STMduino - not HAL. I am yet to get a grip on the HAL version.
I downloaded only an hour ago.
I am getting the error < 'PC9' was not declared in this scope >

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Thu Nov 17, 2016 10:28 pm

Phisatho wrote:I made the variant for the legacy(?) version of STMduino - not HAL. I am yet to get a grip on the HAL version.
I downloaded only an hour ago.
I am getting the error < 'PC9' was not declared in this scope >
If you have your own private variant code you need to update it to make it work.

PC9 is not included in the Blue Pill as its not a pin that is available on that board, and your variant was based on the blue pill
Albeit it looks like the generic stm32f103c in libmaple needs to be updated to include this as it looks like its missing and its possible that someone could make their own board that has this pin

This looks like it may be a mistake in the STM HAL Version, I'd need to check. But libmaple version is OK

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Thu Nov 17, 2016 10:57 pm

Update.

Fixed some but not all issues in the HAL version.

I can't fix the issue with not all pins being available at the moment as its a serious underlying problem with the STM code

User avatar
RogerClark
Posts: 6375
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Value Line Discovery Board

Post by RogerClark » Fri Nov 18, 2016 2:26 am

Update. STM Core.

I was able to fix the MAX PINS issue because it didnt impact RAM usage as the number of analogue pins did not change, just the number of digital pins.

However it revealed that the are yet more problems with the way the analogue config is handed :-( as you will be limited to using only 7 specific pins as analogue, which is probably not correct.

The F103C spec is for 2 ADC's with 10 analogue channels,
F103R and F103V have 16 analogue channels

I can't see from the spec any limitation for which pins can be used as analog, but I will post a separate question about this

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests