mirror of https://github.com/ArduPilot/ardupilot
Linux_HAL_Essentials: set default pwm to 0us
This commit is contained in:
parent
3e0c24adf9
commit
d3d46a7f2c
|
@ -21,8 +21,8 @@
|
|||
|
||||
// PWM
|
||||
|
||||
// 920 us
|
||||
#define PWM_PULSE_DEFAULT (920 * TICK_PER_US)
|
||||
// 0 us
|
||||
#define PWM_PULSE_DEFAULT (0 * TICK_PER_US)
|
||||
|
||||
// 50 Hz
|
||||
#define PWM_FREQ_DEFAULT (20 * TICK_PER_MS)
|
||||
|
@ -223,6 +223,9 @@ pwm:
|
|||
// Calculate time to next event
|
||||
add CH_X_NEXT_TIME, CH_X_NEXT_TIME, register.temp
|
||||
|
||||
// Do not set pin if pulse time is 0
|
||||
qbeq pwmend, register.temp, 0
|
||||
|
||||
// Check if channel is enabled
|
||||
qbbc pwmend, CH_X_ENABLE
|
||||
|
||||
|
@ -339,7 +342,7 @@ rcin_ecap_end:
|
|||
mov register.ch_enable, 0x0
|
||||
sbco register.ch_enable, RAM, CH_ENABLE_RAM_OFFSET, 4
|
||||
|
||||
// Initialize PWM pulse (920us)
|
||||
// Initialize PWM pulse (0us)
|
||||
mov register.temp, PWM_PULSE_DEFAULT
|
||||
sbco register.temp, RAM, CH_1_PULSE_TIME_RAM_OFFSET, 4
|
||||
sbco register.temp, RAM, CH_2_PULSE_TIME_RAM_OFFSET, 4
|
||||
|
|
|
@ -30,8 +30,7 @@ const unsigned int PRUcode[] = {
|
|||
0x242ee0f0,
|
||||
0x240000e4,
|
||||
0x81003884,
|
||||
0x240002d9,
|
||||
0x24cec099,
|
||||
0x240000f9,
|
||||
0x81043899,
|
||||
0x810c3899,
|
||||
0x81143899,
|
||||
|
@ -75,11 +74,12 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e5f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e5,
|
||||
0xd108fe06,
|
||||
0xd108fe07,
|
||||
0x91043899,
|
||||
0x00f9e5e5,
|
||||
0x5100f909,
|
||||
0xc900e408,
|
||||
0x1f08fefe,
|
||||
0x21005300,
|
||||
|
@ -91,14 +91,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e6f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e6,
|
||||
0xd10afe06,
|
||||
0xd10afe07,
|
||||
0x910c3899,
|
||||
0x00f9e6e6,
|
||||
0x5100f909,
|
||||
0xc901e408,
|
||||
0x1f0afefe,
|
||||
0x21006300,
|
||||
0x21006400,
|
||||
0x910c389a,
|
||||
0x91103899,
|
||||
0x04faf9f9,
|
||||
|
@ -107,14 +108,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e7f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e7,
|
||||
0xd109fe06,
|
||||
0xd109fe07,
|
||||
0x91143899,
|
||||
0x00f9e7e7,
|
||||
0x5100f909,
|
||||
0xc902e408,
|
||||
0x1f09fefe,
|
||||
0x21007300,
|
||||
0x21007500,
|
||||
0x9114389a,
|
||||
0x91183899,
|
||||
0x04faf9f9,
|
||||
|
@ -123,14 +125,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e8f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e8,
|
||||
0xd10bfe06,
|
||||
0xd10bfe07,
|
||||
0x911c3899,
|
||||
0x00f9e8e8,
|
||||
0x5100f909,
|
||||
0xc903e408,
|
||||
0x1f0bfefe,
|
||||
0x21008300,
|
||||
0x21008600,
|
||||
0x911c389a,
|
||||
0x91203899,
|
||||
0x04faf9f9,
|
||||
|
@ -139,14 +142,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e9f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e9,
|
||||
0xd106fe06,
|
||||
0xd106fe07,
|
||||
0x91243899,
|
||||
0x00f9e9e9,
|
||||
0x5100f909,
|
||||
0xc904e408,
|
||||
0x1f06fefe,
|
||||
0x21009300,
|
||||
0x21009700,
|
||||
0x9124389a,
|
||||
0x91283899,
|
||||
0x04faf9f9,
|
||||
|
@ -155,14 +159,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1eaf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ea,
|
||||
0xd107fe06,
|
||||
0xd107fe07,
|
||||
0x912c3899,
|
||||
0x00f9eaea,
|
||||
0x5100f909,
|
||||
0xc905e408,
|
||||
0x1f07fefe,
|
||||
0x2100a300,
|
||||
0x2100a800,
|
||||
0x912c389a,
|
||||
0x91303899,
|
||||
0x04faf9f9,
|
||||
|
@ -171,14 +176,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1ebf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1eb,
|
||||
0xd104fe06,
|
||||
0xd104fe07,
|
||||
0x91343899,
|
||||
0x00f9ebeb,
|
||||
0x5100f909,
|
||||
0xc906e408,
|
||||
0x1f04fefe,
|
||||
0x2100b300,
|
||||
0x2100b900,
|
||||
0x9134389a,
|
||||
0x91383899,
|
||||
0x04faf9f9,
|
||||
|
@ -187,14 +193,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1ecf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ec,
|
||||
0xd105fe06,
|
||||
0xd105fe07,
|
||||
0x913c3899,
|
||||
0x00f9ecec,
|
||||
0x5100f909,
|
||||
0xc907e408,
|
||||
0x1f05fefe,
|
||||
0x2100c300,
|
||||
0x2100ca00,
|
||||
0x913c389a,
|
||||
0x91403899,
|
||||
0x04faf9f9,
|
||||
|
@ -212,5 +219,5 @@ const unsigned int PRUcode[] = {
|
|||
0x48f5f603,
|
||||
0x241004f4,
|
||||
0x240000f5,
|
||||
0x21004100 };
|
||||
0x21004000 };
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@ const unsigned int PRUcode[] = {
|
|||
0x242ee0f0,
|
||||
0x240000e4,
|
||||
0x81003884,
|
||||
0x240002d9,
|
||||
0x24cec099,
|
||||
0x240000f9,
|
||||
0x81043899,
|
||||
0x810c3899,
|
||||
0x81143899,
|
||||
|
@ -75,11 +74,12 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e5f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e5,
|
||||
0xd10afe06,
|
||||
0xd10afe07,
|
||||
0x91043899,
|
||||
0x00f9e5e5,
|
||||
0x5100f909,
|
||||
0xc900e408,
|
||||
0x1f0afefe,
|
||||
0x21005300,
|
||||
|
@ -91,14 +91,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e6f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e6,
|
||||
0xd108fe06,
|
||||
0xd108fe07,
|
||||
0x910c3899,
|
||||
0x00f9e6e6,
|
||||
0x5100f909,
|
||||
0xc901e408,
|
||||
0x1f08fefe,
|
||||
0x21006300,
|
||||
0x21006400,
|
||||
0x910c389a,
|
||||
0x91103899,
|
||||
0x04faf9f9,
|
||||
|
@ -107,14 +108,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e7f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e7,
|
||||
0xd10bfe06,
|
||||
0xd10bfe07,
|
||||
0x91143899,
|
||||
0x00f9e7e7,
|
||||
0x5100f909,
|
||||
0xc902e408,
|
||||
0x1f0bfefe,
|
||||
0x21007300,
|
||||
0x21007500,
|
||||
0x9114389a,
|
||||
0x91183899,
|
||||
0x04faf9f9,
|
||||
|
@ -123,14 +125,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e8f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e8,
|
||||
0xd109fe06,
|
||||
0xd109fe07,
|
||||
0x911c3899,
|
||||
0x00f9e8e8,
|
||||
0x5100f909,
|
||||
0xc903e408,
|
||||
0x1f09fefe,
|
||||
0x21008300,
|
||||
0x21008600,
|
||||
0x911c389a,
|
||||
0x91203899,
|
||||
0x04faf9f9,
|
||||
|
@ -139,14 +142,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e9f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e9,
|
||||
0xd107fe06,
|
||||
0xd107fe07,
|
||||
0x91243899,
|
||||
0x00f9e9e9,
|
||||
0x5100f909,
|
||||
0xc904e408,
|
||||
0x1f07fefe,
|
||||
0x21009300,
|
||||
0x21009700,
|
||||
0x9124389a,
|
||||
0x91283899,
|
||||
0x04faf9f9,
|
||||
|
@ -155,14 +159,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1eaf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ea,
|
||||
0xd106fe06,
|
||||
0xd106fe07,
|
||||
0x912c3899,
|
||||
0x00f9eaea,
|
||||
0x5100f909,
|
||||
0xc905e408,
|
||||
0x1f06fefe,
|
||||
0x2100a300,
|
||||
0x2100a800,
|
||||
0x912c389a,
|
||||
0x91303899,
|
||||
0x04faf9f9,
|
||||
|
@ -171,14 +176,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1ebf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1eb,
|
||||
0xd105fe06,
|
||||
0xd105fe07,
|
||||
0x91343899,
|
||||
0x00f9ebeb,
|
||||
0x5100f909,
|
||||
0xc906e408,
|
||||
0x1f05fefe,
|
||||
0x2100b300,
|
||||
0x2100b900,
|
||||
0x9134389a,
|
||||
0x91383899,
|
||||
0x04faf9f9,
|
||||
|
@ -187,14 +193,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1ecf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ec,
|
||||
0xd104fe06,
|
||||
0xd104fe07,
|
||||
0x913c3899,
|
||||
0x00f9ecec,
|
||||
0x5100f909,
|
||||
0xc907e408,
|
||||
0x1f04fefe,
|
||||
0x2100c300,
|
||||
0x2100ca00,
|
||||
0x913c389a,
|
||||
0x91403899,
|
||||
0x04faf9f9,
|
||||
|
@ -203,14 +210,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1edf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ed,
|
||||
0xd103fe06,
|
||||
0xd103fe07,
|
||||
0x91443899,
|
||||
0x00f9eded,
|
||||
0x5100f909,
|
||||
0xc908e408,
|
||||
0x1f03fefe,
|
||||
0x2100d300,
|
||||
0x2100db00,
|
||||
0x9144389a,
|
||||
0x91483899,
|
||||
0x04faf9f9,
|
||||
|
@ -219,14 +227,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1eef9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ee,
|
||||
0xd102fe06,
|
||||
0xd102fe07,
|
||||
0x914c3899,
|
||||
0x00f9eeee,
|
||||
0x5100f909,
|
||||
0xc909e408,
|
||||
0x1f02fefe,
|
||||
0x2100e300,
|
||||
0x2100ec00,
|
||||
0x914c389a,
|
||||
0x91503899,
|
||||
0x04faf9f9,
|
||||
|
@ -235,14 +244,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1eff9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ef,
|
||||
0xd101fe06,
|
||||
0xd101fe07,
|
||||
0x91543899,
|
||||
0x00f9efef,
|
||||
0x5100f909,
|
||||
0xc90ae408,
|
||||
0x1f01fefe,
|
||||
0x2100f300,
|
||||
0x2100fd00,
|
||||
0x9154389a,
|
||||
0x91583899,
|
||||
0x04faf9f9,
|
||||
|
@ -251,14 +261,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1f0f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1f0,
|
||||
0xd100fe06,
|
||||
0xd100fe07,
|
||||
0x915c3899,
|
||||
0x00f9f0f0,
|
||||
0x5100f909,
|
||||
0xc90be408,
|
||||
0x1f00fefe,
|
||||
0x21010300,
|
||||
0x21010e00,
|
||||
0x915c389a,
|
||||
0x91603899,
|
||||
0x04faf9f9,
|
||||
|
@ -276,5 +287,5 @@ const unsigned int PRUcode[] = {
|
|||
0x48f5f603,
|
||||
0x241004f4,
|
||||
0x240000f5,
|
||||
0x21004100 };
|
||||
0x21004000 };
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@ const unsigned int PRUcode[] = {
|
|||
0x242ee0f0,
|
||||
0x240000e4,
|
||||
0x81003884,
|
||||
0x240002d9,
|
||||
0x24cec099,
|
||||
0x240000f9,
|
||||
0x81043899,
|
||||
0x810c3899,
|
||||
0x81143899,
|
||||
|
@ -75,11 +74,12 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e5f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e5,
|
||||
0xd109fe06,
|
||||
0xd109fe07,
|
||||
0x91043899,
|
||||
0x00f9e5e5,
|
||||
0x5100f909,
|
||||
0xc900e408,
|
||||
0x1f09fefe,
|
||||
0x21005300,
|
||||
|
@ -91,14 +91,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e6f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e6,
|
||||
0xd10bfe06,
|
||||
0xd10bfe07,
|
||||
0x910c3899,
|
||||
0x00f9e6e6,
|
||||
0x5100f909,
|
||||
0xc901e408,
|
||||
0x1f0bfefe,
|
||||
0x21006300,
|
||||
0x21006400,
|
||||
0x910c389a,
|
||||
0x91103899,
|
||||
0x04faf9f9,
|
||||
|
@ -107,14 +108,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e7f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e7,
|
||||
0xd10ffe06,
|
||||
0xd10ffe07,
|
||||
0x91143899,
|
||||
0x00f9e7e7,
|
||||
0x5100f909,
|
||||
0xc902e408,
|
||||
0x1f0ffefe,
|
||||
0x21007300,
|
||||
0x21007500,
|
||||
0x9114389a,
|
||||
0x91183899,
|
||||
0x04faf9f9,
|
||||
|
@ -123,14 +125,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e8f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e8,
|
||||
0xd10efe06,
|
||||
0xd10efe07,
|
||||
0x911c3899,
|
||||
0x00f9e8e8,
|
||||
0x5100f909,
|
||||
0xc903e408,
|
||||
0x1f0efefe,
|
||||
0x21008300,
|
||||
0x21008600,
|
||||
0x911c389a,
|
||||
0x91203899,
|
||||
0x04faf9f9,
|
||||
|
@ -139,14 +142,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1e9f9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1e9,
|
||||
0xd10afe06,
|
||||
0xd10afe07,
|
||||
0x91243899,
|
||||
0x00f9e9e9,
|
||||
0x5100f909,
|
||||
0xc904e408,
|
||||
0x1f0afefe,
|
||||
0x21009300,
|
||||
0x21009700,
|
||||
0x9124389a,
|
||||
0x91283899,
|
||||
0x04faf9f9,
|
||||
|
@ -155,14 +159,15 @@ const unsigned int PRUcode[] = {
|
|||
0x04f1eaf9,
|
||||
0x24f000da,
|
||||
0x2400009a,
|
||||
0x60faf90d,
|
||||
0x60faf90e,
|
||||
0x10f1f1ea,
|
||||
0xd108fe06,
|
||||
0xd108fe07,
|
||||
0x912c3899,
|
||||
0x00f9eaea,
|
||||
0x5100f909,
|
||||
0xc905e408,
|
||||
0x1f08fefe,
|
||||
0x2100a300,
|
||||
0x2100a800,
|
||||
0x912c389a,
|
||||
0x91303899,
|
||||
0x04faf9f9,
|
||||
|
@ -180,5 +185,5 @@ const unsigned int PRUcode[] = {
|
|||
0x48f5f603,
|
||||
0x241004f4,
|
||||
0x240000f5,
|
||||
0x21004100 };
|
||||
0x21004000 };
|
||||
|
||||
|
|
Loading…
Reference in New Issue