Value Line Discovery Board

Any other STM32 based boards
User avatar
Pito
Posts: 1371
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Value Line Discovery Board

Post by Pito » Sun Oct 30, 2016 1:08 pm

stevestrong wrote:
Pito wrote: the VL have 0 flash waitstates, F103 has got 3 ws :)
Where did you get this information from?
F100: 0 wait states hard wired at 24MHz, you cannot change it via config file
F103: 0 wait state from 0 to 24 MHz, 1 wait state from 24 to 48 MHz and 2 wait states above.. you may change it in the config file..
Pukao Hats Cleaning Services Ltd.

User avatar
Rick Kimball
Posts: 929
Joined: Tue Apr 28, 2015 1:26 am
Location: Eastern NC, US
Contact:

Re: Value Line Discovery Board

Post by Rick Kimball » Sun Oct 30, 2016 1:13 pm

Phisatho wrote:I could not find any pointers from the net.
I'm surprised you didn't find this:

http://www.cs.indiana.edu/~geobrown/book.pdf

The book is only about the stm32vl board. It has been mentioned in other threads on this forum. I guess you must be talking about pointers to using the board with arduino.

-rick
-rick

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

Re: Value Line Discovery Board

Post by Phisatho » Sun Oct 30, 2016 1:29 pm

Hi Rick,
You are right, my statement was about programming this board with Arduino.

Shibu Thomas

stevestrong
Posts: 1435
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Value Line Discovery Board

Post by stevestrong » Mon Oct 31, 2016 12:51 pm

Pito wrote: F100: 0 wait states hard wired at 24MHz, you cannot change it via config file
F103: 0 wait state from 0 to 24 MHz, 1 wait state from 24 to 48 MHz and 2 wait states above.. you may change it in the config file..
@Pito, could you please indicate where and what to change for F103?

User avatar
Pito
Posts: 1371
Joined: Sat Mar 26, 2016 3:26 pm
Location: Rapa Nui

Re: Value Line Discovery Board

Post by Pito » Mon Oct 31, 2016 8:02 pm

@Pito, could you please indicate where and what to change for F103?
Here you are:

Code: Select all

/**
 * @file libmaple/flash.c
 * @brief Flash management functions
 */

#include <libmaple/libmaple_types.h>
#include <libmaple/flash.h>

/**
 * @brief Set flash wait states
 *
 * Note that not all wait states are available on every MCU. See the
 * Flash programming manual for your MCU for restrictions on the
 * allowed value of wait_states for a given system clock (SYSCLK)
 * frequency.
 *
 * @param wait_states number of wait states (one of
 *                    FLASH_WAIT_STATE_0, FLASH_WAIT_STATE_1,
 *                    ..., FLASH_WAIT_STATE_7).
 */
void flash_set_latency(uint32 wait_states) {
    uint32 val = FLASH_BASE->ACR;

    val &= ~FLASH_ACR_LATENCY;
    val |= wait_states;

    FLASH_BASE->ACR = val;
}
You may try to decrease the wait_state number and you will see a performance increase.
Mind the number flash waitstates other than the recommended one means an "overclocking" :)
Pukao Hats Cleaning Services Ltd.

stevestrong
Posts: 1435
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: Value Line Discovery Board

Post by stevestrong » Mon Oct 31, 2016 9:35 pm

Thanks, i'll try it.

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

Re: Value Line Discovery Board

Post by Phisatho » Fri Nov 04, 2016 7:26 pm

No luck so far with VLDiscovery. Initially I was able to compile, but could not get LED to blink.
But then I updated STM32duino. Now I am not able to compile.
Error message:
"C:\arduino-1.6.12\hardware\Arduino_STM32\STM32F1\cores\maple/boards.h:39:25: fatal error: board/board.h: No such file or directory"
I am stumped.

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

Re: Value Line Discovery Board

Post by RogerClark » Fri Nov 04, 2016 8:05 pm

Which files did you change and add?

Looks like your new variant is still accessing the Maple folder, so there is a mistake possibly in your changes to board.txt

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

Re: Value Line Discovery Board

Post by Phisatho » Sat Nov 05, 2016 5:02 pm

I deleted the boards.txt section I created and started from scratch. Copied genericSTM32F103R section and modified as below:

Code: Select all

###################### STM32VLDISCOVERY ########################################

STM32VLDISCOVERY.name=STM32VLDISCOVERY
STM32VLDISCOVERY.vid.0=0x1EAF
STM32VLDISCOVERY.pid.0=0x0004
STM32VLDISCOVERY.build.variant=STM32VLDISCOVERY
STM32VLDISCOVERY.build.vect=VECT_TAB_ADDR=0x8000000
STM32VLDISCOVERY.build.core=maple
STM32VLDISCOVERY.build.f_cpu=24000000L
STM32VLDISCOVERY.build.board=STM32_VLDISCOVERY
STM32VLDISCOVERY.upload.use_1200bps_touch=false
STM32VLDISCOVERY.upload.file_type=bin
STM32VLDISCOVERY.upload.auto_reset=true
STM32VLDISCOVERY.upload.tool=stlink_upload

## STM32_VLDISCOVERY -------------------------
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY=STM32F100RB (20k RAM. 128k Flash)
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY.build.cpu_flags=-DMCU_STM32F103CB  
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY.build.ldscript=ld/jtag.ld
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY.upload.maximum_size=131072
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY.upload.ram.maximum_size=20480
STM32VLDISCOVERY.menu.device_variant.STM32VLDISCOVERY.upload.flash.maximum_size=131072

#---------------------------- UPLOAD METHODS ---------------------------

STM32VLDISCOVERY.menu.upload_method.STLinkMethod=STLink
STM32VLDISCOVERY.menu.upload_method.STLinkMethod.upload.protocol=STLink
STM32VLDISCOVERYmenu.upload_method.STLinkMethod.upload.tool=stlink_upload
STM32VLDISCOVERY.menu.upload_method.STLinkMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG=1 
The section - STM32VLDISCOVERY.build.f_cpu=24000000L is added due to a clue from platform.txt.

Now, other than a warning:

Code: Select all

Warning: Board Arduino_STM32:STM32F1:STM32VLDISCOVERYmenu doesn't define a 'build.board' preference. Auto-set to: STM32F1_STM32VLDISCOVERYMENU
, the sketch is compiled and programmed, but then nothing happens. The line "STM32VLDISCOVERY.build.board=STM32_VLDISCOVERY" seems to be wrong, but I don't know how to correct it.

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

Re: Value Line Discovery Board

Post by RogerClark » Sat Nov 05, 2016 7:27 pm

F cpu is not the only place that value is setup.

its not possible to configure clock speed purely in the boards.txt , because the phase locked loop multiplier value depends on crystal osc freq and also even if you use an external crystal oscillator

its all setup in the various variant folder files.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest