Linux_HAL_Essentials: add PocketPilot PRU Firmware

This commit is contained in:
mirkix 2017-12-13 20:33:02 +01:00 committed by Francisco Ferreira
parent 8c8767e964
commit 7126b0c5ae
3 changed files with 198 additions and 0 deletions

View File

@ -1,6 +1,7 @@
RcAioPRU: RcAioPRU.p
pasm -V3 -c RcAioPRU.p RcAioPRU_BBBMINI -DBBBMINI
pasm -V3 -c RcAioPRU.p RcAioPRU_BBBLUE -DBBBLUE
pasm -V3 -c RcAioPRU.p RcAioPRU_POCKET -DPOCKET
test: RcAioPRUTest.c
gcc -g -o RcAioPRUTest RcAioPRUTest.c

View File

@ -152,6 +152,15 @@
#define RC_CH_8_PIN r30.t5
#endif
#ifdef POCKET
#define RC_CH_1_PIN r30.t9
#define RC_CH_2_PIN r30.t11
#define RC_CH_3_PIN r30.t15
#define RC_CH_4_PIN r30.t14
#define RC_CH_5_PIN r30.t10
#define RC_CH_6_PIN r30.t8
#endif
// RCOut enable bits
#define RC_CH_1_ENABLE register.ch_enable.t0
#define RC_CH_2_ENABLE register.ch_enable.t1
@ -387,9 +396,13 @@ mainloop:
RCOUT_PWM RC_CH_4_PIN, register.ch_4_next_time, RC_CH_4_ENABLE, CH_4_PULSE_TIME_RAM_OFFSET, CH_4_T_TIME_RAM_OFFSET
RCOUT_PWM RC_CH_5_PIN, register.ch_5_next_time, RC_CH_5_ENABLE, CH_5_PULSE_TIME_RAM_OFFSET, CH_5_T_TIME_RAM_OFFSET
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
#ifdef BBBLUE
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
#endif
#ifdef BBBMINI
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
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

View File

@ -0,0 +1,184 @@
/* 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,
0xd109fe06,
0x91043899,
0x00f9e5e5,
0xc900e408,
0x1f09fefe,
0x21005300,
0x9104389a,
0x91083899,
0x04faf9f9,
0x00f9e5e5,
0x1d09fefe,
0x04f1e6f9,
0x24f000da,
0x2400009a,
0x60faf90d,
0x10f1f1e6,
0xd10bfe06,
0x910c3899,
0x00f9e6e6,
0xc901e408,
0x1f0bfefe,
0x21006300,
0x910c389a,
0x91103899,
0x04faf9f9,
0x00f9e6e6,
0x1d0bfefe,
0x04f1e7f9,
0x24f000da,
0x2400009a,
0x60faf90d,
0x10f1f1e7,
0xd10ffe06,
0x91143899,
0x00f9e7e7,
0xc902e408,
0x1f0ffefe,
0x21007300,
0x9114389a,
0x91183899,
0x04faf9f9,
0x00f9e7e7,
0x1d0ffefe,
0x04f1e8f9,
0x24f000da,
0x2400009a,
0x60faf90d,
0x10f1f1e8,
0xd10efe06,
0x911c3899,
0x00f9e8e8,
0xc903e408,
0x1f0efefe,
0x21008300,
0x911c389a,
0x91203899,
0x04faf9f9,
0x00f9e8e8,
0x1d0efefe,
0x04f1e9f9,
0x24f000da,
0x2400009a,
0x60faf90d,
0x10f1f1e9,
0xd10afe06,
0x91243899,
0x00f9e9e9,
0xc904e408,
0x1f0afefe,
0x21009300,
0x9124389a,
0x91283899,
0x04faf9f9,
0x00f9e9e9,
0x1d0afefe,
0x04f1eaf9,
0x24f000da,
0x2400009a,
0x60faf90d,
0x10f1f1ea,
0xd108fe06,
0x912c3899,
0x00f9eaea,
0xc905e408,
0x1f08fefe,
0x2100a300,
0x912c389a,
0x91303899,
0x04faf9f9,
0x00f9eaea,
0x1d08fefe,
0x912e2399,
0xc902f90b,
0x91086399,
0xe1007499,
0x240006f9,
0x81302399,
0xe1001895,
0x0101f5f5,
0x0108f4f4,
0x48f5f603,
0x241004f4,
0x240000f5,
0x21004100 };