Page 2 of 2

Re: STM32F042 Support

Posted: Sun Mar 22, 2015 3:58 pm
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.

Re: STM32F042 Support

Posted: Sun Mar 22, 2015 4:00 pm
by Giovanni
Please post the modified file. I committed a change but left the 042 as an LD so it is still wrong.

Giovanni

Re: STM32F042 Support

Posted: Sun Mar 22, 2015 4:51 pm
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... ). :-)

Re: STM32F042 Support

Posted: Sun Mar 22, 2015 5:24 pm
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").