Skip to content

Commit

Permalink
MPAE-15324: Updated MCC Version and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
RunarSaureMicrochip authored and egilro committed Feb 9, 2023
1 parent 319cb61 commit 99bc7e1
Show file tree
Hide file tree
Showing 31 changed files with 1,329 additions and 1,372 deletions.
22 changes: 8 additions & 14 deletions .main-meta/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
"metaDataVersion": "1.0.0",
"category": "com.microchip.ide.project",
"content": {
"metaDataVersion": "1.1.0",
"metaDataVersion": "1.3.0",
"name": "com.microchip.mcu8.mplabx.project.avr128db48-blink-sw-delay-mplab-mcc",
"version": "1.0.0",
"version": "1.1.0",
"displayName": "LED Blink using software delay",
"projectName": "avr128db48-blink-sw-delay-mplab-mcc",
"shortDescription": "This example uses the MCC Melody Library to show how to configure the device with a software delay and blink the LED on the AVR128DB48 Curiosity Nano development kit",
"ide": {
"name": "MPLAB X",
"semverRange": ">=5.45.0"
"semverRange": ">=6.0.0"
},
"compiler": [
{
"name": "XC8",
"semverRange": "^2.32.0"
"semverRange": "^2.40.0"
}
],
"dfp": {
"name": "AVR-Dx_DFP",
"semverRange": "^1.7.98"
"semverRange": "^2.3.272"
},
"configurator": {
"name": "MCC",
"semverRange": ">=4.1.0"
"semverRange": ">=5.1.17"
},
"device": {
"metaDataVersion": "1.0.0",
Expand All @@ -37,17 +37,11 @@
}
},
"author": "Amund Aune",
"subcategories": [
[
"Peripherals", "PORT"
]
],
"peripherals": [
"PORT"
"GPIO"
],
"keywords": [
"PORT",
"Delay",
"GPIO",
"LED",
"Curiosity Nano",
"Melody"
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ This example shows how to configure an LED to blink periodically using drivers i
## Related Documentation

- [AVR128DB48 device page](https://www.microchip.com/wwwproducts/en/AVR128DB48)
- [MPLAB Code Configurator](https://www.microchip.com/en-us/development-tools-tools-and-software/embedded-software-center/mplab-code-configurator)
- [MPLAB® Code Configurator](https://www.microchip.com/en-us/development-tools-tools-and-software/embedded-software-center/mplab-code-configurator)


## Software Used

- [MPLAB® X IDE v5.45](https://www.microchip.com/mplab/mplab-x-ide) or newer
- [MPLAB® X IDE v6.0](https://www.microchip.com/mplab/mplab-x-ide) or newer
- [MPLAB® Xpress IDE](https://www.microchip.com/xpress) (alternative to MPLAB X IDE)
- [XC8 Compiler v2.32](https://www.microchip.com/mplab/compilers) or newer
- [MPLAB® Code Configurator (MCC) v4.1.0](https://www.microchip.com/mplab/mplab-code-configurator) or newer
- [XC8 Compiler v2.40](https://www.microchip.com/mplab/compilers) or newer
- [MPLAB® Code Configurator (MCC) v5.1.17](https://www.microchip.com/mplab/mplab-code-configurator) or newer
- [MPLAB® Melody Library 1.37.26 or newer](https://www.microchip.com/mplab/mplab-code-configurator) or newer
- [MCC Device Libraries 8-bit AVR MCUs 2.7.0](https://www.microchip.com/mplab/mplab-code-configurator) or newer
- [Microchip AVR128DB48 Device Support Pack AVR-Dx_DFP 1.7.98](https://packs.download.microchip.com/) or newer
- [Microchip AVR128DB48 Device Support Pack AVR-Dx_DFP 2.3.272](https://packs.download.microchip.com/) or newer

## Hardware Used

- [AVR128DB48 Curiosity Nano](https://www.microchip.com/DevelopmentTools/ProductDetails/PartNO/EV35L43A)


## Setup
MCC with the Melody library was used to implement this example as shown in the following sections.
This example uses MCC with the Melody library, as shown below.

### Delay Driver
The Delay Driver was simply added to the project by locating it in the Device Resources pane on the left side in MCC and clicking the green plus icon as shown in the image below.
Expand Down
166 changes: 100 additions & 66 deletions avr128db48-blink-sw-delay-mplab-mcc.X/avr128db48-blink-mplab-mcc.mc3

Large diffs are not rendered by default.

69 changes: 34 additions & 35 deletions avr128db48-blink-sw-delay-mplab-mcc.X/main.c
Original file line number Diff line number Diff line change
@@ -1,50 +1,49 @@
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
* MAIN Generated Driver File
*
* @file main.c
*
* @defgroup main MAIN
*
* @brief This is the generated driver implementation file for the MAIN driver.
*
* @version MAIN Driver Version 1.0.0
*/

All rights reserved.
/*
� [2022] Microchip Technology Inc. and its subsidiaries.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
*/
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/
#include "mcc_generated_files/system/system.h"
#include "mcc_generated_files/timer/delay.h"

/*
Main application
*/
*/

int main(void)
{
SYSTEM_Initialize();

while(1)
while (1)
{
LED_PIN_Toggle();
DELAY_milliseconds(500);
}
LED_PIN_Toggle();
DELAY_milliseconds(500);
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
/**
\defgroup doc_driver_delay Delay Drivers
@addtogroup delay



\section doc_driver_delay_driver Delay drivers for PIC and AVR
@section delay_basics Delay drivers for PIC and AVR

The MPLAB XC8 and XC16 compilers have built-in delay functions or macros for when users need to tell the MCU to wait for a certain amount of time.
For these delay functions, time is measured in microseconds or milliseconds, and for PIC32 devices, in timer ticks as well. Format for invoking the macros
will vary from device to device but this delay driver can help abstract these format differences.

\section doc_driver_delay_driver_use How to use the delay drivers
@section delay_uses How to use the delay drivers

To use the delay drivers, just include the delay.h file wherever you intend to use the delay function and call the DELAY_milliseconds(time) or DELAY_microseconds(time) function where
<i>time</i> is the number of milliseconds or microseconds to delay.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,24 @@
Driver Version : 1.0.0
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
© [2022] Microchip Technology Inc. and its subsidiaries.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/


Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,69 @@
/**
@Company
Microchip Technology Inc.
@Description
This Source file provides APIs.
Generation Information :
Driver Version : 1.0.0
* CLKCTRL Generated Driver API Header File
*
* @file clkctrl.h
*
* @defgroup clkctrl CLKCTRL
*
* @brief This header file provides APIs for the CLKCTRL driver.
*
* @version CLKCTRL Driver Version 1.0.2
*/
/*
Copyright (c) [2012-2020] Microchip Technology Inc.
All rights reserved.
You are permitted to use the accompanying software and its derivatives
with Microchip products. See the Microchip license agreement accompanying
this software, if any, for additional info regarding your rights and
obligations.
MICROCHIP SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT
WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT
AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP OR ITS
LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT
LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE
THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT
LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES,
OR OTHER SIMILAR COSTS.
To the fullest extend allowed by law, Microchip and its licensors
liability will not exceed the amount of fees, if any, that you paid
directly to Microchip to use this software.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any
third party software accompanying this software is subject to the terms
and conditions of the third party's license agreement. To the extent
required by third party licenses covering such third party software,
the terms of such license will apply in lieu of the terms provided in
this notice or applicable license. To the extent the terms of such
third party licenses prohibit any of the restrictions described here,
such restrictions will not apply to such third party software.
© [2022] Microchip Technology Inc. and its subsidiaries.
Subject to your compliance with these terms, you may use Microchip
software and any derivatives exclusively with Microchip products.
You are responsible for complying with 3rd party license terms
applicable to your use of 3rd party software (including open source
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
THIS SOFTWARE.
*/


#ifndef CLOCK_CONFIG_H
#define CLOCK_CONFIG_H
#ifndef CLOCK_H
#define CLOCK_H

#ifndef F_CPU
#define F_CPU 4000000
#define F_CPU 4000000UL
#endif

#include "ccp.h"

#define CLKCTRL_TIMEBASE_VALUE ((uint8_t)ceil(F_CPU * 0.000001))

/**
* @ingroup clkctrl
* @brief Initialize CLKCTRL module
* @param none
* @return none
*/
void CLOCK_Initialize(void);

#endif // CLOCK_CONFIG_H
/**
* @ingroup clkctrl
* @brief Enable Clock Failure Detection on main clock
* @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
* @return none
*/
void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);

/**
* @ingroup clkctrl
* @brief Disable Clock Failure Detection on main clock
* @param none
* @return none
*/
void CFD_Disable();

#endif // CLOCK_H
Loading

0 comments on commit 99bc7e1

Please sign in to comment.