stm32f7 support status? :)

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Alrighty, a few questions:

1) I started with the demo project and I am changing the values in mcuconf.h and board.h to match my hardware. I figure if I can start with a simple program to map things over, will make this process a little easier.

a) What does STM32_HSE_BYPASS mean? On my board I am using a 8Mhz crystal, so I entered in the values as such:

Code: Select all

#define STM32_PLLM_VALUE                    8
#define STM32_PLLN_VALUE                    336
#define STM32_PLLP_VALUE                    2
#define STM32_PLLQ_VALUE                    7


And made the changes for where my high and low speed clock are coming from:

Code: Select all

#define STM32_HSI_ENABLED                   TRUE
#define STM32_LSI_ENABLED                   TRUE
#define STM32_HSE_ENABLED                   TRUE
#define STM32_LSE_ENABLED                   FALSE
#define STM32_CLOCK48_REQUIRED              TRUE
#define STM32_SW                            STM32_SW_PLL
#define STM32_PLLSRC                        STM32_PLLSRC_HSE


This was basically brought over from my older code. I need to look through the docs some more but to make sure I am using these properly, do I need HSI enabled if I am using HSE? Seems like I would not.

What does STM32_HSE_BYPASS mean when used?

b) When I compile and run, this is the back trace:

Code: Select all

0  0x08000e4c in stm32_clock_init () at /Users/grimepoch/mac-build/ChibiOS/os/hal/ports/STM32/STM32F7xx/hal_lld.c:201
#1  __early_init () at /Users/grimepoch/mac-build/ChibiOS/os/hal/boards/ST_STM32F746G_DISCOVERY/board.c:80
#2  0x080001f6 in Reset_Handler ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

and tracing that back into the hal_lld.c:

Code: Select all

while ((RCC->CR & RCC_CR_HSERDY) == 0)

Which would seem to me that I am not setting up the HSE properly? So it's not ready? Thoughts?
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: stm32f7 support status? :)

Post by steved »

Rick Burnett wrote:What does STM32_HSE_BYPASS mean when used?

If defined, it means that the chip is getting an external clock (rather than a crystal). So you wouldn't define it.
(There's probably a diagram of all the clocks in the F7 manual, which should help)
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f7 support status? :)

Post by Giovanni »

Correct.

Giovanni
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Specifically page 131! :)

Thanks for the help, okay, coming back to me now. I am using an external crystal so I do not want HSE_BYPASS. I guess the other thing I need to do is see if I can find a schematic for the STM32F7Discovery board so I can see what you had to implement with regards to the board configuration.

Note to self, should have got an STM32F7Discovery for testing anyways! :)
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Success! I've made an LED blink! :)

For whatever reason, and I am not sure which of these lines, but it is getting stuck on one of them and not continuing, so I commented them out for now and it runs.

Code: Select all

  //SCB_InvalidateICache();
  //SCB_EnableICache();
  //SCB_CleanInvalidateDCache();
  //SCB_EnableDCache();


One thing I noticed in the ARM7 reference manual is that SCB_EnableICache says that it invalidates the ICache THEN enables it. Is there some other reason for calling Invalidate first so it happens twice?
Anubirux
Posts: 39
Joined: Sat Apr 21, 2012 2:28 pm

Re: stm32f7 support status? :)

Post by Anubirux »

Giovanni, can I have one more request for You ?
I cant generate board files, and I guess I need latest version of ChibiStudio plugin :D
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: stm32f7 support status? :)

Post by Giovanni »

Hi,

Try updating from here: http://www.chibios.org/eclipse/chibistudio_hot

Giovanni
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Getting closer on the translation. I figured some of this stuff might not be done yet, or, the interface changed. In any case, I am digging into these, but I figured I'd ask just in case:

1) SOLVED: CH_FREQUENCY says undeclared
Found the renamed setting in chconf.h

Code: Select all

#define CH_CFG_ST_FREQUENCY                 10000


2) SOLVED: OPMODE_I2C and FAST_DUTY_CYCLE_2 say undeclared.
My code was using V1 of the I2C driver, found the example you referenced in another thread that shows the new way.

Code: Select all

testhal/STM32/STM32F37x/I2C


3) VirtualTimer unknown type.


Rick
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Found the solution for #3 as well (it won't let me edit the post anymore), all contained within your porting guide, which also contains a bunch of other name mapping that I am converting now after the linker failed. But hey, my main code at least compiles now, HUGE step.

http://www.chibios.org/dokuwiki/doku.ph ... rom_2_to_3
Rick Burnett
Posts: 150
Joined: Tue Jan 08, 2013 2:20 pm

Re: stm32f7 support status? :)

Post by Rick Burnett »

Okay,

A few different issues remain.

Code: Select all

build/obj/gpt_lld.o (symbol from plugin): In function `gpt_lld_polled_delay':
(.text+0x0): multiple definition of `VectorB0'
build/obj/st_lld.o (symbol from plugin):(.text+0x0): first defined here
build/obj/uart_lld.o (symbol from plugin): In function `uart_lld_stop_receive':
(.text+0x0): multiple definition of `VectorD4'
build/obj/serial_lld.o (symbol from plugin):(.text+0x0): first defined here
/Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-sbrkr.o): In


Solved: Interesting, in 2.6 this compiled with the conflict, but now I guess it checks for it? I had the Serial and USART active at the same time with the same settings, now fixed.

The other problem was running in tickless mode. Is there somewhere that describes both modes? I set it back to classic mode that I was using in 2.6 but just curious about the differences.


Still working on figuring out this one, you mentioned in another thread that the syscalls.o was incomplete in March, but not sure if that is still valid:

Code: Select all

_sbrk_r' referenced in section `.text._malloc_r' of /Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-mallocr.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_r' of /Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-mallocr.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)
`_sbrk_r' referenced in section `.text._malloc_trim_r' of /Users/grimepoch/mac-build/gcc-arm-none-eabi-4_9-2015q2/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/lib/armv7e-m/fpu/libg.a(lib_a-freer.o): defined in discarded section `.text' of build/obj/syscalls.o (symbol from plugin)


Still digging...
Post Reply