update version to v2.0.5

This commit is contained in:
Artery-MCU
2022-05-23 20:01:46 +08:00
parent ccd0f1e108
commit f09f510f6d
1076 changed files with 8951 additions and 2628 deletions

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of clock program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_conf.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief at32f415 config header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,16 +1,18 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
this demo is based on the at-start board, in this demo, shows how to use the
can communication mode. every 1s transmit one message and the led4 blink,
if receive a message, les2 blink(message id is 0x400) or led3 blink(message
id is not equal to 0x400).
this demo is based on the at-start board and at32-comm-ev, in this demo,
shows how to use the can communication mode. every 1s transmit one message
and the led4 blink, if receive a message, led2 blink(message id is 0x400) or led3
blink(message id is not equal to 0x400).
set-up
- can tx ---> pb9
- can rx ---> pb8
- can rx ---> pb8
for more detailed information. please refer to the application note document AN0095.

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief system clock config program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file main.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main program
**************************************************************************
* Copyright notice & Disclaimer
@@ -87,9 +87,9 @@ static void can_configuration(void)
can_base_struct.mmssr_selection = CAN_SENDING_BY_ID;
can_base_init(CAN1, &can_base_struct);
/* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 10;
can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ;
/* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 6;
can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ;
can_baudrate_struct.bts1_size = CAN_BTS1_8TQ;
can_baudrate_struct.bts2_size = CAN_BTS2_3TQ;
can_baudrate_set(CAN1, &can_baudrate_struct);
@@ -110,6 +110,8 @@ static void can_configuration(void)
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
/* error interrupt enable */
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
}
@@ -170,10 +172,11 @@ void CAN1_SE_IRQHandler(void)
{
err_index = CAN1->ests & 0x70;
can_flag_clear(CAN1, CAN_ETR_FLAG);
/* error type is stuff error */
if(err_index == 0x00000010)
{
can_reset(CAN1);
can_configuration();
/* when stuff error occur: in order to ensure communication normally,
user must restart can or send a frame of highest priority message here */
}
}
}

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of clock program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_conf.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief at32f415 config header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,17 +1,19 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
this demo is based on the at-start board, in this demo, shows how to use
the can filter funciton. the can tool transmit 6 specified messages in total
(3 extended-id messages and 3 standard-id messages), when mcu receive one
expect id message, test_result will add one, if test success, only 4 filter
messages will be received, the three leds will toggle.
this demo is based on the at-start board and at32-comm-ev, in this demo,
shows how to use the can filter funciton. the can tool transmit 6 specified
messages in total (3 extended-id messages and 3 standard-id messages),
when mcu receive one expect id message, test_result will add one, if test
success, only 4 filter messages will be received, the three leds will toggle.
set-up
- can tx ---> pb9
- can rx ---> pb8
for more detailed information. please refer to the application note document AN0095.

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief system clock config program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file main.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main program
**************************************************************************
* Copyright notice & Disclaimer
@@ -100,9 +100,9 @@ static void can_configuration(void)
can_base_struct.mmssr_selection = CAN_SENDING_BY_ID;
can_base_init(CAN1, &can_base_struct);
/* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 10;
can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ;
/* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 6;
can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ;
can_baudrate_struct.bts1_size = CAN_BTS1_8TQ;
can_baudrate_struct.bts2_size = CAN_BTS2_3TQ;
can_baudrate_set(CAN1, &can_baudrate_struct);
@@ -135,6 +135,8 @@ static void can_configuration(void)
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
/* error interrupt enable */
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
}
@@ -292,10 +294,11 @@ void CAN1_SE_IRQHandler(void)
{
err_index = CAN1->ests & 0x70;
can_flag_clear(CAN1, CAN_ETR_FLAG);
/* error type is stuff error */
if(err_index == 0x00000010)
{
can_reset(CAN1);
can_configuration();
/* when stuff error occur: in order to ensure communication normally,
user must restart can or send a frame of highest priority message here */
}
}
}

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of clock program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_conf.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief at32f415 config header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file of main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,17 +1,19 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
this demo is based on the at-start board, in this demo, shows how to use
the can loopback mode. every 1s transmit one message and the led4 blink, if
the message can be received, led2 blink.
this demo is based on the at-start board and at32-comm-ev, in this demo,
shows how to use the can loopback mode. every 1s transmit one message
and the led4 blink, if the message can be received, led2 blink.
set-up
- can tx ---> pb9
- can rx ---> pb8
for more detailed information. please refer to the application note document AN0095.

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_clock.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief system clock config program
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_int.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main interrupt service routines.
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file main.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief main program
**************************************************************************
* Copyright notice & Disclaimer
@@ -87,9 +87,9 @@ static void can_configuration(void)
can_base_struct.mmssr_selection = CAN_SENDING_BY_ID;
can_base_init(CAN1, &can_base_struct);
/* can baudrate, set baudrate = pclk/(baudrate_div *(3 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 10;
can_baudrate_struct.rsaw_size = CAN_RSAW_1TQ;
/* can baudrate, set baudrate = pclk/(baudrate_div *(1 + bts1_size + bts2_size)) */
can_baudrate_struct.baudrate_div = 6;
can_baudrate_struct.rsaw_size = CAN_RSAW_3TQ;
can_baudrate_struct.bts1_size = CAN_BTS1_8TQ;
can_baudrate_struct.bts2_size = CAN_BTS2_3TQ;
can_baudrate_set(CAN1, &can_baudrate_struct);
@@ -110,6 +110,8 @@ static void can_configuration(void)
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
/* error interrupt enable */
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
}
@@ -168,10 +170,11 @@ void CAN1_SE_IRQHandler(void)
{
err_index = CAN1->ests & 0x70;
can_flag_clear(CAN1, CAN_ETR_FLAG);
/* error type is stuff error */
if(err_index == 0x00000010)
{
can_reset(CAN1);
can_configuration();
/* when stuff error occur: in order to ensure communication normally,
user must restart can or send a frame of highest priority message here */
}
}
}