Skip to content

Commit dea6723

Browse files
MPAE-1513: Updated MCC Core Version
1 parent b9ac5bf commit dea6723

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+4140
-4347
lines changed

.main-meta/main.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"metaDataVersion": "1.0.0",
2+
"metaDataVersion": "1.3.0",
33
"category": "com.microchip.ide.project",
44
"content": {
55
"metaDataVersion": "1.1.0",
66
"name": "com.microchip.mcu8.mplabx.project.avr128db48-blink-with-timer-mplab-mcc",
7-
"version": "1.0.0",
7+
"version": "1.1.0",
88
"displayName": "LED Blink using Timer",
99
"projectName": "avr128db48-blink-with-timer-mplab-mcc",
1010
"shortDescription": "This example uses the MCC Melody Library to show how to configure Timer/Counter A (TCA) in overflow interrupt mode to perform Pulse Width Modulation (PWM) using the AVR128DB48 Curiosity Nano development kit. Works with MPLAB X or MPLAB XPRESS IDE.",
@@ -37,14 +37,6 @@
3737
}
3838
},
3939
"author": "Erling Holten Wiken",
40-
"subcategories": [
41-
[
42-
"Peripherals", "TCA"
43-
],
44-
[
45-
"Peripherals", "PORT"
46-
]
47-
],
4840
"peripherals": [
4941
"TCA", "PORT"
5042
],

avr128db48-LED_Blink-using-timer-mcc-1.1.0.X/avr128db48-LED_Blink-using-timer-mcc-1.0.0.mc3

Lines changed: 209 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* MAIN Generated Driver File
3+
*
4+
* @file main.c
5+
*
6+
* @defgroup main MAIN
7+
*
8+
* @brief This is the generated driver implementation file for the MAIN driver.
9+
*
10+
* @version MAIN Driver Version 1.0.0
11+
*/
12+
13+
/*
14+
© [2022] Microchip Technology Inc. and its subsidiaries.
15+
16+
Subject to your compliance with these terms, you may use Microchip
17+
software and any derivatives exclusively with Microchip products.
18+
You are responsible for complying with 3rd party license terms
19+
applicable to your use of 3rd party software (including open source
20+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
21+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
22+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
23+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
24+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
25+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
26+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
27+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
28+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
29+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
30+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
31+
THIS SOFTWARE.
32+
*/
33+
#include "mcc_generated_files/system/system.h"
34+
35+
/*
36+
Main application
37+
*/
38+
39+
int main(void)
40+
{
41+
SYSTEM_Initialize();
42+
43+
44+
while(1)
45+
{
46+
}
47+
}
48+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/**
2+
@Company
3+
Microchip Technology Inc.
4+
5+
@Description
6+
This Source file provides APIs.
7+
Generation Information :
8+
Driver Version : 1.0.0
9+
*/
10+
/*
11+
© [2022] Microchip Technology Inc. and its subsidiaries.
12+
13+
Subject to your compliance with these terms, you may use Microchip
14+
software and any derivatives exclusively with Microchip products.
15+
You are responsible for complying with 3rd party license terms
16+
applicable to your use of 3rd party software (including open source
17+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
18+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
19+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
20+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
21+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
22+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
23+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
24+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
25+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
26+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
27+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
28+
THIS SOFTWARE.
29+
*/
30+
31+
32+
#ifndef CPU_CCP_H
33+
#define CPU_CCP_H
34+
35+
#include "../system/utils/compiler.h"
36+
#include "../system/protected_io.h"
37+
38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif
41+
42+
/**
43+
* \brief Write to a CCP-protected 8-bit I/O register
44+
*
45+
* \param addr Address of the I/O register
46+
* \param value Value to be written
47+
*
48+
* \note Using IAR Embedded workbench, the choice of memory model has an impact
49+
* on calling convention. The memory model is not visible to the
50+
* preprocessor, so it must be defined in the Assembler preprocessor directives.
51+
*/
52+
static inline void ccp_write_io(void *addr, uint8_t value)
53+
{
54+
protected_write_io(addr, CCP_IOREG_gc, value);
55+
}
56+
57+
/** @} */
58+
59+
/**
60+
* \brief Write to CCP-protected 8-bit SPM register
61+
*
62+
* \param addr Address of the SPM register
63+
* \param value Value to be written
64+
*
65+
* \note Using IAR Embedded workbench, the choice of memory model has an impact
66+
* on calling convention. The memory model is not visible to the
67+
* preprocessor, so it must be defined in the Assembler preprocessor directives.
68+
*/
69+
static inline void ccp_write_spm(void *addr, uint8_t value)
70+
{
71+
protected_write_io(addr, CCP_SPM_gc, value);
72+
}
73+
74+
/** @} */
75+
76+
#ifdef __cplusplus
77+
}
78+
#endif
79+
80+
#endif /* CPU_CCP_H */
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* CLKCTRL Generated Driver API Header File
3+
*
4+
* @file clkctrl.h
5+
*
6+
* @defgroup clkctrl CLKCTRL
7+
*
8+
* @brief This header file provides APIs for the CLKCTRL driver.
9+
*
10+
* @version CLKCTRL Driver Version 1.0.2
11+
*/
12+
/*
13+
© [2022] Microchip Technology Inc. and its subsidiaries.
14+
15+
Subject to your compliance with these terms, you may use Microchip
16+
software and any derivatives exclusively with Microchip products.
17+
You are responsible for complying with 3rd party license terms
18+
applicable to your use of 3rd party software (including open source
19+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
20+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
21+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
22+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
23+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
24+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
25+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
26+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
27+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
28+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
29+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
30+
THIS SOFTWARE.
31+
*/
32+
33+
34+
#ifndef CLOCK_H
35+
#define CLOCK_H
36+
37+
#ifndef F_CPU
38+
#define F_CPU 4000000UL
39+
#endif
40+
41+
#include "ccp.h"
42+
43+
#define CLKCTRL_TIMEBASE_VALUE ((uint8_t)ceil(F_CPU * 0.000001))
44+
45+
/**
46+
* @ingroup clkctrl
47+
* @brief Initialize CLKCTRL module
48+
* @param none
49+
* @return none
50+
*/
51+
void CLOCK_Initialize(void);
52+
53+
/**
54+
* @ingroup clkctrl
55+
* @brief Enable Clock Failure Detection on main clock
56+
* @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
57+
* @return none
58+
*/
59+
void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);
60+
61+
/**
62+
* @ingroup clkctrl
63+
* @brief Disable Clock Failure Detection on main clock
64+
* @param none
65+
* @return none
66+
*/
67+
void CFD_Disable();
68+
69+
#endif // CLOCK_H
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/**
2+
* CONFIGURATION BITS Generated Driver Header File
3+
*
4+
* @file config_bits.h
5+
*
6+
* @defgroup config_bitsdriver CONFIGBITS Driver
7+
*
8+
* @brief This is the generated header file for the CONFIGURATION BITS.
9+
*
10+
* @version Driver Version 1.0.0
11+
*/
12+
13+
/*
14+
© [2022] Microchip Technology Inc. and its subsidiaries.
15+
16+
Subject to your compliance with these terms, you may use Microchip
17+
software and any derivatives exclusively with Microchip products.
18+
You are responsible for complying with 3rd party license terms
19+
applicable to your use of 3rd party software (including open source
20+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
21+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
22+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
23+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
24+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
25+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
26+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
27+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
28+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
29+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
30+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
31+
THIS SOFTWARE.
32+
*/
33+
34+
#ifndef CONFIG_BITS_H
35+
#define CONFIG_BITS_H
36+
37+
/**
38+
Section: Included Files
39+
*/
40+
#include "../system/clock.h"
41+
42+
#endif //CONFIG_BITS_H
43+
/**
44+
End of File
45+
*/
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* Interrupt Manager Generated Driver API Header File
3+
*
4+
* @file interrupt.h
5+
*
6+
* @defgroup interrupt INTERRUPT
7+
*
8+
* @brief This file contains API prototypes and other datatypes for the Interrupt Manager.
9+
*
10+
* @version Interrupt Manager Driver Version 1.0.0
11+
*/
12+
13+
/*
14+
© [2022] Microchip Technology Inc. and its subsidiaries.
15+
16+
Subject to your compliance with these terms, you may use Microchip
17+
software and any derivatives exclusively with Microchip products.
18+
You are responsible for complying with 3rd party license terms
19+
applicable to your use of 3rd party software (including open source
20+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
21+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
22+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
23+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
24+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
25+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
26+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
27+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
28+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
29+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
30+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
31+
THIS SOFTWARE.
32+
*/
33+
34+
35+
#ifndef INTERRUPT_H
36+
#define INTERRUPT_H
37+
38+
#include "../system/utils/compiler.h"
39+
#include "ccp.h"
40+
#include "../system/utils/atomic.h"
41+
42+
#ifdef __cplusplus
43+
extern "C" {
44+
#endif
45+
46+
/**
47+
* @ingroup interrupt
48+
* @brief This API initializes and configures the Interrupt registers and be called before any other Interrupt routines.
49+
* @param void
50+
* @return int8_t - initialization status
51+
*/
52+
int8_t CPUINT_Initialize();
53+
54+
#ifdef __cplusplus
55+
}
56+
#endif
57+
58+
#endif /* INTERRUPT_H */

0 commit comments

Comments
 (0)