I looked at the latest ST headers, apparently the STM32F030F4 is not yet supported. Cloning the x6 is the way to go.
Giovanni
STM32F030F4
Moderators: RoccoMarco, barthess
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
your example compiles and flashes fine (changed GPIOA_LED_GREEN to GPIOA_PIN5, that's where my led is hooked up). It's not blinking though, the led is at about 1/4 brightness (the same on all port a pins).
Code: Select all
Reading symbols from build/ch.elf...done.
Remote debugging using :4242
_idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
72 port_wait_for_interrupt();
(gdb) c
Continuing.
^C
Program received signal SIGTRAP, Trace/breakpoint trap.
0x08000402 in port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
401 }
(gdb) bt
#0 0x08000402 in port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
#1 0x080005ca in _idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
#2 0x080001a6 in _port_thread_start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
-
- Posts: 44
- Joined: Sat Mar 16, 2013 5:57 pm
- Location: Czech Republic
- Has thanked: 2 times
- Been thanked: 6 times
Re: STM32F030F4
it seems that the ST uses stm32f030x6.h for F030x4
Code: Select all
* @file stm32f030x6.h
* @author MCD Application Team
* @version V2.0.1
* @date 18-June-2014
* @brief CMSIS STM32F030x4/STM32F030x6 devices Peripheral Access Layer Header
Giovanni wrote:I looked at the latest ST headers, apparently the STM32F030F4 is not yet supported. Cloning the x6 is the way to go.
Giovanni
Re: STM32F030F4
So I've made some progress with your example Eddie. It seems like there are some issues with chThdSleepMilliseconds not returning though. With the example blink code you provided it was not blinking. If I change the sleep to a delay it blinks.
if I switch back to sleeping here is the trace:
looks like maybe the thread is never starting correctly?
Code: Select all
void delay (int a);
/*
* Red LED blinker thread, times are in milliseconds.
*/
static THD_WORKING_AREA(waThread1, 128);
static THD_FUNCTION(Thread1, arg) {
(void)arg;
chRegSetThreadName("blinker");
while (TRUE) {
palClearPad(GPIOA, GPIOA_PIN5);
//chThdSleepMilliseconds(500);
delay(100000);
palSetPad(GPIOA, GPIOA_PIN5);
delay(100000);
//chThdSleepMilliseconds(500);
}
}
void delay (int a)
{
volatile int i,j;
for (i=0 ; i < a ; i++)
{
j++;
}
return;
}
if I switch back to sleeping here is the trace:
Code: Select all
#0 port_wait_for_interrupt () at ../../../ChibiOS/os/rt/ports/ARMCMx/chcore_v6m.h:401
#1 0x0800051a in _idle_thread (p=0x0) at ../../../ChibiOS/os/rt/src/chsys.c:72
#2 0x080001a6 in _port_thread_start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
looks like maybe the thread is never starting correctly?
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
There is a problem with system tick apparently.
BTW, is some board with this device available? It is an interesting little device but I found nothing on the ST web site.
Giovanni
BTW, is some board with this device available? It is an interesting little device but I found nothing on the ST web site.
Giovanni
-
- Posts: 44
- Joined: Sat Mar 16, 2013 5:57 pm
- Location: Czech Republic
- Has thanked: 2 times
- Been thanked: 6 times
Re: STM32F030F4
etrombly wrote:So I've made some progress with your example Eddie. It seems like there are some issues with chThdSleepMilliseconds not returning though. With the example blink code you provided it was not blinking. If I change the sleep to a delay it blinks.
looks like maybe the thread is never starting correctly?
Try bin or hex from attachment, led changed to PA5.
- Attachments
-
- test.zip
- (16.02 KiB) Downloaded 185 times
Re: STM32F030F4
The bin you sent works. Maybe it's my compiler? Here is the board I'm using http://www.aliexpress.com/item/ST-M0-mi ... 84748.html It's pretty cheap to play around with.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
OMG, it is dirty cheap I will buy some of those.
About the compiler, this one works for sure: https://launchpad.net/gcc-arm-embedded
Giovanni
About the compiler, this one works for sure: https://launchpad.net/gcc-arm-embedded
Giovanni
Re: STM32F030F4
ok, that is on gcc 4.9. I'm using 5.1.0 and LTO wasn't working either. I'll try the older version.
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: STM32F030F4
I am very prudent with compilers, 4.9.x is OK but I am staying with the latest 4.7.x.
Not all benchmarks are better on 4.9 compared to 4.7.
Giovanni
Not all benchmarks are better on 4.9 compared to 4.7.
Giovanni
Who is online
Users browsing this forum: No registered users and 49 guests