STM32L152-DISCO: Difference between revisions

From Embedded Workshop
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
[[File:image.PF258515.en.feature-description-include-personalized-no-cpn-medium.jpg|right|300px]]
The STMicro STM32L152-DISCO development board provides a developer a low power processor with an LCD segment display,<br>
The STMicro STM32L152-DISCO development board provides a developer a low power processor with an LCD segment display,<br>
a user defined button, a capacitive touch slider, two user defined LEDs - green & blue, and an on-board USB ST-Link JTAG interface.<br>
a user defined button, a capacitive touch slider, two user defined LEDs - green & blue, and an on-board USB ST-Link JTAG interface.<br>
I've been wanting to dive a little deeper with low power devices, and this appears to be rather good development board for that.<br>
I've been wanting to dive a little deeper with low power devices, and this appears to be rather good development board for that.<br>
 
==Board Information==
https://www.st.com/en/evaluation-tools/32l152cdiscovery.html#documentation
==Example "Demo" Code==
From the STM32L152-DISCO page, https://www.st.com/en/evaluation-tools/32l152cdiscovery.html#documentation
Click on the "Tools and Software" tab, and download STSW-STM32072, STM32L1 Discovery firmware package (RN0079)
I downloaded en.stsw-stm32072.zip.  It contained example code for current sensing, and touch sensing.
The folder, "AN3413-Currenct_consumption_touch_sensing", is the "demo" project that's pre-programmed on the board.
If you already have Keil setup, you can unzip the firmware package, navigate to:
Projects\AN3413-Currenct_consumption_touch_sensing\MDK-ARM, and double-click "STM32L-Discovery.uvprojx".
This will open the project up inside Keil uVision.  Click "Build(F7)", and then "Download(F8). Press the reset button.
Here's your familiar board demo running.
==Hardware==
==Hardware==
  STM32L152RCT6 low power processor, 32MHz max, with 16KB RAM, 256KB FLASH
  STM32L152RCT6 low power processor, 32MHz max, with 16KB RAM, 256KB FLASH
Line 16: Line 27:
'''Here are my pad measurements:'''<br>
'''Here are my pad measurements:'''<br>
[[File:Battery Holder Pads.jpg|300px]]<br>
[[File:Battery Holder Pads.jpg|300px]]<br>
'''Unpacking'''
Right after taking the board out of the box, be sure to backup the initial code if you ever want to
restore it.  Use the ST-Link Utility to backup the FLASH memory to a file.


  After firing up STM32CubeMX, Selecting "STM32L152C-DISCO" from the Boards Select menu, and then clicking "Start Project",
  After firing up STM32CubeMX, Selecting "STM32L152C-DISCO" from the Boards Select menu, and then clicking "Start Project",
Line 21: Line 35:
  Go to the Project Manager tab, give the project a name, select "MDK-ARM" for toolchain.
  Go to the Project Manager tab, give the project a name, select "MDK-ARM" for toolchain.
  the zip file, "stm32cube_fw_l1_v1100.zip" was downloaded.  This contains all the library files and example code needed to build
  the zip file, "stm32cube_fw_l1_v1100.zip" was downloaded.  This contains all the library files and example code needed to build
  projects with this development board.
  projects with this development board.  You can build this template, but don't expect to see anything running....
'''Unpacking'''
  Right after taking the board out of the box, be sure to backup the initial code if you ever want to
restore it. Use the ST-Link Utility to backup the FLASH memory to a file.


'''Example Projects'''
'''Example Projects'''
Line 33: Line 44:
  Click on the "Tools and Software" tab, and download STSW-STM32072, STM32L1 Discovery firmware package (RN0079)
  Click on the "Tools and Software" tab, and download STSW-STM32072, STM32L1 Discovery firmware package (RN0079)
  I downloaded en.stsw-stm32072.zip.  It contained example code for current sensing, and touch sensing.
  I downloaded en.stsw-stm32072.zip.  It contained example code for current sensing, and touch sensing.
  The folder, "AN3413-Currenct_consumption_touch_sensing", may be the "demo" project that's pre-programmed on the board.   
  The folder, "AN3413-Currenct_consumption_touch_sensing", contains the "demo" project source that's pre-programmed on the board.   
   
   
'''Strangeness'''
'''Strangeness'''

Latest revision as of 23:47, 19 November 2020

The STMicro STM32L152-DISCO development board provides a developer a low power processor with an LCD segment display,
a user defined button, a capacitive touch slider, two user defined LEDs - green & blue, and an on-board USB ST-Link JTAG interface.
I've been wanting to dive a little deeper with low power devices, and this appears to be rather good development board for that.

Board Information

https://www.st.com/en/evaluation-tools/32l152cdiscovery.html#documentation

Example "Demo" Code

From the STM32L152-DISCO page, https://www.st.com/en/evaluation-tools/32l152cdiscovery.html#documentation
Click on the "Tools and Software" tab, and download STSW-STM32072, STM32L1 Discovery firmware package (RN0079)
I downloaded en.stsw-stm32072.zip.  It contained example code for current sensing, and touch sensing.
The folder, "AN3413-Currenct_consumption_touch_sensing", is the "demo" project that's pre-programmed on the board.
If you already have Keil setup, you can unzip the firmware package, navigate to:
Projects\AN3413-Currenct_consumption_touch_sensing\MDK-ARM, and double-click "STM32L-Discovery.uvprojx".
This will open the project up inside Keil uVision.  Click "Build(F7)", and then "Download(F8). Press the reset button.
Here's your familiar board demo running.

Hardware

STM32L152RCT6 low power processor, 32MHz max, with 16KB RAM, 256KB FLASH
Two pushbuttons Black: Reset, Blue: User defined
Four LEDs LD1 (red/green) for USB communication,
          LD2 (red) for 3.3V power
          LD3 (green) user defined
          LD4 (blue) user defined
Capacitive Touch Sensor - Slider / 4 Buttons

On the backside of the development board are pads for a CR2032 coin cell, directions indicate:
"Solder a B7410AP2L battery holder from LOTES on CR1".  (This battery holder appears to be as scarce as hen's teeth.)

Here are my pad measurements:

Unpacking

Right after taking the board out of the box, be sure to backup the initial code if you ever want to
restore it.  Use the ST-Link Utility to backup the FLASH memory to a file.
After firing up STM32CubeMX, Selecting "STM32L152C-DISCO" from the Boards Select menu, and then clicking "Start Project",
select "YES" when asked to initialize all peripherals with the default Mode.
Go to the Project Manager tab, give the project a name, select "MDK-ARM" for toolchain.
the zip file, "stm32cube_fw_l1_v1100.zip" was downloaded.  This contains all the library files and example code needed to build
projects with this development board.  You can build this template, but don't expect to see anything running....

Example Projects

Example projects can be found in C:\Users\UserName\STM32Cube\Repository
-> C:\Users\Jim\STM32Cube\Repository\STM32Cube_FW_L1_V1.10.2\Projects\32L152CDISCOVERY\Examples
Although there are plenty of example projects, I couldn't find the "demo" example.
From the STM32L152-DISCO page, https://www.st.com/en/evaluation-tools/32l152cdiscovery.html#documentation
Click on the "Tools and Software" tab, and download STSW-STM32072, STM32L1 Discovery firmware package (RN0079)
I downloaded en.stsw-stm32072.zip.  It contained example code for current sensing, and touch sensing.
The folder, "AN3413-Currenct_consumption_touch_sensing", contains the "demo" project source that's pre-programmed on the board.  

Strangeness

It appeared the program would "flake out" while performing the sleep current measurements.
Pressing the reset button would restart the demo, but it would again "flake out" during sleep current measurements again.
After unplugging the board and reconnecting it, the board resumed "normal functionality".
This strange behavior occurred after using the ST-Link to backup up the program FLASH.
It's possible the ST-Link was responsible for this behavior...