2017-01-21 10:42 AM
I'm trying to get familiar with CubeMX and STM32 development process and I'm a bit puzzled with the L1 Discovery.
To do so, I'm trying to 're-create' the demonstration FW shipped with the board using CubeMX.
When creating a new project for the L1 Discovery board, a number of pin are already defined, as they are used by the board design, which is normal.
However, I cannot have the PINs properly assigned in CubeMX to reflect the board. For example, regarding the screen someof the segments are used by the touch sensors. I haven't found a way to tell the system to use some other PINs for the signals. The SEG 3 to 6 conflicts and the followings are shifted, preventing the declaration of the other SEGments.
Would it be possible to create the demo FW with CubeMX, or the board differ too much from the original design, it has to be made by hand?
#stm32l152 #cubemx #discovery-l12017-01-23 06:10 AM
Hello
Bouillot.Alexand
,You mayrefer to your reference manual and the datasheet of your product to be able identify the pins assignment (free/usable pins) andfollow the configuration steps.
Further help can be taken from the
'Getting started with STM32L1xxx hardware development ' document related to your device which will help you toconfigure correctly your peripherals.About creationthe demo FW with CubeMX, this
suggestion
is alreadyhighlighted internally to our CubeMx team.Thank you for your contribution and all your comments are welcome.
Best Regards
Imen
2017-01-23 08:04 AM
The device I use is the L1 Discovery with L152RC chip. The CubeMX version is the latest v4190. The STM32CubeL1 library is version 1.6.0.
I want to migrate the L1 Discovery FW demo code to CubeMX environment. I therefore need to setup the board as it is shipped, but I block on the LCD Glass. There are the pin declared, but I haven't found a way to link them to proper init code to be generated by CubeMx.
2017-01-31 08:14 AM
Hello,
I am not sure to fully understand your whole problem however I will try to give you some clues.
For your point '
However, I cannot have the PINs properly assigned in CubeMX to reflect the board. For example, regarding the screen someof the segments are used by the touch sensors. I haven't found a way to tell the system to use some other PINs for the signals. The SEG 3 to 6 conflicts and the followings are shifted, preventing the declaration of the other SEGments.'
When you put to disable the TS group2, the pins TS_G2_IO2 (that corresponds to PA6) and TS_G2_IO1 (that corresponds to PA7) move to orange color (instead of green when they are set). However, in LCD pinout, SEG3 to SEG6 are still in red color (can not be activated).
To move the pins PA6 to LCD_SEG3, you need to left click on the pin PA6 and move to LCD_SEG3. Then in the pinout tree, you will have LCD/SEG3 activated.
Furthermore, in the configuration view, in GPIO view, LCD tab, you will see that LCD_SEG3 signal is on PA6 pin.
This is the way to change the signal on a pin.
If it doesn't respond to your problem, don't hesitate to send your ioc file and give me more details.
BR.
Eric
2017-02-21 03:06 AM
Hi Eric,
In order to better understand CubeMX, I was planning to recreate a known code for the L152 Discovery board. The only code I have for this target is the example code running on it. I was therefore planning to recreate it.
Do you think this is achievable or would require to much effort?
2017-02-27 08:25 AM
Hello
Bouillot.Alexand
,Yes, taking an example of L152 is achievable easily.
In order to make the program work, you must do the following :
- Open your preferred toolchain - Rebuild all files (taken from the examples) and load your image into target memory - Run the exampleBR. Eric
2017-02-27 10:05 AM
Hi
Joly.Jeanne
,rebuild the project has already been done :-). What I was asking is recreate it - i.e. make the 'same' program but using the CubmeMX toolchain. I am under the impression the example is quite divergent from what it would have looked like if it was created with CubeMX.
2017-02-28 02:28 AM
Hello
Bouillot.Alexand
,I see your point.
We already did a complete answer on BSP and LCD in another post (
https://community.st.com/0D50X00009XkYoaSAF
).Could you please have a look to it? This is the same procedure you should follow to add LCD on top of your CubeMX project.
And you are right, the examples are quite divergent from the one generated in CubeMX.. However, we are working on a way to ease the integration of the examples in CubeMX project, it will come in some months...
BR. Eric