2537 views|2 replies

1452

Posts

1

Resources
The OP
 

[MM32 eMiniBoard Review] + SysTick Second Timer [Copy link]

 

In the program of the MM32 eMiniBoard development board, there are related functions of Systick. By combining it with the OLED screen, a second timer can be realized, and its running effect is shown in the figure.

Running effect diagram

Systick related functions are as follows:

void Systick_init()
{
    if (SysTick_Config(RCC_GetSysClockFreq() / 1000)) {
 // Capture error
 while (1);
       }
    // Configure the SysTick handler priority
     NVIC_SetPriority(SysTick_IRQn, 0x0);//SysTickinterrupt priority class set
}


void SysTick_Handler(void)
{
 Counter++;
 if(Counter >= 1000) {
 Counter = 0;
 s++;
 LED1_TOGGLE();
 LED2_TOGGLE();
  LED3_TOGGLE();
 LED4_TOGGLE();
 }
}

The main program to implement the second timer is:

s32 main(void)
{
 Systick_init();
 LED_Init();
 APP_OLED_Init();
 OLED_Init();
 OLED_Clear();
   OLED_ShowString(0,0,"MM32F0133 ",16);
 OLED_ShowString(0,2,"SysTick test",16);
 OLED_ShowString(0,4,"t = s",16);
while(1) {
 OLED_ShowNum(32,4,s,2,16);
}
}

This post is from Domestic Chip Exchange

Latest reply

Smart MM32 eMiniBoard Development Board Review Summary post: https://en.eeworld.com/bbs/thread-1146791-1-1.html   Details Published on 2020-11-8 22:43
 
 

7422

Posts

2

Resources
2
 

Cortex is very convenient

This post is from Domestic Chip Exchange
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 
 

1w

Posts

204

Resources
3
 

Smart MM32 eMiniBoard Development Board Review

Summary post: https://en.eeworld.com/bbs/thread-1146791-1-1.html

This post is from Domestic Chip Exchange
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
Personal signature

玩板看这里:

http://en.eeworld.com/bbs/elecplay.html

EEWorld测评频道众多好板等你来玩,还可以来频道许愿树许愿说说你想要玩的板子,我们都在努力为大家实现!

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list