Giter Club home page Giter Club logo

pdk-includes's Introduction

pdk-includes

This repository contains include files for Padauk MCUs.

Example code that uses these include files can be found here: free-pdk-examples

Warning: This is a work in progress and may change significantly before being considered stable. Use at your own risk.

This repo is intended to be integrated into other projects either as a git Submodule or by manual file copy.

This repo should be installed into a pdk/ subdirectory in the root includes directory of a parent project.

To install as a git Submodule:

These include files assume the use of:

File Layout:

  • device.h - The main include file.
    • Factory that pulls in the appropriate device/XXX.h include file and other supporting files.
      • NOTE: Requires definition of the intended Padauk IC device, usually by specifying -D$(DEVICE) on the SDCC command line
  • device/XXX.h - The main device specific include files, one per device.
    • Contain device specific configuration values like: register addresses, fuse address/values, factory calibration address(es), peripheral configuration, etc...
    • Usually pulled in automatically by including device.h.
      • NOTE: If needed, up to one of these can be included manually instead of by including device.h. Doing so may also require manual inclusion of the other include files below.
  • device/periph/XXX.h - Common device peripheral include files.
    • Contain peripheral specific register __sfr and value definitions.
    • The appropriate ones are pulled in automatically by device/XXX.h files.
    • When there is enough commonality between devices, they share the same peripheral file (with some configurability allowed), otherwise the peripheral files are split and the device/XXX.h file pulls in the appropriate one.
  • util.h - Common utility macros.
    • Contains macros for built-in opcodes and inline assembler statements
    • This is pulled in automatically by device.h
  • fuse.h -
    • Contains a macro for setting the FUSE word at the appropriate address.
      • The FUSE address is usually the last word of the device
      • Requires definition of FUSE_ADDR and FUSE values, usually performed by device/XXX.h.
    • This is pulled in automatically by device.h
  • factory_calibration.h - Factory calibration macros
    • Contains macros for using factory installed calibration values (IHRCR and/or BGTR).
      • OTP devices usually only include factory calibration for BGTR (bandgap)
      • MTP devices usually contain factory calibration for boty IHRCR (internal 16MHz high speed oscillator) as well at BGTR (bandgap)
      • Requires definition of FACTORY_IHRCR_ADDR and/or FACTORY_BGTR_ADDR values, usually performed by device/XXX.h.
    • This is pulled in automatically by device.h
  • sysclock.h - System clock macros
    • Contains macros for setting the system clock to the various IHRC and ILRC frequencies.
      • Requires definition of CLKMD_* values, usually performed by device/XXX.h.
    • This is pulled in automatically by device.h

Copyright and License:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.