Smaller pin count device

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Pilt
Posts: 6
Joined: Sat Sep 15, 2012 2:08 pm

Smaller pin count device

Post by Pilt »

Hi,

I have made my own board using a STM32L LQFP 48 pin device. I have written a simple app to blink an LED and am using the ST-LINK v2 on the STM32L discovery board I have to program the device. My code runs correctly on the device on the discovery board, however if I program the smaller device on my board the LED does not flash.

Using the debugger I appear to get stuck in early_init and get an unhandled exception. However the outputs appear to be being initialized correctly as if I set the LED output to pullup the LED glows dimly. If i set it to output, the LED is on.

The only changes I have made to support the smaller device are to alter board.h and set the unused pins to inputs. Are there any other changes required to move to the smaller pin device?

Both devices have the same flash size. Discovery is STM32L152RBT6, my board is STM32L152CBT6

Thanks,

Dan
EwanC
Posts: 4
Joined: Thu Nov 01, 2012 11:56 pm

Re: Smaller pin count device

Post by EwanC »

Hi Dan,

I am also using an STM32L152CBT6 on a custom board. I have had no problems like you describe - I just created my own board.h and used the STM32L152-DISCOVERY demo as a skeleton project.

Did you change the clock source/PLL settings in mcuconf.h to suit your board? My board has an 8MHz HSE and no LSE, so I had to disable the LSE and change PLL source to HSE.

Cheers,
Ewan
Pilt
Posts: 6
Joined: Sat Sep 15, 2012 2:08 pm

Re: Smaller pin count device

Post by Pilt »

Hi,

Thanks for your help, looked with a scope today at work and output is toggling, turns out the LED was mounted in reverse!

Thanks,

Dan
Post Reply