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_board.c
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief set of firmware functions to manage leds and push-button.
* initialize delay function.
**************************************************************************
@@ -267,7 +267,7 @@ void at32_led_off(led_type led)
}
/**
* @brief turns selected led tooggle.
* @brief turns selected led toggle.
* @param led: specifies the led to be set off.
* this parameter can be one of following parameters:
* @arg LED2

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_board.h
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief header file for at-start board. set of firmware functions to
* manage leds and push-button. initialize delay function.
**************************************************************************

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -11,3 +11,4 @@
the adc1 internal channel17 to check vref value.
the convert data as follow:
- adc1_ordinary_value ---> adc1_channel_17
for more detailed information. please refer to the application note document AN0115.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -19,3 +19,4 @@
trigger source:
- ordinary --> exint line11(pc11)
- preempt --> exint line15(pa15)
for more detailed information. please refer to the application note document AN0115.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -11,3 +11,4 @@
the internal_temperature_sensor.
the convert data as follow:
- adc1_ordinary_value ---> adc1_channel_16
for more detailed information. please refer to the application note document AN0115.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -13,3 +13,4 @@
- adc1_ordinary_valuetab[n][0] ---> adc1_channel_4
- adc1_ordinary_valuetab[n][1] ---> adc1_channel_5
- adc1_ordinary_valuetab[n][2] ---> adc1_channel_6
for more detailed information. please refer to the application note document AN0115.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -17,3 +17,4 @@
- adc1_preempt_valuetab[n][0] ---> adc1_channel_7
- adc1_preempt_valuetab[n][1] ---> adc1_channel_8
- adc1_preempt_valuetab[n][2] ---> adc1_channel_9
for more detailed information. please refer to the application note document AN0115.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -14,3 +14,4 @@
- adc1_ordinary_valuetab[1] ---> adc1_channel_5
- adc1_ordinary_valuetab[2] ---> adc1_channel_6
the voltage monitoring channel is: adc1_channel_5
for more detailed information. please refer to the application note document AN0115.

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

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 */
}
}
}

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,12 +1,13 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
this example shows how to configure cmp to wakeup deep sleep mode, if wakeup
from deep sleep mode, usart1 will print some messages(pa9). the cmp_out(pa6) will
output the result of compare too.
output the result of compare too.for more detailed information. please refer to
the application note document AN0046.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -10,4 +10,5 @@
this example shows how to configure comp to get the comparison result, and
inernally connected to the input channel 1 of the tmr1. by input pwm(3khz - 1mhz)
to the cmp_in(pa1), the cmp_out(pa0) will output the result, and tmr1_ic1 will
also capture this cmp_out and print its pwm frequency through the usart1.
also capture this cmp_out and print its pwm frequency through the usart1.for more
detailed information. please refer to the application note document AN0046.

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

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,8 +1,8 @@
/**
**************************************************************************
* @file readme.txt
* @version v2.0.4
* @date 2022-04-02
* @version v2.0.5
* @date 2022-05-20
* @brief readme
**************************************************************************
*/
@@ -10,3 +10,4 @@
this demo is based on the at-start board, in this demo, modify the variables
by its bitband address and then read from bitband address. if the variables is
not the expected, led4 blink every 1s, else using bitband make the led2 toggle.
for more detailed information. please refer to the application note document AN0083.

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

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,12 +1,13 @@
/**
**************************************************************************
* @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, demonstrates the use the maximum,
minimum, mean, standard deviation, variance and matrix functions to calculate
statistical values of marks obtained in a class.
statistical values of marks obtained in a class.for more detailed information.
please refer to the application note document AN0036.

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

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,11 +1,12 @@
/**
**************************************************************************
* @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, systick interrupt
per milisecond and led2 fresh per 200 ms.
per milisecond and led2 fresh per 200 ms.for more detailed information.
please refer to the application note document AN0083.

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

Some files were not shown because too many files have changed in this diff Show More