uart通风加热OK

This commit is contained in:
sunbeam 2024-05-19 19:59:12 +08:00
parent 8bd35a734d
commit 51c390d3ec
7 changed files with 42 additions and 100 deletions

View File

@ -1609,9 +1609,9 @@ DataFlash
<DebuggerProperty-EssentialProperty-Flash-IdCode-Code8>0</DebuggerProperty-EssentialProperty-Flash-IdCode-Code8>
<DebuggerProperty-EssentialProperty-Flash-IdCode-Code9>0</DebuggerProperty-EssentialProperty-Flash-IdCode-Code9>
<DebuggerProperty-EssentialProperty-Flash-PermitFlashProgramming>Yes</DebuggerProperty-EssentialProperty-Flash-PermitFlashProgramming>
<DebuggerProperty-EssentialProperty-Flash-ForceEraseChip>No</DebuggerProperty-EssentialProperty-Flash-ForceEraseChip>
<DebuggerProperty-EssentialProperty-Flash-ForceEraseChip>Yes</DebuggerProperty-EssentialProperty-Flash-ForceEraseChip>
<DebuggerProperty-EssentialProperty-Flash-UseLowVoltageFlashMode>Yes</DebuggerProperty-EssentialProperty-Flash-UseLowVoltageFlashMode>
<DebuggerProperty-EssentialProperty-Clock-MainClockForOCD>0</DebuggerProperty-EssentialProperty-Clock-MainClockForOCD>
<DebuggerProperty-EssentialProperty-Clock-MainClockForOCD>8000</DebuggerProperty-EssentialProperty-Clock-MainClockForOCD>
<DebuggerProperty-EssentialProperty-Clock-SubClockForOCD>0</DebuggerProperty-EssentialProperty-Clock-SubClockForOCD>
<DebuggerProperty-EssentialProperty-Clock-MonitorClock>System</DebuggerProperty-EssentialProperty-Clock-MonitorClock>
<DebuggerProperty-EssentialProperty-TargetConnect-TargetSupplyPower>No</DebuggerProperty-EssentialProperty-TargetConnect-TargetSupplyPower>
@ -1637,7 +1637,7 @@ DataFlash
<DebuggerProperty-DownloadProperty-DebugInformation-CpuReset>True</DebuggerProperty-DownloadProperty-DebugInformation-CpuReset>
<DebuggerProperty-DownloadProperty-Download-DownloadMode>SpeedPriority</DebuggerProperty-DownloadProperty-Download-DownloadMode>
<DebuggerProperty-DownloadProperty-Download-MonitorOverwrite>Yes</DebuggerProperty-DownloadProperty-Download-MonitorOverwrite>
<DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>False</DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>
<DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>True</DebuggerProperty-DownloadProperty-DebugInformation-FlashErase>
<DebuggerProperty-DownloadProperty-DebugInformation-EventCorrection>SuspendEvent</DebuggerProperty-DownloadProperty-DebugInformation-EventCorrection>
<DebuggerProperty-DownloadProperty-DebugInformation-SkipStartup>True</DebuggerProperty-DownloadProperty-DebugInformation-SkipStartup>
<DebuggerProperty-DownloadProperty-DebugInformation-MainSymbol>XwBtAGEAaQBuAA==</DebuggerProperty-DownloadProperty-DebugInformation-MainSymbol>
@ -3267,9 +3267,9 @@ DataFlash
&lt;/SOAP-ENV:Body&gt;
&lt;/SOAP-ENV:Envelope&gt;
</KeyExtGridLayout>
<KeyTopViewZoom>1</KeyTopViewZoom>
<KeyTopViewAngle>0</KeyTopViewAngle>
<KeyTopViewPartsCollapsed>False</KeyTopViewPartsCollapsed>
<KeyTopViewZoom />
<KeyTopViewAngle />
<KeyTopViewPartsCollapsed />
<KEY_SAVE_ALLOCATED_FUNCTION>True</KEY_SAVE_ALLOCATED_FUNCTION>
<KEY_SAVE_ALLOCATED_FUNCTION_TERMINAL_NUMBER_COLLECTION>15,19,24,25</KEY_SAVE_ALLOCATED_FUNCTION_TERMINAL_NUMBER_COLLECTION>
<KEY_SAVE_ALLOCATED_FCUNTION_COLLECTION15>15,P31,INTP4,PCLBUZ0</KEY_SAVE_ALLOCATED_FCUNTION_COLLECTION15>
@ -3522,8 +3522,8 @@ DataFlash
&lt;PORT Forcible="" /&gt;
&lt;/Effect&gt;
&lt;/IICA0&gt;
&lt;ProjectName Name="PrjName" Text="HDG" /&gt;
&lt;ProjectPath Name="PrjPath" Text="F:\work\M20\CODE\APP" /&gt;
&lt;ProjectName Name="PrjName" Text="ECU_APP" /&gt;
&lt;ProjectPath Name="PrjPath" Text="E:\workspace\M20\CODE\APP" /&gt;
&lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt;
&lt;DeviceName Name="DeviceName" Fixed="" Text="RL78G12" /&gt;
&lt;MCUName Name="MCUName" Text="RL78G12_30pin" /&gt;
@ -4706,7 +4706,6 @@ DataFlash
&lt;/RL78G12&gt;</CodeGenerator>
<FormatVersion>1.0</FormatVersion>
<ToolGUID>f86968ea-17ad-47e1-88df-e91118cc2b4d</ToolGUID>
<CodeGeneratorItem>ae6446ae-2e4d-412a-b9a2-aa97ff5b9deb</CodeGeneratorItem>
</Instance>
</Class>
<Class Guid="2a2c2a43-ecdb-4e88-80bd-e75f3e33db90">

View File

@ -41,7 +41,7 @@
</Files>
<DebugOptions>
<ConnectSettings>
<MainClock>0</MainClock>
<MainClock>8000000</MainClock>
</ConnectSettings>
<DebugToolSettings />
</DebugOptions>
@ -224,8 +224,8 @@
&lt;PORT Forcible="" /&gt;
&lt;/Effect&gt;
&lt;/IICA0&gt;
&lt;ProjectName Name="PrjName" Text="HDG" /&gt;
&lt;ProjectPath Name="PrjPath" Text="F:\work\M20\CODE\APP" /&gt;
&lt;ProjectName Name="PrjName" Text="ECU_APP" /&gt;
&lt;ProjectPath Name="PrjPath" Text="E:\workspace\M20\CODE\APP" /&gt;
&lt;ProjectKind Name="PrjKind" Text="Project78K0R" /&gt;
&lt;DeviceName Name="DeviceName" Fixed="" Text="RL78G12" /&gt;
&lt;MCUName Name="MCUName" Text="RL78G12_30pin" /&gt;

File diff suppressed because one or more lines are too long

View File

@ -1,31 +1,18 @@
QualityReport
2024年5月19日 16:33:54
2024年5月19日 19:52:40
------ Start build(ECU_APP, DefaultBuild) ------
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe r_cg_serial_user.c -cpu=S2 -o DefaultBuild\r_cg_serial_user.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F103AA.DVF" -g -g_line -I . -I user -I DataFlash -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe r_cg_timer_user.c -cpu=S2 -o DefaultBuild\r_cg_timer_user.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F103AA.DVF" -g -g_line -I . -I user -I DataFlash -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe user\appTask.c -cpu=S2 -o DefaultBuild\appTask.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F103AA.DVF" -g -g_line -I . -I user -I DataFlash -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe user\MotorCtrl.c -cpu=S2 -o DefaultBuild\MotorCtrl.obj "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F103AA.DVF" -g -g_line -I . -I user -I DataFlash -c -msg_lang=english
W0511106:The folder "DataFlash" specified by the "-I" option is not found.
W0511106:The folder "DataFlash" specified by the "-I" option is not found.
W0511106:The folder "DataFlash" specified by the "-I" option is not found.
W0511106:The folder "DataFlash" specified by the "-I" option is not found.
r_cg_serial_user.c(126):W0523077:Called function should have prototype
user\appTask.c(258):W0523077:Called function should have prototype
user\appTask.c(263):W0523077:Called function should have prototype
user\appTask.c(266):W0523077:Called function should have prototype
user\appTask.c(267):W0523077:Called function should have prototype
user\appTask.c(270):W0523077:Called function should have prototype
user\appTask.c(271):W0523077:Called function should have prototype
user\appTask.c(405):W0523077:Called function should have prototype
user\appTask.c(41):W0520177:Variable "temp" was declared but never referenced
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\rlink.exe -subcommand=DefaultBuild\ECU_APP.clnk
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 59 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 28 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
RAMDATA SECTION: 00000062 Byte(s)
ROMDATA SECTION: 000000c7 Byte(s)
PROGRAM SECTION: 00000b83 Byte(s)
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 59 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
PROGRAM SECTION: 00000b7a Byte(s)
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 28 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
Renesas Optimizing Linker Completed
------ Build ended(Error:0, Warning:14)(ECU_APP, DefaultBuild) ------
------ Build ended(Error:0, Warning:4)(ECU_APP, DefaultBuild) ------
--- CommandFile 1 ---
DefaultBuild\ECU_APP.clnk :
@ -77,13 +64,13 @@ DefaultBuild\ECU_APP.clnk :
--- SHA1 hash value of output files ---
F:\work\M20\CODE\APP\DefaultBuild\ECU_APP.abs: fd1126a20346ffbbc54fd04fcc234c7e48a485ae
F:\work\M20\CODE\APP\DefaultBuild\ECU_APP.mot: 10a6647dbf0dfeeb7fca85858bfa52e1570341f3
E:\workspace\M20\CODE\APP\DefaultBuild\ECU_APP.abs: 509887d9f4ba8fd498fc13455afeff80fa44f480
E:\workspace\M20\CODE\APP\DefaultBuild\ECU_APP.mot: ef1a9987e3a9c8ac4c8804d103195c2eae6d16d3
--- System Information ---
*OS Version
Microsoft Windows 10 企业版 LTSC (-, 10.0.19044, WOW64)
Microsoft Windows 10 企业版 LTSC (-, 10.0.17763, WOW64)
*Language
中文(中国)
*.NET Framework Version
@ -106,13 +93,13 @@ F:\work\M20\CODE\APP\DefaultBuild\ECU_APP.mot: 10a6647dbf0dfeeb7fca85858bfa52e15
C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage
*Private Working Set
288 MB
267 MB
*Number of GDI Objects
2149
2019
*Number of USER Objects
1111
1011
*Opened Files
2 editors, 2 files, 15 KB
1 editors, 1 files, 5 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in
@ -241,7 +228,7 @@ Device Information Common Interface
DeviceInformation.dll
--- Main Project Information ---
F:\work\M20\CODE\APP\ECU_APP.mtpj
E:\workspace\M20\CODE\APP\ECU_APP.mtpj
Microcontroller Information
*R5F103AA
*File Name: Version

View File

@ -1,35 +0,0 @@
/**********************************************************************************************************************
* DISCLAIMER
* This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No
* other uses are authorized. This software is owned by Renesas Electronics Corporation and is protected under all
* applicable laws, including copyright laws.
* THIS SOFTWARE IS PROVIDED "AS IS" AND RENESAS MAKES NO WARRANTIES REGARDING
* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED. TO THE MAXIMUM
* EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES
* SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR ANY REASON RELATED TO
* THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
* Renesas reserves the right, without notice, to make changes to this software and to discontinue the availability of
* this software. By using this software, you agree to the additional terms and conditions found by accessing the
* following link:
* http://www.renesas.com/disclaimer
*
* Copyright (C) 2020 Renesas Electronics Corporation. All rights reserved.
*********************************************************************************************************************/
/***********************************************************************/
/* */
/* FILE :Main.c */
/* DATE : */
/* DESCRIPTION :Main Program */
/* CPU TYPE : */
/* */
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/* */
/***********************************************************************/
void main(void);
void main(void)
{
}

View File

@ -32,7 +32,7 @@ Includes
#include "r_cg_macrodriver.h"
#include "r_cg_serial.h"
/* Start user code for include. Do not edit comment generated here */
#include "appTask.h"
/* End user code. Do not edit comment generated here */
#include "r_cg_userdefine.h"

View File

@ -4,6 +4,8 @@
#include "PINdef.h"
#include "hwCtrl.h"
#include "MotorCtrl.h"
#include "r_cg_serial.h"
#include "r_cg_timer.h"
@ -24,7 +26,7 @@ uint8_t RxTimeoutCount=0;
static uint8_t Rxdata[10];
uint8_t RxFlag=0;
const uint8_t fan_duty_arr[4] = {0,100,80,50};
const uint8_t fan_duty_arr[4] = {0,100,50,25};
const uint8_t heat_duty_arr[4] = {0,80,65,50};
static uint8_t heat_state=0,fan_state=0;
@ -36,7 +38,7 @@ void MsgPro(uint8_t len);
void Apply_task(void)
{
static uint8_t temp;
if (Timer_1ms_flag == 1)
{
Timer_1ms_flag = 0;
@ -69,6 +71,7 @@ void Apply_task(void)
if (Timer_1000ms_flag == 1)
{
Timer_1000ms_flag = 0;
//R_UART0_Send(g_tx_buf,1);
}
}
@ -322,13 +325,12 @@ void Timer_Pro(void)
void UART_Rx_Pro(uint8_t data)
{
static uint8_t last_data=0,datalen=0;
if (last_data == 0x5A && data == 0xA5)
{
RxFlag = 1;
datacount = 0;
datalen=0;
g_tx_buf[0] = 1;
//g_tx_buf[0] = 1;
//R_UART0_Send(g_tx_buf,1);
}
else
@ -414,6 +416,7 @@ void MsgPro(uint8_t len)
{
return;
}
//R_UART0_Send(Rxdata,4);
//ClearSleepCounter();
crc = 0;
for(i=0;i<3;i++)