mirror of https://github.com/ArduPilot/ardupilot
Linux_HAL_Essentials: Restructure BeagleBone PRU firmware for BBBmini and BeagleBone Blue
This commit is contained in:
parent
6d99bb0937
commit
d0fce3b1d7
|
@ -1,5 +1,6 @@
|
|||
RcAioPRU: RcAioPRU.p
|
||||
pasm -V3 -c RcAioPRU.p
|
||||
pasm -V3 -c RcAioPRU.p RcAioPRU_BBBMINI -DBBBMINI
|
||||
pasm -V3 -c RcAioPRU.p RcAioPRU_BBBLUE -DBBBLUE
|
||||
|
||||
test: RcAioPRUTest.c
|
||||
gcc -g -o RcAioPRUTest RcAioPRUTest.c
|
||||
|
|
|
@ -126,6 +126,7 @@
|
|||
#define RCIN_RINGBUFFER_RAM_OFFSET 0x1004
|
||||
|
||||
// RCOut pins
|
||||
#ifdef BBBMINI
|
||||
#define RC_CH_1_PIN r30.t10
|
||||
#define RC_CH_2_PIN r30.t8
|
||||
#define RC_CH_3_PIN r30.t11
|
||||
|
@ -138,6 +139,18 @@
|
|||
#define RC_CH_10_PIN r30.t2
|
||||
#define RC_CH_11_PIN r30.t1
|
||||
#define RC_CH_12_PIN r30.t0
|
||||
#endif
|
||||
|
||||
#ifdef BBBLUE
|
||||
#define RC_CH_1_PIN r30.t8
|
||||
#define RC_CH_2_PIN r30.t10
|
||||
#define RC_CH_3_PIN r30.t9
|
||||
#define RC_CH_4_PIN r30.t11
|
||||
#define RC_CH_5_PIN r30.t6
|
||||
#define RC_CH_6_PIN r30.t7
|
||||
#define RC_CH_7_PIN r30.t4
|
||||
#define RC_CH_8_PIN r30.t5
|
||||
#endif
|
||||
|
||||
// RCOut enable bits
|
||||
#define RC_CH_1_ENABLE register.ch_enable.t0
|
||||
|
@ -376,10 +389,14 @@ mainloop:
|
|||
RCOUT_PWM RC_CH_6_PIN, register.ch_6_next_time, RC_CH_6_ENABLE, CH_6_PULSE_TIME_RAM_OFFSET, CH_6_T_TIME_RAM_OFFSET
|
||||
RCOUT_PWM RC_CH_7_PIN, register.ch_7_next_time, RC_CH_7_ENABLE, CH_7_PULSE_TIME_RAM_OFFSET, CH_7_T_TIME_RAM_OFFSET
|
||||
RCOUT_PWM RC_CH_8_PIN, register.ch_8_next_time, RC_CH_8_ENABLE, CH_8_PULSE_TIME_RAM_OFFSET, CH_8_T_TIME_RAM_OFFSET
|
||||
#ifdef BBBMINI
|
||||
RCOUT_PWM RC_CH_9_PIN, register.ch_9_next_time, RC_CH_9_ENABLE, CH_9_PULSE_TIME_RAM_OFFSET, CH_9_T_TIME_RAM_OFFSET
|
||||
RCOUT_PWM RC_CH_10_PIN, register.ch_10_next_time, RC_CH_10_ENABLE, CH_10_PULSE_TIME_RAM_OFFSET, CH_10_T_TIME_RAM_OFFSET
|
||||
RCOUT_PWM RC_CH_11_PIN, register.ch_11_next_time, RC_CH_11_ENABLE, CH_11_PULSE_TIME_RAM_OFFSET, CH_11_T_TIME_RAM_OFFSET
|
||||
RCOUT_PWM RC_CH_12_PIN, register.ch_12_next_time, RC_CH_12_ENABLE, CH_12_PULSE_TIME_RAM_OFFSET, CH_12_T_TIME_RAM_OFFSET
|
||||
#endif
|
||||
RCIN_ECAP
|
||||
// MAX_CYCLE_TIME
|
||||
#ifdef DEBUG
|
||||
MAX_CYCLE_TIME
|
||||
#endif
|
||||
jmp mainloop
|
||||
|
|
|
@ -0,0 +1,216 @@
|
|||
|
||||
|
||||
/* This file contains the PRU instructions in a C array which are to */
|
||||
/* be downloaded from the host CPU to the PRU instruction memory. */
|
||||
/* This file is generated by the PRU assembler. */
|
||||
|
||||
const unsigned int PRUcode[] = {
|
||||
0x240000fe,
|
||||
0x2effaf84,
|
||||
0x240000f9,
|
||||
0x81643899,
|
||||
0x241004f4,
|
||||
0x24012cf6,
|
||||
0x241000f7,
|
||||
0x241002f8,
|
||||
0x240000f9,
|
||||
0xe1001799,
|
||||
0xe1001899,
|
||||
0x2403e8e5,
|
||||
0x2407d0e6,
|
||||
0x240bb8e7,
|
||||
0x240fa0e8,
|
||||
0x241388e9,
|
||||
0x241770ea,
|
||||
0x241b58eb,
|
||||
0x241f40ec,
|
||||
0x242328ed,
|
||||
0x242710ee,
|
||||
0x242af8ef,
|
||||
0x242ee0f0,
|
||||
0x240000e4,
|
||||
0x81003884,
|
||||
0x240002d9,
|
||||
0x24cec099,
|
||||
0x81043899,
|
||||
0x810c3899,
|
||||
0x81143899,
|
||||
0x811c3899,
|
||||
0x81243899,
|
||||
0x812c3899,
|
||||
0x81343899,
|
||||
0x813c3899,
|
||||
0x81443899,
|
||||
0x814c3899,
|
||||
0x81543899,
|
||||
0x815c3899,
|
||||
0x24003dd9,
|
||||
0x24090099,
|
||||
0x81083899,
|
||||
0x81103899,
|
||||
0x81183899,
|
||||
0x81203899,
|
||||
0x81283899,
|
||||
0x81303899,
|
||||
0x81383899,
|
||||
0x81403899,
|
||||
0x81483899,
|
||||
0x81503899,
|
||||
0x81583899,
|
||||
0x81603899,
|
||||
0x240010f9,
|
||||
0x81003a99,
|
||||
0x24ffffd9,
|
||||
0x24ffff99,
|
||||
0x810c3a99,
|
||||
0x91003a99,
|
||||
0x1301f9f9,
|
||||
0x81003a99,
|
||||
0x24010bf9,
|
||||
0x81282399,
|
||||
0x240092f9,
|
||||
0x812a2399,
|
||||
0x91003884,
|
||||
0x910c3a91,
|
||||
0x04f1e5f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1e5,
|
||||
0xd108fe06,
|
||||
0x91043899,
|
||||
0x00f9e5e5,
|
||||
0xc900e408,
|
||||
0x1f08fefe,
|
||||
0x21005300,
|
||||
0x9104389a,
|
||||
0x91083899,
|
||||
0x04faf9f9,
|
||||
0x00f9e5e5,
|
||||
0x1d08fefe,
|
||||
0x04f1e6f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1e6,
|
||||
0xd10afe06,
|
||||
0x910c3899,
|
||||
0x00f9e6e6,
|
||||
0xc901e408,
|
||||
0x1f0afefe,
|
||||
0x21006300,
|
||||
0x910c389a,
|
||||
0x91103899,
|
||||
0x04faf9f9,
|
||||
0x00f9e6e6,
|
||||
0x1d0afefe,
|
||||
0x04f1e7f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1e7,
|
||||
0xd109fe06,
|
||||
0x91143899,
|
||||
0x00f9e7e7,
|
||||
0xc902e408,
|
||||
0x1f09fefe,
|
||||
0x21007300,
|
||||
0x9114389a,
|
||||
0x91183899,
|
||||
0x04faf9f9,
|
||||
0x00f9e7e7,
|
||||
0x1d09fefe,
|
||||
0x04f1e8f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1e8,
|
||||
0xd10bfe06,
|
||||
0x911c3899,
|
||||
0x00f9e8e8,
|
||||
0xc903e408,
|
||||
0x1f0bfefe,
|
||||
0x21008300,
|
||||
0x911c389a,
|
||||
0x91203899,
|
||||
0x04faf9f9,
|
||||
0x00f9e8e8,
|
||||
0x1d0bfefe,
|
||||
0x04f1e9f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1e9,
|
||||
0xd106fe06,
|
||||
0x91243899,
|
||||
0x00f9e9e9,
|
||||
0xc904e408,
|
||||
0x1f06fefe,
|
||||
0x21009300,
|
||||
0x9124389a,
|
||||
0x91283899,
|
||||
0x04faf9f9,
|
||||
0x00f9e9e9,
|
||||
0x1d06fefe,
|
||||
0x04f1eaf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1ea,
|
||||
0xd107fe06,
|
||||
0x912c3899,
|
||||
0x00f9eaea,
|
||||
0xc905e408,
|
||||
0x1f07fefe,
|
||||
0x2100a300,
|
||||
0x912c389a,
|
||||
0x91303899,
|
||||
0x04faf9f9,
|
||||
0x00f9eaea,
|
||||
0x1d07fefe,
|
||||
0x04f1ebf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1eb,
|
||||
0xd104fe06,
|
||||
0x91343899,
|
||||
0x00f9ebeb,
|
||||
0xc906e408,
|
||||
0x1f04fefe,
|
||||
0x2100b300,
|
||||
0x9134389a,
|
||||
0x91383899,
|
||||
0x04faf9f9,
|
||||
0x00f9ebeb,
|
||||
0x1d04fefe,
|
||||
0x04f1ecf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x10f1f1ec,
|
||||
0xd105fe06,
|
||||
0x913c3899,
|
||||
0x00f9ecec,
|
||||
0xc907e408,
|
||||
0x1f05fefe,
|
||||
0x2100c300,
|
||||
0x913c389a,
|
||||
0x91403899,
|
||||
0x04faf9f9,
|
||||
0x00f9ecec,
|
||||
0x1d05fefe,
|
||||
0x912e2399,
|
||||
0xc902f90b,
|
||||
0x91086399,
|
||||
0xe1007499,
|
||||
0x240006f9,
|
||||
0x81302399,
|
||||
0xe1001895,
|
||||
0x0101f5f5,
|
||||
0x0108f4f4,
|
||||
0x48f5f603,
|
||||
0x241004f4,
|
||||
0x240000f5,
|
||||
0x21004100 };
|
||||
|
Loading…
Reference in New Issue