OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 2379|回复: 2

stm32 l03 低功耗

[复制链接]

7

主题

13

帖子

0

精华

初级会员

Rank: 2

积分
135
金钱
135
注册时间
2016-2-26
在线时间
41 小时
发表于 2018-7-23 21:13:37 | 显示全部楼层 |阅读模式
1金钱
现在在STM32L031F46P上开发
需要做低功耗。
采用内部时钟定时唤醒。

网上搜到一份代码:

但是编译不过。

检查后发现很多函数和变量没有定义---即没有对应的头文件。

搜到现在也只有f1系列的h和c里面有。

哪位大大有l0系列的,请发给我,谢谢!


/**
  ******************************************************************************
  * @file    PWR_STANDBY/main.c
  * @Author  MCD Application Team
  * @version V1.0.1
  * @date    11-October-2013
  * @brief   Main program body
  ******************************************************************************
  * @attention
  *
  * <h2><center>&#169; COPYRIGHT 2013 STMicroelectronics</center></h2>
  *
  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  * You may not use this file except in compliance with the License.
  * You may obtain a copy of the License at:
  *
  *        http://www.st.com/software_license_agreement_liberty_v2
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  *
  ******************************************************************************
  */

/* Includes ------------------------------------------------------------------*/
#include "stm32f0308_discovery.h"
#include <stdarg.h>
#include <stdio.h>
/** @addtogroup STM32F0308_Discovery_Peripheral_Examples
  * @{
  */
#ifdef __GNUC__
  /* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf
     set to 'Yes') calls __io_putchar() */
  #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else
  #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif /* __GNUC__ */
/** @addtogroup PWR_STANDBY
  * @{
  */

/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
extern __IO uint32_t CaptureNumber, PeriodValue;

/* Private function prototypes -----------------------------------------------*/
static void RTC_Config(void);
static void EnterSTANDBYMode(void);
static uint32_t GetLSIFrequency(void);
void SysTick_Configuration(void);

void USART_Configuration(void);
int fputc(int ch, FILE *f);
void UART_send_byte(uint8_t byte);
void UART_Send(uint8_t *Buffer, uint32_t Length);
uint8_t UART_Recive(void);
/* Private functions ---------------------------------------------------------*/
void Delay(uint32_t count)
{

正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2018-7-24 01:50:14 | 显示全部楼层
根据报错找问题,得学会解决问题
回复

使用道具 举报

15

主题

866

帖子

0

精华

论坛元老

Rank: 8Rank: 8

积分
7626
金钱
7626
注册时间
2016-11-30
在线时间
646 小时
发表于 2018-7-24 09:34:47 | 显示全部楼层
移植的问题,最关键是看明白原作的思路及方法,然后根据自己的平台去实现,照搬肯定不行啊!可能库都不一样。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-7-14 23:37

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表