2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-30 02:40:53 +02:00
|
|
|
* arch/avr/src/at32uc3/at32uc3_lowinit.c
|
2010-10-08 03:34:16 +02:00
|
|
|
*
|
2021-03-28 15:35:35 +02:00
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
|
|
* this work for additional information regarding copyright ownership. The
|
|
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
* "License"); you may not use this file except in compliance with the
|
|
|
|
* License. You may obtain a copy of the License at
|
2010-10-08 03:34:16 +02:00
|
|
|
*
|
2021-03-28 15:35:35 +02:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2010-10-08 03:34:16 +02:00
|
|
|
*
|
2021-03-28 15:35:35 +02:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
* License for the specific language governing permissions and limitations
|
|
|
|
* under the License.
|
2010-10-08 03:34:16 +02:00
|
|
|
*
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Included Files
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
|
|
|
#include <nuttx/config.h>
|
|
|
|
|
2010-10-30 02:40:53 +02:00
|
|
|
#include "at32uc3_config.h"
|
2010-10-08 03:34:16 +02:00
|
|
|
#include "up_internal.h"
|
2015-12-30 01:07:11 +01:00
|
|
|
#include "at32uc3.h"
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2015-04-08 16:04:12 +02:00
|
|
|
* Pre-processor Definitions
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Private Types
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Private Function Prototypes
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* Public Data
|
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2016-02-22 01:06:09 +01:00
|
|
|
* Private Data
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Private Functions
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Public Functions
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
2015-10-03 01:42:29 +02:00
|
|
|
/****************************************************************************
|
2010-10-08 03:34:16 +02:00
|
|
|
* Name: up_lowinit
|
|
|
|
*
|
|
|
|
* Description:
|
|
|
|
* This performs basic initialization of the USART used for the serial
|
2019-08-04 22:50:28 +02:00
|
|
|
* console. Its purpose is to get the console output available as soon
|
2010-10-08 03:34:16 +02:00
|
|
|
* as possible.
|
|
|
|
*
|
2015-10-03 01:42:29 +02:00
|
|
|
****************************************************************************/
|
2010-10-08 03:34:16 +02:00
|
|
|
|
|
|
|
void up_lowinit(void)
|
|
|
|
{
|
|
|
|
/* Initialize MCU clocking */
|
|
|
|
|
2010-10-08 04:21:43 +02:00
|
|
|
up_clkinitialize();
|
|
|
|
|
2010-10-09 04:16:20 +02:00
|
|
|
/* Initialize a console (probably a serial console) */
|
2010-10-08 04:21:43 +02:00
|
|
|
|
|
|
|
up_consoleinit();
|
2010-10-08 03:34:16 +02:00
|
|
|
|
|
|
|
/* Perform early serial initialization (so that we will have debug output
|
2010-10-08 04:21:43 +02:00
|
|
|
* available as soon as possible).
|
2010-10-08 03:34:16 +02:00
|
|
|
*/
|
|
|
|
|
2012-02-11 04:50:52 +01:00
|
|
|
#ifdef USE_EARLYSERIALINIT
|
2010-10-08 03:34:16 +02:00
|
|
|
up_earlyserialinit();
|
2010-10-08 04:21:43 +02:00
|
|
|
#endif
|
2010-10-08 03:34:16 +02:00
|
|
|
|
|
|
|
/* Perform board-level initialization */
|
|
|
|
|
2015-02-28 14:14:37 +01:00
|
|
|
at32uc3_boardinitialize();
|
2010-10-08 03:34:16 +02:00
|
|
|
}
|