2019-11-03 09:01 AM
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
Solved! Go to Solution.
2019-11-03 12:12 PM
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.
2019-11-03 09:33 AM
Have you tried the examples from [STM32CubeL1]\Projects\STM32L152C-Discovery\Examples\ ?
JW
2019-11-03 10:17 AM
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]
2019-11-03 10:58 AM
I don't use Cube, nor Atollic, sorry.
JW
2019-11-03 11:30 AM
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.
2019-11-03 12:12 PM
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.
2019-11-03 12:22 PM
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.
2020-11-02 07:51 AM
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