更新低功耗设置 --ok

This commit is contained in:
murmur 2023-04-28 08:15:49 +08:00
parent c6886fdd3b
commit 5284e1c741
3 changed files with 16 additions and 7 deletions

View File

@ -317,6 +317,6 @@ void comp_file_test(int argc, char **argv)
#include <finsh.h>
MSH_CMD_EXPORT(comp_file_test, fastlz compress and decompress test);
MSH_CMD_EXPORT(comp_file_test, 使fastlz压缩文件);
#endif
#endif

View File

@ -15,6 +15,12 @@
#include <ulog.h>
#include <board.h>
#define LED_HEART GET_PIN(E,3)
#define ETH_RESET_PIN GET_PIN(E, 7)//71
//#define RESET_LB GET_PIN(E, 1)
//#define RESET_UB GET_PIN(E, 0)
//#define RESET_CE GET_PIN(G, 10)
int main(void)
{
@ -23,15 +29,20 @@ int main(void)
LOG_D("PCLK1_Frequency = %d", HAL_RCC_GetPCLK1Freq());
LOG_D("PCLK2_Frequency = %d", HAL_RCC_GetPCLK2Freq());
#define LED_HEART GET_PIN(E,3)
// #define LED_HEART GET_PIN(E,3)
/* 设置PIN脚模式为输出 */
rt_pin_mode(LED_HEART, PIN_MODE_OUTPUT);
while(1)
rt_pin_mode(ETH_RESET_PIN, PIN_MODE_OUTPUT);
rt_pin_write(ETH_RESET_PIN, PIN_LOW);//关闭ETH
while (1)
{
/* 拉低PIN脚 */
rt_pin_write(LED_HEART, PIN_LOW);
/* 延时1ms省电 */
rt_thread_mdelay(1);//去掉延时共用print替换
rt_thread_mdelay(1); //去掉延时共用print替换
// rt_kprintf("Heartbeat.\n");
/* 拉高PIN脚 */
@ -43,5 +54,3 @@ int main(void)
}
//fastlz_test -c demo.bin f.bin

View File

@ -44,7 +44,7 @@ extern "C"
#define BSP_CLOCK_SOURCE ("HSI")
#define BSP_CLOCK_SOURCE_FREQ_MHZ ((int32_t)0)
#define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)168)
#define BSP_CLOCK_SYSTEM_FREQ_MHZ ((int32_t)50)
/*-------------------------- CLOCK CONFIG END --------------------------*/