Skip to main content
janmatik9
Associate
November 25, 2016
Solved

STemWin and CRC module on STM32L4

  • November 25, 2016
  • 8 replies
  • 2376 views
Posted on November 25, 2016 at 12:27

Hi guys,

as far as I know, STemWin library requires the CRC module to by enabled before calling GUI_Init(), to verify that it's running on STM32 platform (mentioned on this forum).

As I plan to use CRC module in my application, is it safe to use it after STemWin is initialized? I tried to disable CRC module immediately after GUI_Init() and STemWin works fine. 

I just want to be sure, that STemWin needs CRC only during init.

Thank you in advance for any comments!

#stemwin #crc #stm32l4
This topic has been closed for replies.
Best answer by Tesla DeLorean
Posted on January 08, 2018 at 01:11

The CRC peripheral is an ST specific implementation, the software test that the data register sequences as expected, ie writes test data pattern, reads and confirms data pattern output by peripheral.

8 replies

slimen
Visitor II
November 25, 2016
Posted on November 25, 2016 at 14:39

Hello,

Why do you want disable CRC ?

As mentioned in the AN4323:  

''The CRC module (in RCC peripheral clock enable register) should be enabled before using the library.''

''Note that before initializing the GUI, the CRC module (in RCC peripheral clock enable register) should be enabled.''

I recommend you to have a look to the STemWin applications under the STM32CubeL4 firmware package:  

STM32Cube_FW_L4_V1.5.0\Projects\STM32L476G_EVAL\Applications\STemWin, it can be very useful.

You should follow the configuration steps provided in the

http://www.st.com/content/ccc/resource/technical/document/application_note/54/c9/95/42/8c/0b/43/69/DM00089670.pdf/files/DM00089670.pdf/jcr:content/translations/en.DM00089670.pdf

: Getting started with STemWin Library, in section “3 How to use STemWin Library step by step�.

Regards

janmatik9
janmatik9Author
Associate
November 25, 2016
Posted on November 25, 2016 at 15:25

Dear forumstm32,

thank you for your reply.

I have disabled CRC module just because I wanted to test, if STemWin library is using it after initialization. I fully understand, that STemWin needs CRC module for init. But what is not clear is if CRC module is used by STemWin later.

I plan to use CRC module for CRC calculation in communication task and also for some operation on FLASH storage. If STemWin will use CRC also later after initialization, I can not use CRC module anymore, because of possible colisions. 

I forget to mention, that I'm using FreeRTOS, STemWin is running in one thread only. But other (more than one) threads will use CRC module. I'm able to control access to CRC module between my threads using MUTEX or Gatekeeper approach, but I have no idea when/if STemWin tries to access the CRC module in same time when me.

Regards

Jan

William chang
Associate III
January 7, 2018
Posted on January 07, 2018 at 02:39

Why do we need to enable CRC before using STemwin?

Tesla DeLorean
Guru
January 7, 2018
Posted on January 07, 2018 at 03:05

So licensed software is locked to ST hardware.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
William chang
Associate III
January 7, 2018
Posted on January 07, 2018 at 15:21

Why keil MDK emWin don't need any CRC like some kind of stuff?