annotate include/pruss_intc_mapping.h @ 151:e9c9404e3d1f ClockSync

Pff partially working. No PID. When setting the audio clock on the bbb to 44098 the master and slave clock keep diverging instead of converging ...
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 22 Sep 2015 04:10:07 +0100
parents 901d205d1a3c
children
rev   line source
andrewm@0 1 /*
andrewm@0 2 * pruss_intc_mapping.h
andrewm@15 3 *
andrewm@0 4 * Example PRUSS INTC mapping for the application
andrewm@0 5 *
andrewm@15 6 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
andrewm@15 7 *
andrewm@15 8 *
andrewm@15 9 * Redistribution and use in source and binary forms, with or without
andrewm@15 10 * modification, are permitted provided that the following conditions
andrewm@0 11 * are met:
andrewm@0 12 *
andrewm@15 13 * Redistributions of source code must retain the above copyright
andrewm@0 14 * notice, this list of conditions and the following disclaimer.
andrewm@0 15 *
andrewm@0 16 * Redistributions in binary form must reproduce the above copyright
andrewm@15 17 * notice, this list of conditions and the following disclaimer in the
andrewm@15 18 * documentation and/or other materials provided with the
andrewm@0 19 * distribution.
andrewm@0 20 *
andrewm@0 21 * Neither the name of Texas Instruments Incorporated nor the names of
andrewm@0 22 * its contributors may be used to endorse or promote products derived
andrewm@0 23 * from this software without specific prior written permission.
andrewm@0 24 *
andrewm@15 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
andrewm@15 26 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
andrewm@0 27 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
andrewm@15 28 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
andrewm@15 29 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
andrewm@15 30 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
andrewm@0 31 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
andrewm@0 32 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
andrewm@15 33 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
andrewm@15 34 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
andrewm@0 35 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
andrewm@0 36 *
andrewm@0 37 */
andrewm@0 38
andrewm@0 39 /*
andrewm@0 40 * ============================================================================
andrewm@0 41 * Copyright (c) Texas Instruments Inc 2010-11
andrewm@0 42 *
andrewm@0 43 * Use of this software is controlled by the terms and conditions found in the
andrewm@0 44 * license agreement under which this software has been supplied or provided.
andrewm@0 45 * ============================================================================
andrewm@0 46 */
andrewm@0 47
andrewm@0 48 #define AM33XX
andrewm@0 49 #ifdef AM33XX
andrewm@0 50 #define PRU0_PRU1_INTERRUPT 17
andrewm@0 51 #define PRU1_PRU0_INTERRUPT 18
andrewm@0 52 #define PRU0_ARM_INTERRUPT 19
andrewm@0 53 #define PRU1_ARM_INTERRUPT 20
andrewm@0 54 #define ARM_PRU0_INTERRUPT 21
andrewm@0 55 #define ARM_PRU1_INTERRUPT 22
andrewm@0 56 #else
andrewm@0 57 #define PRU0_PRU1_INTERRUPT 32
andrewm@0 58 #define PRU1_PRU0_INTERRUPT 33
andrewm@0 59 #define PRU0_ARM_INTERRUPT 34
andrewm@0 60 #define PRU1_ARM_INTERRUPT 35
andrewm@0 61 #define ARM_PRU0_INTERRUPT 36
andrewm@0 62 #define ARM_PRU1_INTERRUPT 37
andrewm@0 63 #endif
andrewm@0 64 #define CHANNEL0 0
andrewm@0 65 #define CHANNEL1 1
andrewm@0 66 #define CHANNEL2 2
andrewm@0 67 #define CHANNEL3 3
andrewm@0 68 #define CHANNEL4 4
andrewm@0 69 #define CHANNEL5 5
andrewm@0 70 #define CHANNEL6 6
andrewm@0 71 #define CHANNEL7 7
andrewm@0 72 #define CHANNEL8 8
andrewm@0 73 #define CHANNEL9 9
andrewm@0 74
andrewm@0 75 #define PRU0 0
andrewm@0 76 #define PRU1 1
andrewm@0 77 #define PRU_EVTOUT0 2
andrewm@0 78 #define PRU_EVTOUT1 3
andrewm@0 79 #define PRU_EVTOUT2 4
andrewm@0 80 #define PRU_EVTOUT3 5
andrewm@0 81 #define PRU_EVTOUT4 6
andrewm@0 82 #define PRU_EVTOUT5 7
andrewm@0 83 #define PRU_EVTOUT6 8
andrewm@0 84 #define PRU_EVTOUT7 9
andrewm@0 85
andrewm@0 86 #define PRU0_HOSTEN_MASK 0x0001
andrewm@0 87 #define PRU1_HOSTEN_MASK 0x0002
andrewm@0 88 #define PRU_EVTOUT0_HOSTEN_MASK 0x0004
andrewm@0 89 #define PRU_EVTOUT1_HOSTEN_MASK 0x0008
andrewm@0 90 #define PRU_EVTOUT2_HOSTEN_MASK 0x0010
andrewm@0 91 #define PRU_EVTOUT3_HOSTEN_MASK 0x0020
andrewm@0 92 #define PRU_EVTOUT4_HOSTEN_MASK 0x0040
andrewm@0 93 #define PRU_EVTOUT5_HOSTEN_MASK 0x0080
andrewm@0 94 #define PRU_EVTOUT6_HOSTEN_MASK 0x0100
andrewm@0 95 #define PRU_EVTOUT7_HOSTEN_MASK 0x0200
andrewm@0 96
andrewm@0 97
andrewm@0 98 #define PRUSS_INTC_INITDATA { \
andrewm@15 99 { PRU0_PRU1_INTERRUPT, PRU1_PRU0_INTERRUPT, PRU0_ARM_INTERRUPT, PRU1_ARM_INTERRUPT, ARM_PRU0_INTERRUPT, ARM_PRU1_INTERRUPT, (char)-1 }, \
andrewm@0 100 { {PRU0_PRU1_INTERRUPT,CHANNEL1}, {PRU1_PRU0_INTERRUPT, CHANNEL0}, {PRU0_ARM_INTERRUPT,CHANNEL2}, {PRU1_ARM_INTERRUPT, CHANNEL3}, {ARM_PRU0_INTERRUPT, CHANNEL0}, {ARM_PRU1_INTERRUPT, CHANNEL1}, {-1,-1}}, \
andrewm@0 101 { {CHANNEL0,PRU0}, {CHANNEL1, PRU1}, {CHANNEL2, PRU_EVTOUT0}, {CHANNEL3, PRU_EVTOUT1}, {-1,-1} }, \
andrewm@0 102 (PRU0_HOSTEN_MASK | PRU1_HOSTEN_MASK | PRU_EVTOUT0_HOSTEN_MASK | PRU_EVTOUT1_HOSTEN_MASK) /*Enable PRU0, PRU1, PRU_EVTOUT0 */ \
andrewm@0 103 } \
andrewm@0 104