cancel
Showing results for 
Search instead for 
Did you mean: 

Get the STM32l1-Discovery lcd running

fifi_22
Associate III

Hello.

I got a STM32l-Discovery and I tried lots of examples with HAL, But I can't get the LCD on this board working. Examples from ST page use some strange library and don't want to compile in my IDE. Have anyone working example for this lcd using HAL?

Sorry for my English, I'm from Poland

1 ACCEPTED SOLUTION

Accepted Solutions

Pure C, with using the symbols provided by the CMSIS-mandated device headers (i.e. what's in [Cube]\Drivers\CMSIS\Device\ST\[family]\Include\). I also don't use any STM32-specialized IDE - I use programmer editors of my choice, and then gcc and gdb in their command-line form (using make or even simple batch files). This is considered an extreme approach by many on this forum and elsewhere, but works for me as a means to have full control over what I do, avoiding being locked to any particular toolchain or even a mcu family.

For example, this is a simple clock using a similar LCD "glass" on the 'L4 Disco (CMSIS-mandated headers, plus an "augmenting" header here). It may quite well be that the LCD driver on the 'L1 is very similar, bud I did not check. Using the LCD is relatively simple, much of the code just "transforms" the input data to bits in registers driving the individual segments.

JW

PS. Please change your username to a normal nick.

View solution in original post

7 REPLIES 7

Have you tried the examples from [STM32CubeL1]\Projects\STM32L152C-Discovery\Examples\ ?

JW

fifi_22
Associate III

Well... I downloaded cubeL1, found this example, but i cannot manage to create a compiling atollic studio project. Could you send me working template for this?

I've got errors like:

Drivers\STM32L1xx_HAL_Driver\Src\stm32l1xx_hal_timebase_tim_template.c:172:3: warning: implicit declaration of function 'HAL_TIM_IRQHandler' [-Wimplicit-function-declaration]

I don't use Cube, nor Atollic, sorry.

JW

fifi_22
Associate III

Sorry for offtop, but what are you using? I'm new to STM32 and if there is a better (for You) way I can start from it.

Pure C, with using the symbols provided by the CMSIS-mandated device headers (i.e. what's in [Cube]\Drivers\CMSIS\Device\ST\[family]\Include\). I also don't use any STM32-specialized IDE - I use programmer editors of my choice, and then gcc and gdb in their command-line form (using make or even simple batch files). This is considered an extreme approach by many on this forum and elsewhere, but works for me as a means to have full control over what I do, avoiding being locked to any particular toolchain or even a mcu family.

For example, this is a simple clock using a similar LCD "glass" on the 'L4 Disco (CMSIS-mandated headers, plus an "augmenting" header here). It may quite well be that the LCD driver on the 'L1 is very similar, bud I did not check. Using the LCD is relatively simple, much of the code just "transforms" the input data to bits in registers driving the individual segments.

JW

PS. Please change your username to a normal nick.

fifi_22
Associate III

Oh, thank You so much. Before I went with STM i wrote on AVR and PIC (and still doing that). I loved programming on direct registers, but on STM .... When You serach (for example) in google, there is approx nothing about low level programming STM (or I'am blind). And then I met somebody like You which does that! I can't believe it!

PS. thanks also for reminding me about nick.

I don't know why this old thread resurfaced - maybe somebody selected that post for Best - but it's a good opportunity to remind voting for https://community.st.com/s/ideazone#0873W000000KyjfQAC , even if ST discarded the idea.

JW