195
社区成员
发帖
与我相关
我的任务
分享请问各位大佬 我想用首先测试一下MRS6130-P1812从上电到雷达正常工作需要多长时间。我用个GPIO输出高电平,然后用示波器来测。但是在写完GPIO后我先用万用表测了一下输出一开始测出来了电压参数正常,但是过了几天我想借着进行,发现电压没有了,程序一直没有改变 这是怎么回事。
这是我的代码:
/**
******************************************************************************
* @file main.c
* @brief main define.
* @verbatim null
******************************************************************************
* @attention
*
* Copyright (C) 2025 POSSUMIC TECHNOLOGY CO., LTD. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of POSSUMIC TECHNOLOGY CO., LTD. nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes.
* ----------------------------------------------------------------------------
*/
/* Please include "common.h" intead of directly inlcude "prj_config.h" */
#include "common.h"
#include "mmw_ctrl.h"
#include "r3_databox_msg_handler.h"
#include "hif.h"
#include "mmw_point_cloud_psic_lib.h"
#include "mmw_app_pointcloud.h"
#include "mmw_alg_debug.h"
#include <math.h>
#include "log.h"
#include "mmw_report.h"
#include "hal_gpio.h"
/* Private typedef.
* ----------------------------------------------------------------------------
*/
/* Private defines.
* ----------------------------------------------------------------------------
*/
/* Private macros.
* ----------------------------------------------------------------------------
*/
/* Private variables.
* ----------------------------------------------------------------------------
*/
/* Private function prototypes.
* ----------------------------------------------------------------------------
*/
/* Exported functions.
* ----------------------------------------------------------------------------
*/
int main(void)
{
uint32_t status = 0;
LOG_PRINT("r3 databox Project\n");
LOG_PRINT("-------------------------------------------\n");
LOG_PRINT("mmw_ctrl_open\n");
status = mmw_ctrl_open(true, false, true);
if (status != 0) {
LOG_PRINT("mmw_ctrl_open fail %d\n", status);
}
#if CONFIG_BOARD_MRS6130_P1806
mmw_data_report_hif_init(HIF_COM_TYPE_UART, 1000000, 1);
#elif CONFIG_BOARD_MRS6130_P1812 || CONFIG_SOC_SERIES_RS624X
mmw_data_report_hif_init(HIF_COM_TYPE_SPI, 56000000, 1);
#else
#error "not support board"
#endif
/* hif config callback register */
r3_databox_msg_init();
r3_databox_startup_config();
mmw_report_param_get();
HAL_Dev_t *gpio = NULL;
gpio = HAL_GPIO_Init(GPIO_PORT_B);
HAL_GPIO_SetPinMode(gpio, GPIO_PIN_0, GPIOx_Pn_F1_OUTPUT);
mmw_ctrl_start();
HAL_GPIO_WritePin(gpio, GPIO_PIN_0, GPIO_PIN_SET);
return 0;
}
/*
******************************************************************************
* (C) COPYRIGHT POSSUMIC TECHNOLOGY
* END OF FILE
*/
你好:
从上电到正常工作大概需要6s左右。