I'm looking at porting an STM32F042 application (originally written directly against STM32F0xx_StdPeriph_Driver) to ChibiOS.
It looks like the board config unconditionally expects to configure all pins - is there any way to generate a board config for an MCU in default reset state (other than just going through the datasheet pin by pin), or tell the board config to just leave pins as they are on reset?
I've cloned the ST_NUCLEO32_F042K6 board, but of course it's set up for the various external items on the Nucleo board - LED, crystal, etc. If I remove all the ports from board.chcfg and regenerate board.{c,h} all the #define's are dropped from board.h (as expected) but board.c still expects to find them to configure the pins on reset instead of leaving them in their default state.
I'm assuming the answer is "just make a board.chcfg that reflects the state you want", but thought it was worth asking as a dumb beginner question.
board.chcfg for mcu default reset state
Moderators: RoccoMarco, lbednarz, utzig, tfAteba, 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: board.chcfg for mcu default reset state
Hi,
You need to specify the state of all ports, it is designed this way. In Chibistudio, If you remove ports and then add those again all pins will have the default state thanks to the XML schena.
Giovanni
You need to specify the state of all ports, it is designed this way. In Chibistudio, If you remove ports and then add those again all pins will have the default state thanks to the XML schena.
Giovanni
Re: board.chcfg for mcu default reset state
OK, I assumed that might be the case.
This doesn't cover pins that don't have the "normal" reset state (eg: PA13/PA14 as SWDIO/SWCLK with active pullup/pulldown), but that's easy enough to fix.
Thanks!
Giovanni wrote:In Chibistudio, If you remove ports and then add those again all pins will have the default state thanks to the XML schena.
This doesn't cover pins that don't have the "normal" reset state (eg: PA13/PA14 as SWDIO/SWCLK with active pullup/pulldown), but that's easy enough to fix.
Thanks!
Who is online
Users browsing this forum: No registered users and 18 guests