cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to build spin3202 6 step firmware package in Keil and getting '' error:

Alex Bondarenko
Associate
Posted on January 24, 2018 at 19:10

Hello,

Im trying to build the spin3202 6 step firmware package

For some reason the  

STSW-SPIN3202 firmware package is missing the pre compiled binaries mentioned in UM2310 section 2.5.2

if I then try to compile Keil project as directed in section 

2.5.3.2 of 

UM2310 I get the following error codes when trying to build the binary (fresh install of Keil and no changes made to the code, instructions followed exactly)

**********************************************************************************************

**********************************************************************************************

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

Rebuild Project 'Project_Uart' - Target 'STSPIN32F0A'

compiling stspin32f0.c...

compiling stm32f0xx_hal.c...

compiling STEVAL-SPIN3202.c...

compiling stm32f0xx_hal_adc_ex.c...

compiling stm32f0xx_hal_adc.c...

compiling stm32f0xx_hal_cortex.c...

compiling stm32f0xx_hal_dma.c...

compiling stm32f0xx_hal_flash.c...

compiling stm32f0xx_hal_flash_ex.c...

compiling stm32f0xx_hal_gpio.c...

compiling stm32f0xx_hal_rcc.c...

compiling stm32f0xx_hal_rcc_ex.c...

compiling stm32f0xx_hal_tim_ex.c...

compiling stm32f0xx_hal_uart.c...

compiling stm32f0xx_hal_tim.c...

compiling stm32f0xx_hal_uart_ex.c...

compiling stm32f0xx_hal_usart.c...

compiling UART_UI.c...

compiling 6Step_Lib.c...

compiling main_32F0.c...

assembling startup_stm32f031.s...

compiling stspin32f0_hal_msp.c...

compiling system_stm32f0xx.c...

error:  &sharp20: identifier 'RCC_CFGR_PLLMULL' is undefined

        pllmull = 

CC->CFGR & RCC_CFGR_PLLMULL;

error:  &sharp20: identifier 'RCC_CFGR2_PREDIV1' is undefined

          prediv1factor = (

CC->CFGR2 & RCC_CFGR2_PREDIV1) + 1;

error:  &sharp20: identifier 'RCC_CFGR_PLLMULL' is undefined

      

CC->CFGR &= (uint32_t)((uint32_t)~(

CC_CFGR_PLLSRC | 

CC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL));

error:  &sharp20: identifier 'RCC_CFGR_PLLSRC_PREDIV1' is undefined

      

CC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL6);

error:  &sharp20: identifier 'RCC_CFGR_PLLXTPRE_PREDIV1' is undefined

      

CC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL6);

error:  &sharp20: identifier 'RCC_CFGR_PLLMULL6' is undefined

      

CC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_PREDIV1 | RCC_CFGR_PLLXTPRE_PREDIV1 | RCC_CFGR_PLLMULL6);

RTE\Device\STM32F031C6\system_stm32f0xx.c: 0 warnings, 6 errors

compiling stspin32f0_it.c...

'.\Objects\Project_Uart.axf' - 6 Error(s), 0 Warning(s).

Target not created.

Build Time Elapsed:  00:00:06

Has anyone come across a solution this problem / found a solution?

Thanks in advance!

#stspin32f0a
2 REPLIES 2
Grzegorz K
Associate
Posted on March 13, 2018 at 20:54

I think that I solve this problem. I changed in system_stm32f0xx.c:

1) pllmull = CC->CFGR & RCC_CFGR_PLLMULL; to 

pllmull = 

CC->CFGR & RCC_CFGR_PLLMUL;

2) prediv1factor = (CC->CFGR2 & RCC_CFGR2_PREDIV1) + 1; to prediv1factor = (RCC->CFGR2 & RCC_CFGR2_PREDIV_1) + 1;

3) prediv1factor = (CC->CFGR2 & RCC_CFGR2_PREDIV1) + 1; to RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_PLLSRC | RCC_CFGR_PLLXTPRE | RCC_CFGR_PLLMUL));

4) CC->CFGR &= (uint32_t)((uint32_t)~(CC_CFGR_PLLSRC | CC_CFGR_PLLXTPRE | RCC_CFGR_PLLMULL)); to RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE_PREDIV | RCC_CFGR_PLLXTPRE_HSE_PREDIV_DIV1 | RCC_CFGR_PLLMUL6);

But now I have problem with UART communication. I get information about possible command in terminal of serial port after reset uC, but when I send command, for example HELP, uC doesn't react.

If I had a pre compiled file, I could check that with hardware is everything ok.

Hugues Libotte
Associate III

Hello

Don't you get any other answer regarding this ?

Thanks,

H