20240816开始修改代码

This commit is contained in:
sunbeam 2024-08-16 08:41:11 +08:00
parent 6104fa92df
commit 231017ec03
2 changed files with 206 additions and 193 deletions

File diff suppressed because it is too large Load Diff

View File

@ -209,6 +209,19 @@ void IhuPrivateDHUCanFr01_Timeout_CALLBACK(void)
// ***************************************************************************** // *****************************************************************************
// ***************************************************************************** // *****************************************************************************
static uint32_t status = 0; static uint32_t status = 0;
uint8_t g_SBC_STATUS[8] = {0};
void GetResetSource(void)
{
g_SBC_STATUS[0] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_2);
g_SBC_STATUS[1] = (uint8_t)sbc_read_reg(SBC_SUP_STAT_1);
g_SBC_STATUS[2] = (uint8_t)sbc_read_reg(SBC_DEV_STAT);
g_SBC_STATUS[3] = RSTC_REGS->RSTC_RCAUSE;
g_SBC_STATUS[4] = RSTC_REGS->RSTC_BKUPEXIT;
g_SBC_STATUS[5] = 0x00;
g_SBC_STATUS[6] = 0x00;
g_SBC_STATUS[7] = 0x00;
CanTx(0,true,0x421,8,g_SBC_STATUS);
}
int main ( void ) int main ( void )
{ {
@ -257,7 +270,7 @@ int main ( void )
Test_frame_On = 1; Test_frame_On = 1;
} }
GetResetSource();
Fuction_State = Function_State_A; Fuction_State = Function_State_A;
while ( true ) while ( true )
{ {