diff options
| author | Dawsyn Schraiber <[email protected]> | 2024-05-09 01:34:24 -0400 |
|---|---|---|
| committer | Dawsyn Schraiber <[email protected]> | 2024-05-09 01:34:24 -0400 |
| commit | 5f68c7a1b5c8dec82d4a2e1e12443a41b5196b1d (patch) | |
| tree | 807db017e2180e9d3ba0058701548748afc71c3e /src/pru | |
| parent | 90c4d94b13472114daab71d3e368660224423c90 (diff) | |
| download | active-drag-system-5f68c7a1b5c8dec82d4a2e1e12443a41b5196b1d.tar.gz active-drag-system-5f68c7a1b5c8dec82d4a2e1e12443a41b5196b1d.tar.bz2 active-drag-system-5f68c7a1b5c8dec82d4a2e1e12443a41b5196b1d.zip | |
02/24/2024 Dalzell Test Launch Version (BB Black)
Diffstat (limited to 'src/pru')
| -rw-r--r-- | src/pru/pwm_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pru/pwm_test.c b/src/pru/pwm_test.c index df8bbf0..9c19314 100644 --- a/src/pru/pwm_test.c +++ b/src/pru/pwm_test.c @@ -18,6 +18,7 @@ #define CYCLES_PER_SECOND 200000000 #define CYCLES_PER_PERIOD (CYCLES_PER_SECOND / 800) +#define PRU_TIMER_PASSCODE 0x31138423 uint32_t *pru0DRAM_32int_ptr; // Points to the start of local DRAM uint32_t *pru1DRAM_32int_ptr; // Points to the start of local DRAM @@ -38,6 +39,7 @@ int start_pwm_count(uint32_t duty_cycle) { printf("old:\n\tcountOn: %d, countOff: %d, count: %d\nnew:\n\tcountOn: %d, countOff: %d, count: %d\n", old_count_on, old_count_off, old_count_off + old_count_on, new_count_on, new_count_off, new_count_off + new_count_on); // write to PRU shared memory + pruDRAM_32int_ptr[1] = PRU_TIMER_PASSCODE; pruDRAM_32int_ptr[0] = duty_cycle; // On time return 0; } |
