Commit 5743492a authored by hu's avatar hu

debug

parent 11b7de1e
......@@ -108,6 +108,7 @@ static const r_dev_ClkSelConfig_t g_stClkSelectionCfg[] =
{R_DEV_CKS_CPU, R_DEV_CKS_SRC_PLL0, 2, 0u},
{R_DEV_CKS_SFMA, R_DEV_CKS_SRC_PLL0, 3, 0u},
{R_DEV_CKS_SSIF, R_DEV_CKS_SRC_PLLFIX, 156, 0u},
{R_DEV_CKS_RLIN, R_DEV_CKS_SRC_PLLFIX_10, 0, 0u},
/* delimiter - do not remove */
{R_DEV_CKS_LAST, R_DEV_CKS_SRC_MOSC, 2, 0u},
......
......@@ -18,8 +18,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010010ul, /*Pin_P0_1 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P0_1 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_2 INTP1 TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_2 INTP1 TTLPDSC:L PU/PD:NULL P:L */
0x00400040ul, /*Pin_P0_2 RLIN32TX TTLPDSC:L PU/PD:NULL P:L */
0x00400040ul, /*Pin_P0_2 RLIN32TX TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_3 RLIN32RX/INTP2 TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_3 RLIN32RX/INTP2 TTLPDSC:L PU/PD:NULL P:L */
......@@ -150,7 +150,7 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P16_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000060ul, /*Pin_P16_4 ISM21 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000042ul, /*Pin_P16_5 TAUB0O11 SCHMITT1PDSC:L PU/PD:NULL P:L */
......
......@@ -466,6 +466,7 @@
#define BUZZER_MCU_OUT GPIO_OUT_PORT16_PIN01
#define TEMP_R_LED_OUT GPIO_OUT_PORT16_PIN02
#define TACHO_A39_OUT GPIO_OUT_PORT16_PIN03
#define LIN_SLP_N_MCU GPIO_OUT_PORT16_PIN04
#define WAKE_N_MCU_IN GPIO_IN_PORT16_PIN06
#define CD4051A_A_MCU_OUT GPIO_OUT_PORT16_PIN07
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
......
......@@ -685,7 +685,7 @@ void TJA1021_Enable(unsigned char state)
// DDRR_DDRR3 = 1;
// PTR_PTR3 = state;
GPIO_OUT_PORT16_PIN04 = state;
LIN_SLP_N_MCU = state;
}
/*-------------------------------------------------------------------------
......
This diff is collapsed.
......@@ -3,8 +3,6 @@
#include "init.h"
#include "Sys_Scheduler.h"
#include "Sys_Tick.h"
#include "kwp2000_tp.h"
#include "kwp2000_protocol.h"
typedef struct
{
......@@ -27,9 +25,6 @@ Sys_Scheduling_st_t SysScheduling;
static void Sys_Exact_50us_Task_Handler(void);
static void Sys_Exact_100ms_Task_Handler(void);
static uint8_t u08_1ms_count;
void Sys_Init(void)
{
SysScheduling.msRocBak = 0U;
......@@ -102,16 +97,6 @@ void Sys_Scheduling_Service(void)
static void Sys_Exact_50us_Task_Handler(void)
{
Sys_Exact_50us_Tasks();
/*----K_Line----*/
u08_1ms_count ++;
if (u08_1ms_count >= 20)
{
u08_1ms_count = 0;
Kwp2000_ComInit_Handle();
Kwp2000_Handle(); /* qitiancun */
Kwp2000_Timeout();
}
}
......
......@@ -86,6 +86,11 @@
#include "Buzzer.h"
#include "CAN_FUNC.h"
#include "kwp2000_tp.h"
#include "kwp2000_protocol.h"
static uint8_t u08_1ms_count;
/*******************************************************************************
* *
* 系统常规运行模式(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )任务列表 *
......@@ -270,6 +275,16 @@ void Sys_Exact_50us_Tasks(void)
SEG_LCD_Window_Control_Service();
}
Buzzer_Play_ISR();
/*----K_Line----*/
u08_1ms_count ++;
if (u08_1ms_count >= 20)
{
u08_1ms_count = 0;
Kwp2000_ComInit_Handle();
Kwp2000_Handle(); /* qitiancun */
Kwp2000_Timeout();
}
}
/*============================================================================*/
......
#include "r_typedefs.h"
#include "dr7f701441.dvf.h"
#include "GPIO.h"
#define GPIO_STB_PROTECTED_WRITE(preg, pstatus, reg, value) \
......@@ -18,8 +19,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010010ul, /*Pin_P0_1 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P0_1 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_2 INTP1 TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_2 INTP1 TTLPDSC:L PU/PD:NULL P:L */
0x00400040ul, /*Pin_P0_2 RLIN32TX TTLPDSC:L PU/PD:NULL P:L */
0x00400040ul, /*Pin_P0_2 RLIN32TX TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_3 RLIN32RX/INTP2 TTLPDSC:L PU/PD:NULL P:L */
0x00400050ul, /*Pin_P0_3 RLIN32RX/INTP2 TTLPDSC:L PU/PD:NULL P:L */
......@@ -150,7 +151,7 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P16_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000060ul, /*Pin_P16_4 ISM21 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000042ul, /*Pin_P16_5 TAUB0O11 SCHMITT1PDSC:L PU/PD:NULL P:L */
......
#ifndef GPIO_H__
#define GPIO_H__
#include "dr7f701441.dvf.h"
/* --- PORT Data Direction --- */
#define GPIO_DIR_PORT00_PIN00 PORT_AWOPM0_0
......@@ -465,6 +464,7 @@
#define BUZZER_MCU_OUT GPIO_OUT_PORT16_PIN01
#define TEMP_R_LED_OUT GPIO_OUT_PORT16_PIN02
#define TACHO_A39_OUT GPIO_OUT_PORT16_PIN03
#define LIN_SLP_N_MCU GPIO_OUT_PORT16_PIN04
#define WAKE_N_MCU_IN GPIO_IN_PORT16_PIN06
#define CD4051A_A_MCU_OUT GPIO_OUT_PORT16_PIN07
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment