STM32F042 Support

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

Moderator: RoccoMarco

rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: STM32F042 Support

Post by rew »

Due to the '042 being listed as LD device, it gets:

Code: Select all

 #error "USART2 not present in the selected device"
 #error "SPI2 not present in the selected device"
 #error "USB not present in the selected device"
on my code. Do you want me to prepare a patch. I'm using the current GIT version of ChibiOS.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F042 Support

Post by Giovanni »

Please post the modified file. I committed a change but left the 042 as an LD so it is still wrong.

Giovanni
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: STM32F042 Support

Post by rew »

I was planning on waiting ten minutes for the git at github to update to get your latest code. But now I see you're posting from the future.... (It says 5:00 PM on your post, and it is ten to five here... ). :-)
rew
Posts: 383
Joined: Sat Jul 19, 2014 12:59 pm
Has thanked: 2 times
Been thanked: 14 times

Re: STM32F042 Support

Post by rew »

The diff is at:
http://prive.bitwizard.nl/stm32f042_registry_fixes.diff

I noticed that CAN is available on the '042, but I don't know enough about CAN to enable it. (e.g. it could be a wholly different CAN module than on other STM chips like with USB vs OTG .

Similarly I remember seeing EXTI channel numbers up to 31 in the reference manual, so I don't know if setting the NUM_CHANNELS to 28 puts the top four out of reach. (of which two are unused, "internally tied to zero").
Post Reply