Commit 0955e8c2 authored by hu's avatar hu

K-LINE调整

parent 5743492a
......@@ -40,6 +40,7 @@ primaryTarget=v800_standalone.tgt
-DUSE_XBUS
-DUSE_SSIF
-DUSE_TAUB
-DUSE_RLIN3
-I..\source\Driver\Analog_Signals
-I..\source\Driver\CAN
-I..\source\Driver\Clock
......
......@@ -125,7 +125,7 @@ void Kwp2000_AscInit(void)
TJA1021_Enable(1);
/* disable transmitter interrupt */
Uart_DisableTxInterrupt();
//Uart_DisableTxInterrupt(); /*----20220309----*/
/// -----------------------------------------------------------------------
/// Configuration of the ASC0 Operation Mode:
......
......@@ -112,7 +112,7 @@ void Kwp2000_ProtocolInit(void)
Kwp2000_ScanWup.xScanState_u32 = KWP2000_WUP_WAIT4IDLE_E;
Kwp2000_ScanWup.tiStartSample_u32 = Kwp2000_TimeCounter;
Uart_DisableReceiveIsrReq();
//Uart_DisableReceiveIsrReq(); /*----20220309----*/
/*Set RX as GPIO-IN*/
Uart_SetRxGpio();
......
......@@ -156,8 +156,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00000042ul, /*Pin_P16_5 TAUB0O11 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000050ul, /*Pin_P16_5 TAUB0I11 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P16_6 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P16_6 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_6 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_6 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_7 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_7 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
......
......@@ -467,7 +467,7 @@
#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 WAKE_N_MCU_IN GPIO_OUT_PORT16_PIN06
#define CD4051A_A_MCU_OUT GPIO_OUT_PORT16_PIN07
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
#define TEMP_W_LED_OUT GPIO_OUT_PORT16_PIN09
......
......@@ -175,7 +175,7 @@ uint32_t UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st_t *penUART
// RLN31LEDE = 0U;
/*** data format N81*/
u32UARTAddress = u32UARTAddressBase + 0x09U;
(*((uint8_t *)(u32UARTAddress))) = UART_MSB_FIRST;
(*((uint8_t *)(u32UARTAddress))) = UART_LSB_FIRST;
// RLN31LBFC = UART_MSB_FIRST;
/*Transmission interrupt is generated at.*/
u32UARTAddress = u32UARTAddressBase + 0x21U;
......@@ -492,7 +492,7 @@ void Uart_ConfigOperationMode(void)
unsigned char Uart_GetRxLevel(void)
{
// return PTS_PTS0;
return GPIO_OUT_PORT00_PIN03;
return GPIO_IN_PORT00_PIN03;
}
/*-------------------------------------------------------------------------
......@@ -542,9 +542,13 @@ void Uart_ClearRxFullFlag(void)
* Return : None
* onther :
--------------------------------------------------------------------------*/
//uint8_t hyq_test[20] = {0};
//uint32_t hyq_test_UART = 0U;
void UART_Read_ISR(uint16_t u16UARTData)
{
Kwp2000_AscRxInterrupt();//包含一下,然后打开即可
//hyq_test[hyq_test_UART] = u16UARTData;
//hyq_test_UART++;
}
void Uart_SetBaudrate(unsigned long xBaudrate_u32)
......
......@@ -89,6 +89,8 @@
#include "kwp2000_tp.h"
#include "kwp2000_protocol.h"
#include "UART.h"
static uint8_t u08_1ms_count;
/*******************************************************************************
......@@ -210,6 +212,8 @@ void Sys_Run_Mode_50ms_Tasks(void)
/*==============================================================================
100ms周期执行任务
------------------------------------------------------------------------------*/
//uint8_t YZHD_TEST[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
//uint32_t YZHD_Count = 0;
void Sys_Run_Mode_100ms_Tasks(void)
{
......@@ -235,6 +239,12 @@ void Sys_Run_Mode_100ms_Tasks(void)
Data_Acc_Speed_Processing();
/*高速路一般路报警判断*/
Data_GsLYbL_Speed_Processing();
//YZHD_Count++;
//if (YZHD_Count == 20)
//{
// UART_Ch2_Send_Multiple_Byte(&YZHD_TEST[0], 10);
//}
}
/*============================================================================*/
......
......@@ -157,8 +157,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00000042ul, /*Pin_P16_5 TAUB0O11 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000050ul, /*Pin_P16_5 TAUB0I11 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P16_6 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010010ul, /*Pin_P16_6 GPIO_IN SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_6 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_6 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_7 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_7 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
......
......@@ -465,7 +465,7 @@
#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 WAKE_N_MCU_IN GPIO_OUT_PORT16_PIN06
#define CD4051A_A_MCU_OUT GPIO_OUT_PORT16_PIN07
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
#define TEMP_W_LED_OUT GPIO_OUT_PORT16_PIN09
......
......@@ -133,7 +133,7 @@
"pinName": "UART_TX_OUT",
"pinAddress": " 3Y",
"wakeupPin": {
"pinModeName": "INTP1",
"pinModeName": "RLIN32TX",
"circuitName": "TTL",
"PINV": false,
"PODC": false,
......@@ -148,13 +148,13 @@
"PPR": false,
"PMC": true,
"PIPC": false,
"PM": true,
"PM": false,
"PFCAE": false,
"PFCE": false,
"PFC": false
},
"sleepPin": {
"pinModeName": "INTP1",
"pinModeName": "RLIN32TX",
"circuitName": "TTL",
"PINV": false,
"PODC": false,
......@@ -169,7 +169,7 @@
"PPR": false,
"PMC": true,
"PIPC": false,
"PM": true,
"PM": false,
"PFCAE": false,
"PFCE": false,
"PFC": false
......@@ -2797,7 +2797,7 @@
"pinName": "LIN_SLP_N_MCU",
"pinAddress": "17A",
"wakeupPin": {
"pinModeName": "ISM21",
"pinModeName": "GPIO_OUT",
"circuitName": "SCHMITT1",
"PINV": false,
"PODC": false,
......@@ -2807,11 +2807,11 @@
"PU": false,
"PD": false,
"PBDC": false,
"PIBC": false,
"PIBC": true,
"P": false,
"PPR": false,
"PMC": true,
"PIPC": true,
"PMC": false,
"PIPC": false,
"PM": false,
"PFCAE": false,
"PFCE": false,
......@@ -2917,7 +2917,7 @@
"pinName": "WAKE_N_MCU_IN",
"pinAddress": "16A",
"wakeupPin": {
"pinModeName": "GPIO_IN",
"pinModeName": "GPIO_OUT",
"circuitName": "SCHMITT1",
"PINV": false,
"PODC": false,
......@@ -2932,13 +2932,13 @@
"PPR": false,
"PMC": false,
"PIPC": false,
"PM": true,
"PM": false,
"PFCAE": false,
"PFCE": false,
"PFC": false
},
"sleepPin": {
"pinModeName": "GPIO_IN",
"pinModeName": "GPIO_OUT",
"circuitName": "SCHMITT1",
"PINV": false,
"PODC": false,
......@@ -2953,7 +2953,7 @@
"PPR": false,
"PMC": false,
"PIPC": false,
"PM": true,
"PM": false,
"PFCAE": false,
"PFCE": false,
"PFC": false
......
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